Altera_Forum
Honored Contributor
8 years agoHow to set up shared on-chip memory
Hi, using Cyclone V with HPS.
I have a custom Verilog module which needs to have its own registers, as well as read/write access to 1kByte of on-chip memory. The Linux side also needs to have access to both the module's registers and the on-chip memory. I'm able to get the module's registers memory mapped in Linux and can read/write them, using the Avalon interface. I assume I can get on-chip memory to be memory-mapped in Linux too, at a different base address. However I'm not sure where to begin with getting my module to read/write on-chip memory. I'd like to just use the Verilog array syntax, like read_data <= my_memory[addr] or my_memory[addr] <= write_data, where my_memory is the shared on-chip 1kB memory. I'd prefer not to have to write Avalon master logic, eg controlling chip selects, read/write signals, etc., from my module to access the shared memory, just the Verilog array syntax. Is this possible? Can someone please provide an overview or point to an example of how to have a custom module access on-chip memory which is shared with the Linux side? thanks