Forum Discussion
Constraints from LVDS blocks and logic
Hi,
I have a lvds tx and rx blocks in a Stratix3. There a 20 bits with deserialisation factor of 4. With the Rx side, the data leaving the lvds is registered. The lvds and registers are using clocks from a PLL. TimingQuest gives me an erro and show the sclkout rising edge as the source clock but with the rising edge of the register clock directly underneath. I've used the write sdc command and got the lvds constraints it generates. However, they just don't seem to cover this path between the sclkout and the registers. I would have though that the hold time would have been 4 sclks. I do have a clock mux on a couple of outputs from the PLL and it's the output of the mux that drives the registers. I don't know if this is cause a problem or not. If I put a hold time of 2, then problem goes away but is TimingQuest highlighting a problem? Regards MT21 Replies
- Altera_Forum
Honored Contributor
Thanks Rysc.
I did signal tap the data straight out of the lvds block and also out of the registers, and it was going wrong out of the lvds block. I've managed to get something working by tweaking the lvds sclk phase and enable. But on top of this, I changed the DPA settings so that it's using the rising and falling edges of the clock. This is also helped nudge it in the right direction. I tried adding the clock uncertainty and it didn't make any difference to the results. I also tried changing the constraints but it didn't help either. With the hold error, what it's telling me is that launch clock is getting there very quickly and the latch clock is much slower, hence the hold error. The all paths setting fixes is it for now but I'm not sure what more can be done with this. What I'm finding from the main build (which uses TAN and this lvds section gets intergrated into it) is that it still seems to try, for example, to meet a 1.6ns (625MHz) timing requirement from the registers in the fabric to the tx lvds registers when the multi-cycle constraints say that the setup time is 3 clocks. I have no idea why it's trying to do this. I don't know if it's trying to do the same with the rx side too. Any idea's why this might be the case? Is it because I've changed the sclk phase in both the rx and tx lvds blocks? I've added a set of multi-cycle constraints which I translated from TimingQuest. I know these are supposed to built-in but the above seems to suggest it's ignoring them. Maybe that's why there is a hold error too. - Altera_Forum
Honored Contributor
The message is valid for TAN and TimeQuest. The reason it makes you add them is that the destination is your own register driven by your own clock, so if you do anything "funky", you may want a different timing assignment.
I would really make sure that it's a hold issue occuring at these registers. Are you SignalTapping the capture registers(the first registers in the fabric), so you know the data at that point is incorrect? If you can do my experiment mentioned before, where the delay to these registers is longer and shorter, what happens, i.e. does getting the fitter to add delay fix everything? If you take the failing design and heat it up, does it start to work? Do the errors get worse if you cool the part down? - Altera_Forum
Honored Contributor
I have no problem using TimingQuest but at the place I work they use TAN. With my designs, I use TimingQuest but the main build of the design still used TAN. Just on a side note, MC constraints are built-in to the lvds blocks, so I don't have to add them in TimingQuest or TAN? I do remember when I selected to use an external PLL for the lvds, a message appears that I had to add constraints manually from lvds block to registers. Is this still valid or is this for TAN only?
It does look like we have a skew problem, something that doesn't appear with this design in the STX3 150 part. I've set it to run with the derive_clock_uncertainty. Not sure if there any other lvds constraints that we need to have. I've seen stuff about rskm, tccs etc. Not sure if this applies here. - Altera_Forum
Honored Contributor
No derive_clock_uncertainty for TAN. It's only for 65nm and newer products, and I'd really, really, really, really recommend using TimeQuest. Really.
- Altera_Forum
Honored Contributor
As a test, set your partitions(you probably only have one unless doing incremental compilation) to Post Fit(Strict) - Placement Only. So your next compile will just re-run the router. Also add a set_min_delay -hold 400ps on these paths, which increases the hold requirement by 400ps, which increases the hold requirement from 0ns to 400ps.(and make sure the fitter setting to Optimize All Paths is on, so the router can add delays to meet hold timing is on. Also check the Optimize All Corners). Re-compile. It should take a few minutes and just re-route, and hopefully it will add delays to these paths. If that's worked, re-run the hardware test. I just want to make sure that you're really having a hold violation on these paths, and that should be a good test.
- Altera_Forum
Honored Contributor
Is there a derive_clock_uncertainty equivalent for TAN?
Thanks MT - Altera_Forum
Honored Contributor
Thanks Rysc. I've tried the set_clock_uncertainty and it didn't make any difference to the output. I put a clock_uncertaintly setup on the lvds clock and the lvds enable. What I can say is that using the lvds enable (on c1 of the pll) for the logic as well, has improved it. If you consider a 64 bits bus split into 4 lanes, then we should get a 0707 pattern on each lane but instead we get the following (lane0 is bits 15 to 0, lane is bits 32 to 16 etc):
lane0: 0707 lane1: 0E07 lane2: 070E lane3: 0E07 All timing constraints have been met - setup and hold. I also have DPA on the lvds block which might be making things worse. I have tried all paths before and when the device gets full, it struggles to find the extra routing for the delay to meet any hold time requirements. I noticed that there a tcl commands called 'max_clock_arrival_skew' and 'max_data_arrival_skew'. Not sure if we can use these or not? Can tcl commands as .sdc commands - are they usable in this way? Thanks MT - Altera_Forum
Honored Contributor
With a 0ns hold requirement, it's almost impossible to get a hold failure without some clock skew, but since the clock may use a dedicated path to the LVDS, that's certainly possible(I don't remember off the top of my head). Two points, make sure you have derive_clock_uncertainty in your .sdc file(which makes timing more difficult to meet), and in Assignments -> Settings -> Fitter, turn the Hold Optimizations to All Paths.
- Altera_Forum
Honored Contributor
- Altera_Forum
Honored Contributor
Rsync - apologies for the late response. I've been stuck with other things which is why I haven't had time to look at this.
We're looking into something that is related. We have the following setup: there is a pll with outputs c0(625mhz lvds clock), c1(lvds enable) and c2(with a 156.25mhz logic clock). There is a set of registers on the output of the lvds block - a 64 bit bus. What we find is that from bit 0 to bit 63, the data seems to get more corrupted. What we're thinking is that c0, c1 and c2 are all on different clock networks which may result in skew between networks but also how Quartus handles the timing in this case. What we're trying is use c1 not only as the lvds enable but also as the logic clock to force it all on one clock network. This test version of the design works perfectly in an Stratrix 150 but not in a Stratix340. That with identical code and constraints.