Altera_Forum
Honored Contributor
10 years agoavalon_spi RX data and onboard memory
Hi guys
I am new, but have created a simple nios ii hello world that will interface with my DUT using the avalon_spi_command routine. The DUT is somewhat unique in that i have to send it 4 bytes of data to command it, and then send another 2 bytes to receive its 2 byte response. The code works well and im able to see the rxdata in eclipse is exactly what i expect. I built the fpga code with qsys and have a nios ii, spi core, onboard memory and jtag uart. I built it from examples that i saw. there are hooks from the spi to the onboard memory, so i assume that the spi reads will go into memory somewhere. When im running this to capture real data, i will have hundreds of spi reads, each 2 bytes wide. My question is how do i know what addresses the spi uses in the onboard memory to store rxdata? And, how do i guarantee that successive spi write of 2 bytes dont just keep overwriting each other, but instead, get their own spot in memory? I will then use system console to read back all spi rx data to a file thanks!