diff options
author | Tim Newsome <tim@sifive.com> | 2019-06-19 10:56:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-19 10:56:37 -0700 |
commit | bb03f79bde8eb3d3a2a5147876d42af7cebc247e (patch) | |
tree | 78081c386272d5255da9d7f03d8c415eccd2f58b /src/target/target.c | |
parent | c05ad1a92a9379295f2e0eef481e88e89e4eff6f (diff) | |
download | riscv-openocd-bb03f79bde8eb3d3a2a5147876d42af7cebc247e.zip riscv-openocd-bb03f79bde8eb3d3a2a5147876d42af7cebc247e.tar.gz riscv-openocd-bb03f79bde8eb3d3a2a5147876d42af7cebc247e.tar.bz2 |
Improve block read and checksum speed (#381)
* Cache program buffer writes.
Speeds up flash program by 3%, flash verify by 2%.
Change-Id: I19f8f44f560a1111fa8f4e4fc04ce6de3c94999a
* Remove nop from batch reads.
program @ 22.123 KiB/s, verify @ 47.654 KiB/s (up from program @ 20.287
KiB/s, verify @ 23.148 KiB/s originally).
Change-Id: I7ee19d967b1080336b0088d20e1fc30828afd935
* Use "algorithm" to compute CRC on RISC-V targets.
Use the C compiler to generate the algorithm code. It's better at
assembly than I am. We need separate RV32 and RV64 binaries to handle
shift instructions. I used the code from gdb (libiberty really) because
it returns the correct result. I'm not sure if the table is worth it
since we do have to save/download/restore more bytes now.
riscv_run_algorithm() now properly saves and reads back all registers
used for parameters. It also doesn't check final_pc if exit_point is 0.
Using gdb means I don't know the exact address where the code will end.
Small target.[ch] change to be able to run algorithms at 64-bit
addresses.
Flashing an arty board now:
```
wrote 2228224 bytes from file /media/sf_tnewsome/SiFive/arty_images/arty.E21TraceFPGAEvaluationConfig.mcs in 105.589180s (20.608 KiB/s)
verified 2192012 bytes in 7.037476s (304.177 KiB/s)
9.87user 16.16system 1:53.16elapsed 23%CPU (0avgtext+0avgdata 24768maxresident)k
```
Change-Id: I6696bd4cda7c89ac5ccd21b2ff3aa1663d7d7190
* Clean up formatting.
Change-Id: I7f2d792a2b9432a04209272abb00d8136ee01025
Diffstat (limited to 'src/target/target.c')
-rw-r--r-- | src/target/target.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/target.c b/src/target/target.c index a99e981..36e63f9 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -796,7 +796,7 @@ static int target_soft_reset_halt(struct target *target) int target_run_algorithm(struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_param, - uint32_t entry_point, uint32_t exit_point, + target_addr_t entry_point, target_addr_t exit_point, int timeout_ms, void *arch_info) { int retval = ERROR_FAIL; |