question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VCS Timescale Mismatch?

See original GitHub issue

I have a design that has a clock with a period of 10 (in default cocotb units), and a simulation that runs for 8508 cycles. What I see in the report for VCS is the following:

*********************************************************************
** TEST         PASS/FAIL  SIM TIME(NS)  REAL TIME(S)  RATIO(NS/S) **
*********************************************************************
** tb.test_app    PASS     85081000000000.00        [redacted]     **
*********************************************************************

Well, that’s not right, there are 9 extra 0s. 1ns is 1e-9s, so that’s a bit suspicious. What does Incisive say?

*********************************************************************
** TEST         PASS/FAIL  SIM TIME(NS)  REAL TIME(S)  RATIO(NS/S) **
*********************************************************************
** tb.test_app    PASS        85081.00        [redacted]           **
*********************************************************************

Ok, that looks correct.

What’s going on here? Did I misconfigure something or is there something wrong with how cocotb is setting up the VCS testbench?

In any case, it’s questionable that the same testbench is not consistent across simulators.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:25 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
cmarqucommented, Sep 9, 2019

Actually, I think we need two environment variables COCOTB_HDL_TIMESTEP and COCOTB_HDL_TIMEPRECISION so that we don’t rely on the format of the “step/precision” string.

0reactions
cmarqucommented, Apr 13, 2020

Looks like everything brought up here is done; thanks again for your work @hofstee.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VCS/VCSi User Guide
Allowing Inout Port Connection Width Mismatches. ... Compile-Time Options that Impede or Accelerate VCS. ... How VCS Prevents Time 0 Race Conditions ....
Read more >
VCS®/VCSi™ User Guide
Allowing Inout Port Connection Width Mismatches. ... Compile-Time Options That Impede or Accelerate VCS . ... How VCS Prevents Time 0 Race Conditions...
Read more >
Why xrun timescale does not comply with SV-2012 spec?
The first timescale(1ns/10ps) should not take effect. I've tried Synopsys VCS, it print below info: TimeScale of tb_top is 1 ps / 1...
Read more >
VCS® MX/VCS MXi™ User Guide
Setting time scale/resolution of Verilog or VHDL kernel. . 19-20 ... Allow Inout Port Connection Width Mismatches. . . . . . ....
Read more >
VCS/VCSi User Guide
Debugging Simulation Mismatches . ... Using -debug_access with -ucli/-gui at Compile-Time . ... How VCS Prevents Time 0 Race Conditions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found