Control SRAM On DE2-115
Hi, I am trying to read and write a buffer on an FPGA, and I want to use SRAM to read and write this buffer. However, I have tried two different methods, but I still couldn't get the SRAM to correctly read (or write) the buffer data.
The first method is using a simple arbitration module written in Verilog. The code is in attachment.
Regarding the inout connections, I wrote them according to the example in the SD Card Music Player ip\TERASIC_SRAM\TERASIC_SRAM.v. I also tried writing them in reverse:
assign sram_dq = sram_we_reg? render_dq : 16'hz;
However, the result is still incorrect.
The second method is using the IP core SRAM Controller, screenshots are in the attachments.
I also used Signal Tap Logic Analyzer to observe the data after downloading it to the FPGA, and the screenshots are also in the attachments(readdata[15..0] line).
The problem now is, regardless of the method used, how can I correctly read and write the buffer in the SRAM? Of course, if you can correct the problems in the code, that would be even better. Thank you!
Software: Quartus Prime 20.1 Lite Edition
FPGA: DE2-115