I am working on Image Processing on FPGAs using Verilog. In my design I store my processed result in a Block-RAM.
Is there a way in which data stored in a Block RAM be read out of it and stored as a text file ?
I am working on Image Processing on FPGAs using Verilog. In my design I store my processed result in a Block-RAM.
Is there a way in which data stored in a Block RAM be read out of it and stored as a text file ?
Generally, yes, it's possible to take data from some form of memory attached to your digital logic and write it to permanent storage in a structured manner.
A "file" is something that exists within a file system, ie. a data structure meant to structure data on a larger storage device. Typically, dealing with such data structures is mostly sequential logic; therefore, the typical method of storing something e.g. on an SD card is giving the FPGA the ability to execute instructions from some memory (instead of trying to implement all this in logic hardware, which then quickly becomes rare). A digital logic state machine that executes instructions – that's a CPU.
One simple way which I used on board to do the same goes like:
There are many ways to give a host PC access to memory (and registers) located in an FPGA. Two that I have used in the past are:
USB: The FTDI FT2451 has a bidirectional parallel bus that is easy to connect to the FPGA. The host PC can treat this as a COM port (much faster than a UART, however), or use FTDI's D2XX drivers for more direct access.
SPI: A simple SPI slave module in the FPGA can be controlled with something like a "Bus Pirate" from the host PC. (Or in my case, a SPI master on another FPGA.)
Both of these are simpler to implement and perform faster than a UART interface.
1 This was a long time ago. They now have more modern chips with equivalent functionality.