Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Using uvm_config_db to nitialize/pass params from the sequence to the transaction?

Status
Not open for further replies.

sarit8

Newbie level 6
Joined
Aug 25, 2016
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
104
I have the following transaction:

typedef enum {READ = 0, WRITE = 1} direction_enum;

Code:
//Transaction

class axi_transaction extends uvm_sequence_item();
   bit id = 0;  //const
   bit [31:0] addr;
   bit [2:0]  size = 0'b100;//const
   direction_enum rw;
   bit [31:0] transfers [$];



   //factory registration
   `uvm_object_utils_begin(axi_transaction)
   `uvm_field_int(id, UVM_ALL_ON)
   `uvm_field_int(addr, UVM_ALL_ON)
   `uvm_field_int(size, UVM_ALL_ON)
   `uvm_field_enum(rw, UVM_ALL_ON)
   `uvm_field_int(transfers, UVM_ALL_ON)      
   `uvm_object_utils_end  

   //constructor
   function new(string name = "axi_transaction");
      super.new(name);
   endfunction: new

endclass: axi_transaction
I understood that I have to use uvm_config_db, so I can initializes the transaction in the sequence with arguments which initialize some of the transaction members (like addr, transfers) by, but I'm not sure how to do it.

Code:
 ax_trx =  axi_transaction::type_id::create();
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top