G
Gav
Guest
Hi,
I have a simple (experimental) design consisting of testbench and DUT.
The timescale compiler directive in the testbench is 1ns / 1fs, while
that in the DUT is 1ns / 1ps.
My prior understanding of the rules concerning timescale resolution
was that the finest resolution set in any module is applied to all
modules. So for the example given, I would expect all delays in the
DUT to be timed to a resolution of 1 fs.
However, my simulation shows that within the DUT, only those delays
with a dependence on input pin transitions are resolved to 1fs, while
delays independent of the inputs are resolved to 1ps. For example, a
clock divider running off the input clock has a period resolved to
1fs, while a delay such as #1.0001 (units = 1ns) is rounded to 1.000.
So it seems that two different timescale resolutions are being used
within a single module. This doesn't seem like a good idea. Am I
missing something? Is this what you would expect? If so, is this
defined by the LRM or is it simulator dependent? Your views would be
appreciated.
I can provide some sample code if it would help. I am using Cadence NC-
Sim.
Thanks,
Gav.
I have a simple (experimental) design consisting of testbench and DUT.
The timescale compiler directive in the testbench is 1ns / 1fs, while
that in the DUT is 1ns / 1ps.
My prior understanding of the rules concerning timescale resolution
was that the finest resolution set in any module is applied to all
modules. So for the example given, I would expect all delays in the
DUT to be timed to a resolution of 1 fs.
However, my simulation shows that within the DUT, only those delays
with a dependence on input pin transitions are resolved to 1fs, while
delays independent of the inputs are resolved to 1ps. For example, a
clock divider running off the input clock has a period resolved to
1fs, while a delay such as #1.0001 (units = 1ns) is rounded to 1.000.
So it seems that two different timescale resolutions are being used
within a single module. This doesn't seem like a good idea. Am I
missing something? Is this what you would expect? If so, is this
defined by the LRM or is it simulator dependent? Your views would be
appreciated.
I can provide some sample code if it would help. I am using Cadence NC-
Sim.
Thanks,
Gav.