• 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. use of is_relevant() in sequences

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 64
  • Views 13728
  • 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

use of is_relevant() in sequences

archive
archive over 19 years ago

Hi, I recently ran into an issue related to the use of is_relevant() from within a sequence and I'd like to get some opinion on possible solutions.

Problem: I want to use is_relevant() as a form of back-pressure to stall the enclosing sequence upon some condition. However, that condition is not known until the current item has been generated. Since 'do' is an atomic action, and is_relevant() does not allow access to the generated item as it's being 'do'ne, I'm stuck.

We eventually ended up replacing the 'do' syntax with our own macro for doing an item. Our macros would generate the item first, set some conditions based on the results of the gen, and then invoke 'do' to pass it the item we just generated. The conditions we set right after the gen would be used to implement is_relevant().

The work-around solves the problem, but it's cumbersome and we might run into some issues in the future should the semantics/implementation of 'do' change.

Has anyone else ever encountered a similar problem/limitation with is_relevant()?

cheers,

Joseph H. Zhang
Lead Verification Engineer
Cisco Systems, Inc.
(919) 392-1350


Originally posted in cdnusers.org by jhzhang
  • Cancel
  • archive
    archive over 19 years ago

    Hello Joseph,

    You can do couple things; you can pre-generate the field of the do item or do item's field within is_relevant method, decide to start upon the generated value
    pseudo code may look like

    struct vr_pcie_tlp_pkt {
    tlp_type: tlp_type_t;
    tc: tc_t;
    };

    sequence vr_pcie_tl_seq {

    !pre_tc: tc_t;

    body()@driver.clock is {
    do pkt keeping {
    .tc == pre_tc;
    };
    };

    is_relevant():bool is {
    gen pre_tc;
    return TRUE(tc in [0..3] and tc_pipe_is_empty);
    };
    };






    Originally posted in cdnusers.org by levent
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 19 years ago

    Hi Levent, thanks for the recommendations. There's a major disadvantage that made us avoid the approaches you spoke of. That is, the user who is writing the sequences now has lost control of the field in terms of constraining as part of the do, or via extending the transaction item.

    Joseph


    Originally posted in cdnusers.org by jhzhang
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 19 years ago

    Hi Joseph

    Then your choice is always generate the item first.

    The advantage of is relevant is to hold the generation till the last moment thus you can generate the item per the last snap shot of the environmet/dut status , because your generation may depend on the status. Forcv example, you hold of generation of a completion until there is an valid incoming request and generate the CMPL per specifics of that request.

    Thus you need make a choice between
    giving the same constraint control to user but not being able generate per the latest status
    or
    not giving the same constraint control

    If you are OK with the first choice then (you may already do this)

    extend FOO ex_atm_sequence {

    // Items/subsequences
    !cell: ex_atm_cell;

    // The body() method
    body() @driver.clock is {
    var preprepared_cell: ex_atm_cell;
    gen preprepared_cell;
    ...
    //BLOCK until the condition is met
    wait (prepared_cell.id == 5 and pipe_status==empty)
    do cell keeping {it == preprepared_cell};
    };

    };


    In this case user still can constraint the sequence or the "prepared_cell" item as he wishes. The down side is, as I mentioned, you loose the ability of generating the cell per the latest condition of environment/dut.

    If still this wont resolve your issue please open up a service request and may be R&D experts can help you out

    Cheers
    Levent Caglar


    Originally posted in cdnusers.org by levent
    • 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