Home > Community > Forums > Functional Verification > vr_ad_file multiple instance

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: *

 vr_ad_file multiple instance 

Last post Wed, Sep 1 2010 7:09 AM by Ravisinha. 4 replies.
Started by Ravisinha 01 Sep 2010 02:58 AM. Topic has 4 replies and 2100 views
Page 1 of 1 (5 items)
Sort Posts:
  • Wed, Sep 1 2010 2:58 AM

    • Ravisinha
    • Top 500 Contributor
    • Joined on Mon, Nov 23 2009
    • Posts 21
    • Points 315
    vr_ad_file multiple instance Reply
    Hello All, I have a situation where i want to implement 8 instance of some particular reg_file which all have many reg_def and reg_fld. For example : I have 8 instance of one DUT module (TEST0, TEST1,TEST2... TEST8), since its all are the instance so all the instance will have the sets of registers.. so to implement reg for one instance i can write code like.. extend vr_ad_reg_file_kind : [TEST0]; extend TEST0 vr_ad_reg_file { keep size == 256; }; reg_def EX_REG_TX_DATA TEST0 8’h00 { // name : type : mask : reset value reg_fld data : uint(bits:8) : RW : 0; }; But now the issue is inside 1 instance i have around 256 registers, and i need to implement for all the 8 instance.... so can anyone suggest me how we can make instance for vr_ad_reg_file, otherwise i have to write same code for all the 8 instance. Thanks
    • Post Points: 20
  • Wed, Sep 1 2010 3:32 AM

    • StephenH
    • Top 25 Contributor
    • Joined on Tue, Sep 2 2008
    • Bristol, Avon
    • Posts 272
    • Points 4,345
    Re: vr_ad_file multiple instance Reply

    You can nest reg_files, which lets you achieve the replication you're looking for.

    extend vr_ad_reg_file_kind : [TOP_RF, TEST_RF];

    extend TEST_RF vr_ad_reg_file { keep size == 8; };

    reg_def EX_TX_DATA TREST_RF 8'h00 { ... };

    extend TOP_RF vr_ad_reg_file {
      keep size == 256;
      reg_list test_rfs[8] of TEST_RF;
    };

     

    Steve Hobbs / Applications Engineer / Cadence Functional Verification
    Filed under:
    • Post Points: 20
  • Wed, Sep 1 2010 6:24 AM

    • Ravisinha
    • Top 500 Contributor
    • Joined on Mon, Nov 23 2009
    • Posts 21
    • Points 315
    Re: vr_ad_file multiple instance Reply
    Hi Stephen, Thanks for the solution.. i will work on that.. i have one more doubt related to this solution only... Lets us assume i have created 8 instance of TEST_RF by test_rfs[8] by using reg_list. now for writing into 1. test_rfs[0] of EX_TX_DATA register and 2. test_rfs[1] of EX_TX_DATA register i am not sure how to write the sequence for this. Basically we do write_reg EX_TX_DATA value 0xa5a5; But for this multiple instance can you tell me how to do the same thing. Thanks Ravi
    • Post Points: 20
  • Wed, Sep 1 2010 6:32 AM

    • StephenH
    • Top 25 Contributor
    • Joined on Tue, Sep 2 2008
    • Bristol, Avon
    • Posts 272
    • Points 4,345
    Re: vr_ad_file multiple instance Reply

    Hi Ravi.

    I recommend you to look at the vr_ad examples inside vr_ad/examples/*.e, in particular vr_ad_mult_regs.e.
    This vr_ad_mult_regs.e file shows some different techniques to use the multiple registers.

    Enjoy!

    Steve Hobbs / Applications Engineer / Cadence Functional Verification
    Filed under:
    • Post Points: 20
  • Wed, Sep 1 2010 7:09 AM

    • Ravisinha
    • Top 500 Contributor
    • Joined on Mon, Nov 23 2009
    • Posts 21
    • Points 315
    Re: vr_ad_file multiple instance Reply
    hey thanks ... i got it...
    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by Ravisinha at 01 Sep 2010 02:58 AM. Topic has 4 replies.