I want to give inputs to my IP(design) using a hex...
# caravel
s
I want to give inputs to my IP(design) using a hex file through WISHBONE, so how am I supposed to give? Using testbench or the C file? Is it even possible to give a large hex file to the design using wishbone ?
m
yes via C file
if it's large you might have to read it from an external source
the firmware has to be fairly small to fit
although someone who knows better than me might be able to adjust the linker scripts / memory map to use larger fw
@Tim Edwards - thoughts?
t
The question doesn't make any sense as asked. Hex files have nothing to do with wishbone. C files have nothing to do (directly) with testbenches. I'm not sure what's being asked.
I think I understand the question to mean that the user project is configured (or can be configured) to get data input from the processor through write operations to a memory-mapped register, and the question is whether a large dataset can be coded into a C program and read from flash by the processor and written to the processor. In that case, the answer is yes, but depends on just how much data needs to be stored. The SPI flash on the board is pretty big (32MB). The address space devoted to the SPI is, I think, 256MB. The immediate limit using the standard program/flash/run method will be 16MB, since the SPI flash controller issues 3-byte address commands to the flash, and that's the limit of 3-byte addresses. There are more complicated methods to transfer a program directly into memory, decoupling it from the flash, and then having it send its own commands to the flash which would just issue a single stream read with automatic increment, which would have effectively unlimited memory capacity.
s
@Tim Edwards Thank you, I think I got an idea. And sorry for the ambiguity of my question. I designed an IP for Image compression and mapped its input output ports to the GPIOs. I read my input (pixel values) using a hex file through the test bench. Now I wanted to modify the design and explore Wishbone and rather than taking inputs from GPIO pins, I wanted to store it and then send it to my design through wishbone, I couldn't find any existing projects on the shuttle or any good resource to implement it.
t
Will 16MB be enough data?
s
Yes. It will be.