• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. TCM versus TCM race conditoin

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 66
  • Views 16750
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

TCM versus TCM race conditoin

lalit123
lalit123 over 15 years ago

Hi,

This is regarding a race condition (happens at different seed) in one of my sim between 2 different TCMs.

 The scenario is something like this:

The test is implented as a subsequence which contains a do action in its body() @driver.clock {..., the driver.clock is connected to bfm clock as follows:

event a_clock is rise ('clk_from_vhd_tb') @sim;

on a_clock {emit driver.clock};

where driver is the one associated with original sequence.

 In bfm there is a TCM called execute_items()... which is started in its run() is also{... block.

The issue:

In few seeds it is seen that when execute_items() is started there is a garbage struct which is generated.

The bfm interaction mode is PULL_MODE. As per my understanding of get_next_item(), the call is blocked unless a "do" action is seen this avoiding any garbage struct generation.

Thanks in advance for any help.

  • Cancel
Parents
  • StephenH
    StephenH over 15 years ago

    Could you explain what you mean by "garbage struct"? Are you certain that no other sequence is being run first and generating something that you do not expect? I ask, because you said your test is a subsequence, which implies that it's not the MAIN sequence.
    If this isn't your own eVC, check whether any special sequences are initiated before MAIN body() is called. For example, in some of the Cadence eVCs, a special initialisation sequence is run from MAIN's pre_body() in order to do any standard setup stuff before the test sequence kicks off.

    You could try using the "trace sequence" command to see the flow of the sequences; indeed if you're using NCSim with Specman then "trace sequence transactions" will put the sequences and the items into the waveforms.

    As an aside, you should be using simple_ports to connect to RTL signals, they give you a performance boost compared to tick-accesses. Here's an example based on your clock:

    clk_p : in simple_port of bit is instance;
    keep clk_p.hdl_path() == "clk_from_tb";
    event a_clock is rise(clk_p$)@sim;

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • StephenH
    StephenH over 15 years ago

    Could you explain what you mean by "garbage struct"? Are you certain that no other sequence is being run first and generating something that you do not expect? I ask, because you said your test is a subsequence, which implies that it's not the MAIN sequence.
    If this isn't your own eVC, check whether any special sequences are initiated before MAIN body() is called. For example, in some of the Cadence eVCs, a special initialisation sequence is run from MAIN's pre_body() in order to do any standard setup stuff before the test sequence kicks off.

    You could try using the "trace sequence" command to see the flow of the sequences; indeed if you're using NCSim with Specman then "trace sequence transactions" will put the sequences and the items into the waveforms.

    As an aside, you should be using simple_ports to connect to RTL signals, they give you a performance boost compared to tick-accesses. Here's an example based on your clock:

    clk_p : in simple_port of bit is instance;
    keep clk_p.hdl_path() == "clk_from_tb";
    event a_clock is rise(clk_p$)@sim;

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information