• 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. starting same TCM multiple times.

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 65
  • Views 14821
  • 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

starting same TCM multiple times.

harip
harip over 16 years ago

Hi All,

We have a doubt related to starting the TCM multiple no. of times.

Let us take a TCM used to check some property and takes a few cycles(say 5-10) to execute.

If the event which is used to start this TCM occurs multiple times during the executuion period (5-10 clock for TCM),

does the event forks out multiple threads for the TCM?

Regards,

Harip

  • Cancel
  • tpylant
    tpylant over 16 years ago

    I'm not sure what TCM stands for but I assume you are referring to the enabling condition of an assertion. So if you have an assertion that checks for a ACK to be issued after a REQ:

    property p_reqack; $rose(req) |=> ##[0:5]ack;endproperty
    a_reqack: assert (p_reqack);

    The $rose(req) would be the enabling condition. Your question is what happens if 'req' has more than one posedge before 'ack' goes high? In this case, there would be multiple executions of this property that would all be fulfilled when 'ack' goes high.

    You can actually see this effect in the SimVision waveform browser.Add the assertion to the waveform window (via source code browser or assertion browser). If the assertion is executed multiple times, there will be a '+' next the assertion name that expands the waveform to show the status of each branch.

    Tim

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • harip
    harip over 16 years ago

     Hi,

    As per specman/e, TCM stands for time consuming method. This is equivalent to "task"in verilog which consumes simulation time.

    The issue is that if the task(TCM) is executed multiple time, does all the threads close when acknowledgement is generated. As Each request is associated with its respective grant, can each task(TCM) threads close when corresponding grant comes up.

    Thanks,

    Harip 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mstellfox
    mstellfox over 16 years ago

    Hari,

    Can you describe the exact type of check that you would like to do?  It sounds like you want to check that for each request there will be a grant occurring with some number of cycles?  If that is what you want to check, it might be easier to write an e temporal check using expect.  For example, let's assume you have an event defined for request and another event defined for grant, and you want to make sure that each time their is a request, there will be a grant within 5 cycles.  The easiest way to write that would be:

    expect @request => {[..5] * cycle; @grant} @clk else dut_error(...

    Mike

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Tzachi Noy
    Tzachi Noy over 16 years ago

    Mike,

    What hapeens if event 'request' rose on clocks 1 and 3 and event 'grant' rose once on clock 4? There were two requests and only one grant. Will the expect statment expect this?

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • harip
    harip over 16 years ago

    Hi,

    The issue is when multiple (say 5) requests are followed by a grant. Does the expect statement execute for multiple requests and points out that there is no grant for other than first request.

    Please suggest how to check this.

    Thanks,

    Hari

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mstellfox
    mstellfox over 16 years ago

    So, I think the question you are asking is how to handle the check for pipelined behavior.  If there are multiple requests before the first grant occurs, you need to check that each request will have a grant within 5 cycles.  If that is your question, you need to build a simple queue or list to model the pipeline of requests and then check each of them receives a grant.  There might be simpler ways to do it, but here is an example I created quickly to demonstrate one approach:

    <'

    extend sys {
     monitor: monitor_s;
    };

    // Need to build a list of request/grant pairs to track
    struct gnt_chk_s {
     event clk is @sys.any;
     event grant;

     expect req_gnt_chk is
      {[0..5];@grant exec {out("Grant checked ", sys.time)}} @clk
      else dut_error("No Grant within 5 cycles");
    };

    struct monitor_s {
     !gnt_chk: gnt_chk_s;
     !gnt_chk_list: list of gnt_chk_s;

     event clk is @sys.any;
     event dut_request;
     event dut_grant;

     on dut_request {
      out("New Request ", sys.time);
      gen gnt_chk;
      gnt_chk_list.add0(gnt_chk);
     };

     on dut_grant {
      out("New Grant ", sys.time);
      emit gnt_chk_list.top().grant;
      gnt_chk_list.top().quit();
      gnt_chk_list.delete(gnt_chk_list.last_index(TRUE));
     };

     // Simulate some combination of pipelined requests/grants
     req_gnt_gen() @clk is {
      wait [1];
      emit dut_request;
      wait [1];
      emit dut_request;
      wait [1];
      emit dut_grant;
      wait [6];
      emit dut_grant;
      wait [10];
      stop_run(); 
     };

     run() is also {
      start req_gnt_gen();
     };
    };

    '>

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • harip
    harip over 16 years ago

    Thanks for the detailed example.

    Regards,

    Hari

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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