Forum Discussion
Altera_Forum
Honored Contributor
16 years agoDCFIFO - incorrect functionality of a ModelSim timing simulation
Hey guys,
A brief background:My VHDL design (for Stratix III) has input data arriving at 20MHz. The data is read at a rate of 100Mhz. The reading and writing operations aren't necessarily simultaneous. I have prepared a dedicated FIFO block, based on the DCFIFO megafunction, to handle this input interface. The relevant DCFIFO settings I have chosen: overflow_checking => "ON" underflow_checking => "ON" rdsync_delaypipe => 3 wrsync_delaypipe => 3 use_eab => "ON" write_aclr_synch => "ON" The problem:The block works smoothly in logic simulation (ModelSim 6.5B) and timing (post-synthesis) simulation (Quartus II - 9.1). But, when I run the timing simulation in ModelSim (based on the vho+sdo files generated in Quartus) the functionality is incorrect: The first data sample which is written to the FIFO never appears on the FIFO's output lines. All the following data samples appear correctly. Each time I raise the write enable, only the second data sample can be read. Attached:- A logic simulation in ModelSim (perfect functionality) screen shot.
- A timing simulation in ModelSim (incorrect functionality) screen shot.
- Assigning register on for the input and output ports of the DCFIFO to make sure no setup\hold time violations occur.
- Reading from the FIFO a single clock cycle after fifo_empty goes low.
13 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- When I perform compilation, only the "Uncosntrained Paths" category of the timing analyzer report goes red. --- Quote End --- You need to constrain your input/output delays, and then insure that the signals that you generate in your test bench are compliant with those constrains. This is the only way you can ensure that the timing solution will give you realistic results. - Altera_Forum
Honored Contributor
Hello,
Thank you for answering. I have defined both of the clocks in the TimeQuest analyzer. Those clocks are to be generated by a single PLL in the top level entity which includes my design as a sub-block. For the simulation's sake, I am generating them in my vhdl test bench. I have no idea how to define the clock uncertainties, so I have set them all to zero. When I perform compilation, only the "Uncosntrained Paths" category of the timing analyzer report goes red. These are all the timing constraints I have applied. Am I doing anything wrong here ? Am I forgetting something ? Thanks ahead. - Altera_Forum
Honored Contributor
Did you define all your clocks in Timequest and put all your timing requirements? It could come from bad timing.
I would rely more on Modelsim's output than Quartus'