Forum Discussion

MinzhiWang's avatar
MinzhiWang
Icon for Occasional Contributor rankOccasional Contributor
2 months ago

The DC_FIFO issue of Cyclone 10 GX devices

Hello Guys,

We are using 10CX220F780 and 10CX105F780 devices now. They are communicating thru XCVR. So one DC_FIFO is realized between RX received data and user logic fabric.

 

This DC FIFO operation always has problem during the first operating. But it will be normal during the second operating.

As the above image indicates, RX get data from XCVR and put them to FIFO. The write is ok, however, the reading has problem. Because the first read data is ZERO, this causes the following reads all halt.

I apply one more same operation, now it's ok, as following image:

As above image indicates, one data is put into FIFO, and it will be read out from this FIFO in time.

 

But why always the first time operating is not correct after power-up or re-configuring FPGA?

 

I did one test: FIFO's Rdreq is fix to high level. Then I got the following result:

As above image indicates, the first data x"40000000" can't be written into FIFO. So I always got ZERO for the first data. Buy how this can happen?  I kept detecting more deeply, as following image

As above image indicates, after Wreq valid, 2 clock cycles later, Usedw will change, and 2 more clock cycles later, empty signal will be changed to low level. 

This is the problem. Usedw and empty signals are changed too fast. I checked normal timing, UsedW should be changed 3 clock cycles later after Wreq valid, and empty should be changed 5 clock cycles later after Wreq valid.

Why can this happen? And always happen one time after power-up.

 

 

Best Regard

 

9 Replies

  • Farabi_Altera's avatar
    Farabi_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hello Minzhi, 

    I am Farabi to takeover this case from Ashlesha. 

    Thank you for the clarification.

    When you say the DCFIFO aclr port is not opened, that means the FIFO is not being cleared after configuration. The FIFO IP User Guide states that either aclr or sclr must be enabled and included in the design for correct FIFO operation.

    That also matches your symptom: the first transfer after power-up / reconfiguration fails, then later transfers are OK until the next download.

    Please try the following:

    Enable the DCFIFO aclr port.

    Hold aclr asserted until both wrclk and rdclk are stable. For the XCVR RX path, release aclr only after rx_ready (or equivalent PHY reset-controller done).

    In the FIFO Parameter Editor, enable:

    Add circuit to synchronize aclr with wrclk

    Add circuit to synchronize aclr with rdclk

    Keep wrreq low during aclr deassertion, and wait a few clocks after release before the first write. Asserting wrreq at aclr release can race with wrclk.

    Then re-test the first LUT write after a fresh FPGA download.

    On the latency concern: for DCFIFO, wrreq to wrusedw is 2 wrclk cycles by documentation, so a 2-cycle usedw update can be normal if you are observing wrusedw. Please confirm whether Signal Tap is showing wrusedw/wrempty or rdusedw/rdempty.

    Regarding Signal Tap: you can still capture wrclk and aclr by clocking Signal Tap from rdclk (or another free-running clock) and adding wrclk/aclr as data signals, together with rx_ready and the FIFO status ports.

    Could you also share:

    Quartus version

    DCFIFO settings (Normal / Show-ahead, depth, width, sync stages, overflow/underflow checking)

    Result after enabling aclr as above on the first post-config write

     

    Best regards,

    Altera Applications Support

     

  • dandanlau's avatar
    dandanlau
    Icon for New Contributor rankNew Contributor

    Hi,

    I assume this works in simulation so it's not reproducible there?

    What happens if you delay the first (or subsequent) wrreq by a couple of cycles so the data is stable first, would you still see the same issue?

    • MinzhiWang's avatar
      MinzhiWang
      Icon for Occasional Contributor rankOccasional Contributor

      Hi dandanlau,

      Yes, I did that you said already. I applied one or two or three cycles delay for wrreq. But the issue still there. 

  • Ash_R_Altera's avatar
    Ash_R_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi Minzhi,

    Thank you for providing the detailed description and waveforms. I assume that the FIFO is configured to Normal mode.

     

    This behavior typically occurs due to transceiver clock instability during power-up/reset or premature read requests before pointer synchronization is complete.

    Probable root cause & recommendations:

    1. Transceiver Clock Stability & Reset Sequencing (`rx_ready`):
      - At power-up/reconfiguration, the transceiver CDR and PLL calibrate, during which `rx_clkout` can experience glitches or unstable frequencies before locking.
      - Ensure the DCFIFO `aclr` (asynchronous reset) is held asserted until the Transceiver PHY Reset Controller asserts `rx_ready` (and both `wrclk` and `rdclk` are stable).
      - After `aclr` is deasserted, wait at least 3 to 5 clock cycles before asserting `wrreq`.

     

    2. Read Request (`rdreq`) Gating:
      - Do not tie `rdreq` permanently high (`1'b1`). Asserting `rdreq` while `rdempty` is high causes FIFO underflow:
        - In Normal Mode: Reading while empty results in invalid/zero data.
      - Always qualify your read logic: only assert `rdreq` when `rdempty == 1'b0`.

     

    3. Is it possible to bring the DC_FIFO signals 'aclr' and 'wrclk' also in the signal tap?

     

    For more details on reset sequencing and timing requirements, please refer to the FIFO Intel FPGA IP User Guide on Altera.com.

     

    Best regards,
    Altera Applications Support

    • MinzhiWang's avatar
      MinzhiWang
      Icon for Occasional Contributor rankOccasional Contributor

      Hi Ash,

      Thanks for you reply.

      I think this issue doesn't relate with power-up issue. For our board has been powered on for long time when we want to operate FIFO. We have one look up table required to send to object FPGA from top-level thru DAQ and tranceiver. So you can see from previous SignalTap II images. The FIFO writing time interval is about 100 ns (Actually, our DAQ speed is only 10MHz.), and our system clock frequency is 100MHz. This look up table can be written correctly after this issue. This problem only happens when power-up/download new program. It means that we have to write this look up table two times, because the first time has this problem. We can't repeat this issue after it appears one time. If we want to repeat this issue, we have to power-up again, or download program again.

      I apply 'rdreq' with '1' just for verifying FIFO writing operation. Our normal 'rdreq' signal is generated as you mentioned.

       

      BTW, we don't open 'aclr' port for FIFO. And I don't think we can check 'wrclk' from signaltap, for sgnaltap clock frequency is equal to 'wrclk'.

       

      Best Regrad

      • Ash_R_Altera's avatar
        Ash_R_Altera
        Icon for Regular Contributor rankRegular Contributor

        Hi,

        May I know which Quartus version is being used? Please share a smaller version of your design to replicate the issue on our side. Simulatable design is preferred.

        Parallely on your side, I would like to see the DC_FIFO ports in the signal tap. Please add as many signals at the FIFO level, including 'aclr' to the signal tap and send us a screen shot. Additionally add XCVR rx_ready signal as well.

         

        I didn't quite understood what you mean by "we don't open 'aclr' port". Do you mean you never assert and de-assert the 'aclr' port? Please clarify.

         

        Regards,

        Altera Tech Support