Home > Community > Forums > Functional Verification > propagating data when generating VE

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 propagating data when generating VE 

Last post Fri, Mar 9 2012 5:12 AM by yongchen. 2 replies.
Started by yongchen 08 Mar 2012 11:55 PM. Topic has 2 replies and 2595 views
Page 1 of 1 (3 items)
Sort Posts:
  • Thu, Mar 8 2012 11:55 PM

    • yongchen
    • Not Ranked
    • Joined on Sat, Jun 12 2010
    • Posts 12
    • Points 135
    propagating data when generating VE Reply

    Hi,

    I was confused when progapating data to generate VE by using "connect_pointers()" and "keep upper.comp = read_only(comp)".

    1) When should I use "connect_pointers" and when should I use "keep ... read_only"? For example, xserial example from Incisive gives an example as this:

    extend ACTIVE has_tx_path xserial_agent_u {

       tx_bfm: xserial_bfm_u is instance;

          keep tx_bfm.driver == read_only(tx_driver);

          .....

          connect_pointers() is also {

              tx_bfm.agent = me;

          };

    }

     

    2) In document from Invisiv 11.1, "Specman IntelliGen User Guide", 3-9, there is an example to show connect_pointers() as:

    extend agent {

       bfm: ex_atm_bfm is instance;

      driver: ex_atm_sequence_driver is instance;

      connect_pointers() is also {

        bfm.driver = driver;

        driver.bfm = bfm;

      }

    };

    My question is : why there is no "!" before driver/bfm? In what case should I add this "!" to unit?

     

    thanks

     

    • Post Points: 20
  • Fri, Mar 9 2012 1:30 AM

    • StephenH
    • Top 25 Contributor
    • Joined on Tue, Sep 2 2008
    • Bristol, Avon
    • Posts 278
    • Points 4,450
    Re: propagating data when generating VE Reply

    Hello Yongchen.

    In general you would use constraints to connect unit pointers. The connect_pointers() method is provided so that you can avoid deep hierarchical constraints when hooking up TLM ports, monitors to scoreboards etc. For example your bus monitor might have a pointer to a scoreboard "!p_scbd : my_scoreboard". You can then hook that procedurally via connect_pointers() from the top-level: "tb_top.axi_env.monitor = tb_top.scbd". Sometimes it's just easier this way than using constriants. There's no hard rule, so it's up to you to judge what is best.

    You would use the "!" (do-not-generate) attribute on a unit if it's meant to serve as a pointer and will be connected procedurally via connect_pointers(). Without the "!" a unit declaration MUST be either declared "is instance" or constrained to point to a real instance via a keep constraint. The "is instance" tells the generator that this object is a real unit, not a pointer to a unit.

    Hope this helps.

    Steve. 

    Steve Hobbs / Applications Engineer / Cadence Functional Verification
    • Post Points: 20
  • Fri, Mar 9 2012 5:12 AM

    • yongchen
    • Not Ranked
    • Joined on Sat, Jun 12 2010
    • Posts 12
    • Points 135
    Re: propagating data when generating VE Reply

    Thanks Steve. It is very helpful.

    Yong Chen 

     

     

     

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by yongchen at 08 Mar 2012 11:55 PM. Topic has 2 replies.