Forum Discussion
Altera_Forum
Honored Contributor
12 years agoI'm confused when you say Tco. That refers to a registered output, where this is an input pin.
The two constraints should give almost identical results. The "correct/recommended" way is to use the virtual clock. Why? 1) The main reason is that derive_clock_uncertainty can put different uncertainty between RX_CLK and RX_CLK_Virtual, which is more accurate. Case 1 has the same clock going into the FPGA be the one outside of it. Since is applied between clocks, TimeQuest adds the uncertainty to account for uncertainty inside the FPGA, not as if it were an external clock. The difference might be 20ps(it might be nothing), so it's not overly significant. 2) Another reason for having the virtual clock is pure flexibility. You can do things to that clock and not have to alter the clock inside the FPGA. For example, you're using -clock_fall to say it clocks on the falling edge, but you also could have done "create_clock –name RX_CLK _Virtual -period 20 -waveform {10 20}". This describes a 20ns clock who's first rising edge is at 10ns and falling is at 20n, and repeats from there. This is probably more accurate, but will give you the same analysis as saying it's not shifted but clocked on the falling edge. But let's say it weren't center-aligned, but slightly off-center, say by 1ns. In your example for Case 1), you can't shift the external clock without shifting the internal one. But in case 2) you can do "create_clock -name RX_CLK_Virtual -waveform 11 21" and achieve that. So it allows you to do more. You don't need it in your example, but it's normally a good reason. 3) I also like it because it creates another clock domain that you can do timing reports on. For example, you can do: report_timing -setup -from_clock {RX_CLK_Virtual} -npaths 100 -detail full_path -panel_name "RX_CLK_Virtual Inputs - Setup" This will report all the input paths without having to specify all the data pins. I have seen plenty of times where users do Case 1 and are just fine, so it's not a requirement, but there are some benefits to Case 2 that make it good practice.