Hi all, While running a program on picoRV32 (with ...
# caravel
b
Hi all, While running a program on picoRV32 (with computation + wishbone read/write from/into user_project_area), the QSPI Flash access time is limiting the functionality. So, can someone guide me/point to some resources about writing bootloader for the picoRV32 to switch from Flash to the on-chip SRAM as suggested by Tim Edwards in this thread - https://skywater-pdk.slack.com/archives/C017HPHCMEY/p1633615339066700?thread_ts=1633507037.063900&cid=C017HPHCMEY). Thanks.
👀 1
t
(1) Have you tried just using the flash in full quad mode? See the caravel repository verilog/dv/caravel/mgmt_soc/qspi/qspi.c. This is by far the easist to set up if that's a high enough throughput for you. (2) There is an example in the picorv32 repository that uses the "flashio_worker" routine in start.s to copy code from the flash to SRAM and then jump to SRAM to execute. See in the picorv32 repository picosoc/firmware.c; e.g., set_flash_qspi_flag is calling the C routine flashio() that copies flash_worker from flash to SRAM and then jumps to the subroutine in SRAM.
b
(1) I don't think we have tried this. Will do. Thanks. (2) Thanks again!
t
@User: The attached program demonstrates the simplest way to copy a routine from flash into SRAM and run it. The code copies the routine test_function() into SRAM and calls it there, and it returns to execution from flash.
b
Thank you very much for the code!
@User please check this out.