• 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 13734
  • 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
Parents
  • 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
Reply
  • 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
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