TL;DR - SPI Flash is looking for a file I don't have/don't know how to makeI built the standard SmallSPIFlashRocketConfig and LargeSPIFlashROMRocketConfig and simulated them using Verilator. I've successfully compiled and executed a baremetal executable to interact with UART0 in the RocketConfig build. Since the same UART module exists in the other builds at the same address, I expect them to behave almost exactly the same with the same executable as before. However, when I try to run the executable, I get an error.
$ ./simulator-chipyard-SmallSPIFlashRocketConfig uart3.riscv
This emulator compiled with JTAG Remote Bitbang client. To enable, use +jtag_rbb_enable=1.
Listening on port 43929
[UART] UART0 is here (stdin/stdout).
No memory image provided. Use +spiflash0=<file> to specify.[0] %Error:
plusarg_file_mem.sv:50: Assertion failed in TOP.TestHarness.spi_mem_0.memory
%Error: /mnt/data/chipyard/sims/verilator/generated-src/chipyard.TestHarness.SmallSPIFlashRocketConfig/
plusarg_file_mem.sv:50: Verilog $stop
Aborting...
Aborted (core dumped)
I've tried to research different files I can input into it, but none seem to work. All the Chipyard documentation says under testchip IP is that the memory is backed by a file but no example file to use. I've tried the bootrom.rv64.img found in the testchipip repo, but that doesn't seem to work either. It throws the following error:
Error: image file mem_img.img is not large enough to store 0x10000 bytes.
I've also tried to write a file filled with all 0s or all 1s, but nothing seems to work. What kind of file is the SPI Flash looking for and where/how can I find one that works?