Read/WriteRAM memory from FPGA side


#1

Hello. I’m using de0-nano-SoC kit for some experiments. I’v already figure out how to access to the RAM memory from HPS side, I can read or write data there (trough /dev/mem). So I don’t have problems with Linux/“C” part.

The next step is writing/read data from FPGA. I use DE0_NANO_SOC_GHRD as base project. It has “onchip_memory2_0” added in Qsys, so I didn’t make any changes there. Then I’v added “RAM: 1-PORT” symbol to the project ( https://screencast.com/t/6GT4CtTy ).
What I have to do now, to access this Symbol on my “GHRD” base project? As I understand i have to write code in ghrd.v but I don’t know how))
Please, provide small peace of code where I can assign first byte of RAM to 0x1 for example, or redirect me to some tutorial, where I can understand clearly how to implement symbols (such as “RAM: 1-PORT”) in the code.
Many thanks!