• 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. dynamically assigning the drivers for a virtual seq

Stats

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

dynamically assigning the drivers for a virtual seq

archive
archive over 17 years ago

Hi there, I'm having some sort of "constraint" problem, which some of you might have the answer to. The Scenario is the following, I use a virtual Sequence driver to drive frames onto a dynamic number of phy drivers. The goal is to be able to write a virtual sequence, which can be told on which phy it shall inject its sequences:

extend virtual_seq_driver
{
    !phy_driver[4] : list of phy_driver_u;
};

extend sve
{
    virt_seq_driver : virtual_seq_driver is instance;
    connect_pointers() is also
    {
        for i from 0 to virtual_seq_driver.phy_driver.size() - 1 do
        {
            virt_seq_driver.phy_driver[i] = pointer_to_list_of_phy_drivers_somewhere[i].driver;
        };
    };
};

sequence virt_seq using created_kind = virtual_sequence_t, created_driver : virtual_seq_driver;

extend virt_seq
{
    !phy_seq : some_phy_seq;
        keep phy_seq.driver = driver.phy_driver[phy_seq.seq_port_no - 1];
    -- ^^ This keep constraint results in a contradiction, because the seq_port_no is not properly constrained
};

extend some_phy_seq
{
    keep gen (seq_port_no) before (driver);
    seq_port_no : uint (bits:4);
    keep soft seq_port_no == 1;
};

The code above does not really work, as seq_port_no is used with a somehow totally unconstraind value (actually PGen tries to use a range). If I comment the constraint on the driver and constrain seq_port_no while calling the sequence with

extend MAIN virt_seq
{

    do phy_seq keeping
    {
        .seq_port_no == 1;
        .driver == driver.phy_driver[.seq_port_no - 1];
    };
};

everything works peachy and I can constrain the sequence dynamically to any Phy Port I want to use. How can I constrain it properly, so I don't have to constrain the driver every time I driver the sequence?

cheers for any solution


Originally posted in cdnusers.org by SomeDude
  • Cancel
Parents
  • archive
    archive over 17 years ago

    Hi there,

    Not sure if this is going to help, but about the "totally unconstrained" problem - try to check if the generated subtype has overridden the soft constraint on seq_port_no.
    Another option is to pre-generate the sequence (remove ! from !phy_seq : some_phy_seq;) so the sequence is pre-generated with the desired driver. To activate it use could start_sequence().
    Again - not sure if this is going to really help :-)

    Yaron


    Originally posted in cdnusers.org by thinkverification
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • archive
    archive over 17 years ago

    Hi there,

    Not sure if this is going to help, but about the "totally unconstrained" problem - try to check if the generated subtype has overridden the soft constraint on seq_port_no.
    Another option is to pre-generate the sequence (remove ! from !phy_seq : some_phy_seq;) so the sequence is pre-generated with the desired driver. To activate it use could start_sequence().
    Again - not sure if this is going to really help :-)

    Yaron


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