Forum Discussion
Stratix 10 fPLL is cascade source mode doesn't lock
Hi, sorry for long reply.
- What is the input clock frequency and source of it?
After power up it is 312.5MHz.
The clock source is clock output of RX XCVR (the port that is called rx_clkout)
2) What is the output frequency that you are trying to achieve?
After power-up it is 312.5MHz. But when it is recalibrated the frequency is not much than 210MHz.
In my project cascade source fPLL transfers input frequency to output. I would say it acts like clock buffer.
For every changing of input frequency cascade source fPLL is reconfigured (dividers value are changed) and recalibrated.
3) Is the create_clock constraint applied for the input clock at the top level?
It is in place.
Few design implementation checks would be:
1) You must recalibrate the PLL when the reference clock is available.
2) Clock on OSC_CLK_1 signal is used for calibration of the fPLL and it must be stable. Is it true for your case?
Because the source of clock is output of RX XCVR (the port that is called rx_clkout), when I am recalibrating cascade source fPLL I set RX XCVR to lock to ref. So, I can say that clock is stable.
OSC_CLK_1 signal is stable
I attached simplified project created with Quartus Pro 21.2. In this project RX XCVR generates 156.25MHz. And fPLL can be reconfigured using control from source and probes IP. Before recalibration (recalibration is triggered by positive edge of source bit[1]) it needs to set serial loopback (bit[3] of source IP) and check that we have lock to data by SignalTap. I tested this project with Quartus Pro 21.2 and 23.4. With Quartus 21.2 I see that after power-up calibration fPLL lock signal can be low or toggling, but after recalibration it is set to 1 and it is stable. With Quartus 23.4 lock signal is never asserted.
This simplified project doesn't actually use clock from cascade source fPLL it just checks lock signal, but it shows connection of my real project after power up. In real project there is reconfiguration and clock switching of transceiver fPLL to use clock from cascade source fPLL.
Overall, it seems that after compilation with Quartus Pro 23.4 or newer, clock from RX XCVR is not connected to cascade source fPLL
Hi,
Thanks for sharing the design. I have made some observations and have few questions regarding your design.
1) Why do you need a cascade clock to drive the transceivers? Though supported, cascading the PLL insert jitter. Why not use direct clock input pin for the reference clock?
2) The downstream xcvr_tr_fpll, is configured for Transceiver mode and has 2 refclk sources. One 100MHz from clock pin and other from the upstream fPLL which provides 156.25MHz. As the frequencies vary you have to reconfigure the fPLL to adapt to the frequency settings. In the design the IP is set to 100MHz only. Are you doing this?
Regards,
Altera Support
- rtldeseng2 months ago
New Contributor
Hello.
- Why do you need a cascade clock to drive the transceivers? Though supported, cascading the PLL insert jitter. Why not use direct clock input pin for the reference clock?
This is needed because of the requirements for my actual project. I can't share the details of why I really need it. Let's just accept it.
2) The downstream xcvr_tr_fpll, is configured for Transceiver mode and has 2 refclk sources. One 100MHz from clock pin and other from the upstream fPLL which provides 156.25MHz. As the frequencies vary you have to reconfigure the fPLL to adapt to the frequency settings. In the design the IP is set to 100MHz only. Are you doing this?
The shared design is simplified version of my real design that I cannot share. In real design transceiver fPLL is reconfigured and recalibrated after rate changing and clock switchover.
- Ash_R_Altera2 months ago
Regular Contributor
Hi,
Ok, let's accept the requirement in point #1.
Point #2, can you at least provide the steps that you follow in detail from power-up -> reconfiguration -> recalibration -> user ready. Which registers are you using etc. details will be helpful.
Regards
- rtldeseng2 months ago
New Contributor
Hello.
Let's concentrate on test project that I can share. It can reproduce the issue that I am talking about.
I changed the project (see the one attached to the message). Now it can reconfigure transceiver fPLL (xcvr_tr_fpll) and it use either reference fixed clock or clock from cascade source fPLL (xcvr_cs_fpll).
After power-up, XCVRs and xcvr_tr_fpll are calibrated using fixed reference clock (100MHz). xcvr_cs_fpll is calibrated using clock from RX XCVR but it is not stable, so lock signal is not stable too.
The steps to reconfigure using clock from xcvr_cs_fpll:
- Set lock to ref. for RX XCVR.
- Assertiong of reset to TX XCVR.
- Recalibration of xcvr_cs_fpll
- Reconfiguration of xcvr_tr_fpll (setting pre-reconfig bit, changing reference clock muxer, changing dividers, etc.)
- Recalibration of xcvr_tr_fpll.
- Deassertiong of reset to TX XCVR
If project was compiled with Quartus Pro 21.2, after step 6, lock signals of fPLLs are stable, clock that comes from TX XCVR is equal to expected value (156.25MHz)
If project was compiled with Quartus Pro 23.4 or 25.3 there are no lock on fPLLs outputs and as a consequence no stable clock from TX XCVR.
So, the result depends on Quartus version.
cs_fpll_controller.sv recalibrates xcvr_cs_fpll.
tr_fpll_controller.sv reconfigures and recalibrates xcvr_tr_fpll (the registers used for reconfiguration can be found as localparams).
- Ash_R_Altera11 days ago
Regular Contributor
Hi,
Sorry for the late response. After doing analysis on the code, I found one critical issue.File: tr_fpll_controller.sv
Following line of code:
// We set only bit[1] (mask 0x2)
o_avmm_m_writedata <= {read_data_buf[7:1], 1'b1};In the FSM_PRECAL_WR_PRE_RECONFIG state, the code writes to register 0x100 to set bit[1] (the calibration request bit), but the expression is wrong:
The concatenation {read_data_buf[7:1], 1'b1} places the literal 1 at bit position 0 (the LSB), not bit 1. Contrast this with the correct version in FSM_CONF_WR_CAL_BIT further down in the same FSM:
State Expression Bit actually set
FSM_PRECAL_WR_PRE_RECONFIG {read_data_buf[7:1], 1'b1} bit[0] ← wrong
FSM_CONF_WR_CAL_BIT {read_data_buf[7:2], 1'b1, read_data_buf[0]} bit[1] ← correct
Per the Stratix 10 Transceiver PHY UG, bit[1] of register 0x100 is the calibration trigger for an fPLL. The pre-calibration phase fails to arm this bit, so the downstream recalibration sequence is broken — the PreSICE never sees a valid calibration request, and the FPLL will not re-lock after the reference clock switch.Please correct it to the following:
o_avmm_m_writedata <= {read_data_buf[7:2], 1'b1, read_data_buf[0]}; // correctly sets bit[1]
Can you please check this part?
Regards,
Altera Tech Support
- dncmrc11 day ago
Occasional Contributor
Hi,
rtldeseng is not working for us anymore.
Thanks for your finding.
We tested your modifications but it didn't change the outcome: the shared project works only if compiled with Quartus 21.1.
Any hints?
Regards,
Marco