Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

Control SRAM On DE2-115

BBBBo15
Beginner
1,509 Views

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

Labels (1)
0 Kudos
6 Replies
AdzimZM_Intel
Employee
1,428 Views

Hello,


May I know which design that you're used to do the testing?

  • Is it you own design or Intel design example?


Do you check if the design is passing timing analysis?


Is the pin location has been assigned correctly based on the board?


Regards,

Adzim


0 Kudos
BBBBo15
Beginner
1,418 Views

Hi Adzim,

 

  • Is it you own design or Intel design example?

It's my own design.

 

Do you check if the design is passing timing analysis?

It says "Quartus Prime Timing Analyzer was successful. 0 errors, 24 warnings".

In compilation report, Timing Analyzer/ Unconstrained Paths/Summary, and ../Clock Status Summary is in red color. 

BBBBo15_3-1717063952421.png

 

BBBBo15_4-1717063952477.png

 

sorry if i misunderstood it and Time Analyzer, i haven't use Time Analyzer yet.

 

Is the pin location has been assigned correctly based on the board?

yes, all pins are assigned correctly in Pin Planner

 

Thank you.

0 Kudos
BBBBo15
Beginner
1,418 Views

Hi Adzim,

 

  • Is it you own design or Intel design example?

It's my own design.

 

Do you check if the design is passing timing analysis?

It says "Quartus Prime Timing Analyzer was successful. 0 errors, 24 warnings".

In compilation report, Timing Analyzer/ Unconstrained Paths/Summary, and ../Clock Status Summary is in red color. 

BBBBo15_2-1717063410600.png

BBBBo15_1-1717063391168.png

sorry if i misunderstood it and Time Analyzer, i haven't use Time Analyzer yet.

 


Is the pin location has been assigned correctly based on the board?

yes, all pins are assigned correctly in Pin Planner

 

Thank you.

 



0 Kudos
sstrell
Honored Contributor III
1,384 Views

Well, this is certainly correct for a bidi so your attached file is wrong: assign sram_dq = sram_we_reg? render_dq : 16'hz;

And your design is not constrained for timing.  You need to create a .sdc file and constrain those clocks and the I/O.  User guide is here: https://www.intel.com/content/www/us/en/docs/programmable/683068/18-1/timing-analysis-introduction.html

0 Kudos
AdzimZM_Intel
Employee
1,176 Views

Hello,


Have you put create the timing constraint as suggested by sstrell?


Regards,

Adzim


0 Kudos
BBBBo15
Beginner
1,123 Views

Sorry, no.

The FPGA belongs to my school, and this is my graduation project. Recently, I was working on the rendering module to ensure its functionality. After the graduation project evaluation was completed, the FPGA was returned to the school, so I did not have time to try Time Analyzer.

And the solution I used was to complete the read and write functionality using the on chip memory.

Thank you and sstrell for the advise.

0 Kudos
Reply