Home > Community > Forums > Functional Verification > uvm help needed

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

 uvm help needed 

Last post Mon, Jul 16 2012 9:27 AM by seourani. 4 replies.
Started by joys 07 Jun 2012 07:03 AM. Topic has 4 replies and 4469 views
Page 1 of 1 (5 items)
Sort Posts:
  • Thu, Jun 7 2012 7:03 AM

    • joys
    • Not Ranked
    • Joined on Thu, Jun 7 2012
    • Posts 3
    • Points 60
    uvm help needed Reply

     I am a newbee for uvm. Looking for some understaning on using uvm_tes/uvm_env  under module.

    IUS allows me using uvm_env under module but not uvm_test or uvm-agent ,  throwing below error  -

    " class my_test extends uvm_test;
                                   |
    ncvlog: *E,FAABP1 (my_tb.sv,1|31): task, function, or assertion instance does not specify all required formal arguments [10.2.2][10.3(IEEE)]."

    Follwing is the code - 

    module top;

    class my_env extends uvm_env; //works fine

    //class my_test extends uvm_test; // Gives error

    // class field,function

    endclass

    endmodule

     

    What should be the reason?

    thanks

    joys

    Filed under:
    • Post Points: 20
  • Thu, Jun 7 2012 8:36 AM

    • tpylant
    • Top 50 Contributor
    • Joined on Fri, Jul 11 2008
    • Austin, TX
    • Posts 135
    • Points 2,030
    Re: uvm help needed Reply

    You need to provide the component constructor:

       function new(string name, uvm_component parent);
        super.new(name, parent);
      endfunction : new

    Tim

    • Post Points: 20
  • Thu, Jun 7 2012 11:40 AM

    • joys
    • Not Ranked
    • Joined on Thu, Jun 7 2012
    • Posts 3
    • Points 60
    Re: uvm help needed Reply

    Thanks Tim !

    On a same line ,  I wanted to see how my_frame  being generated , I tried  as follow  and endup same error as earlier -

    class my_frame extends uvm_sequence_item;
    int addr;
    int data ;

    function new(string name);
    super.new(name);
    endfunction

    // field declarations and automation flags
    `uvm_object_utils_begin(my_frame)
    `uvm_field_int(addr, UVM_ALL_ON)
    `uvm_field_int(data, UVM_ALL_ON)
    `uvm_object_utils_end

    constraint addr_c { addr inside {[1:10]};}
    constraint data_c { data inside {[1:100]};}

    //function parity_calc()

    endclass

    class my_test extends uvm_test;
      
    function new(string name = "my_test", uvm_component parent = null);
       super.new(name, parent);
    endfunction : new


      virtual task run();
       bit success;
       my_frame frame;
       frame = new("frame");
       success = frame.randomize() with { addr == 5; data == 50;};
       $display(frame);
      endtask

    endclass

    What am I missing here?

    Thanks

    Filed under:
    • Post Points: 20
  • Thu, Jun 7 2012 12:08 PM

    • tpylant
    • Top 50 Contributor
    • Joined on Fri, Jul 11 2008
    • Austin, TX
    • Posts 135
    • Points 2,030
    Re: uvm help needed Reply

    Ran fine for me using INCISIV11.10.014 (ncsim 11.10-s055).

    `include "uvm_macros.svh"
    import uvm_pkg::*;

    class my_frame extends uvm_sequence_item;
      int addr;
      int data ;

      // field declarations and automation flags
      `uvm_object_utils_begin(my_frame)
        `uvm_field_int(addr, UVM_ALL_ON)
        `uvm_field_int(data, UVM_ALL_ON)
      `uvm_object_utils_end

      function new(string name="my_frame");
        super.new(name);
      endfunction

      constraint addr_c { addr inside {[1:10]};}
      constraint data_c { data inside {[1:100]};}

      //function parity_calc()

    endclass

    class my_test extends uvm_test; 
      `uvm_component_utils(my_test)

      function new(string name = "my_test", uvm_component parent = null);
        super.new(name, parent);
      endfunction : new

      virtual task run();
        bit success;
        my_frame frame;
        frame = new("frame");
        success = frame.randomize() with { addr == 5; data == 50;};
        $display(frame);
      endtask
    endclass

    Tim

     

    • Post Points: 20
  • Mon, Jul 16 2012 9:27 AM

    • seourani
    • Not Ranked
    • Joined on Mon, Jul 16 2012
    • <?xml version="1.0" encoding="utf-16"?><string>TP HCM, Vietnam</string>
    • Posts 2
    • Points 25
    Re: uvm help needed Reply

    Thank for your help, I used success this function base on yoru help.

    Regards,

     


     

    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by joys at 07 Jun 2012 07:03 AM. Topic has 4 replies.