Hi
I am a beginner in UVM. I would like to know whether these possibilities are available on the below mentioned code.
DUT : ADDER
Code: Transaction
It includes the following variables:
rand bit[1:0] ina
rand bit[1:0] inb
bit[2:0] out
// code for transaction
class simpleadder_transaction extends uvm_sequence_item;
rand bit[1:0] ina;
rand bit[1:0] inb;
bit[2:0] out;
function new(string name = "");
super.new(name);
endfunction: new
`uvm_object_utils_begin(simpleadder_transaction)
`uvm_field_int(ina, UVM_ALL_ON)
`uvm_field_int(inb, UVM_ALL_ON)
`uvm_field_int(out, UVM_ALL_ON)
`uvm_object_utils_end
endclass: simpleadder_transaction
// When another test with 3 inputs is to done, the above transaction is extended as below.
class simpleadder_transaction_3inputs extends simpleadder_transaction;
rand bit[1:0] inc;
function new(string name = "");
super.new(name);
endfunction: new
`uvm_object_utils_begin(simpleadder_transaction_3inputs)
`uvm_field_int(inc, UVM_ALL_ON)
`uvm_object_utils_end
endclass: simpleadder_transaction_3inputs
I need clarification on two scenario.
- Is it possible to extend the same class (simpleadder_transaction) in different agent in the same test bench.
- Is it possible to extend the same class (simpleadder_transaction) in an agent in the another test bench.
If possible, can you give idea on how to do that??