I’ve used the above code. Still the simulation is getting blocked. After getting the display message from passive monitor, simulation is getting blocked.
Is there any alternate method to pass data from my passive monitor my active agent’s sequence ?? Can we use TLM ports in this scenario ??
Of course you can use a port/export TLM mechanism. But this is not a good solution. Events and barriers are dedicated for synchronisation across several agents.
OK. I’ll check it and update you.
Is there any alternate method to pass data from my passive monitor my active agent’s sequence ?? Can we use TLM ports in this scenario ??
I can give you a working example for your problem. Please give me an email address.
Thanks a lot for your continuous support. I’ve achieved my task of sending data from my RX Passive monitor to TX sequence and also to TX Monitor by using uvm_event_pool.
can you please send your testbench , or code itself ?? . I also want to achieve same thing , but failed to understand , how to do it ?
YOUR testbench might be of great help
In passive agent there is a monitor, which has analysis port.
So from your active agent, subscribe to to that analysis port and get the data from that port.
you can keep and analysis port reference in config db.
There are always several solutions for a problem. But I do not believe it is a good solution to have a permanent horizontal connection between different agents. Additionally this limits the reusability of your agents.
Putting the data to the config_db generates another problem: you do not know when the data are in the config_db.
whenever there will be change in interrupt, monitor needs to send the data to sequence and then i can perform register operations from the monitor status
Please look this code and share your valuable feedback
//////////////transaction class
class interrupt_transaction extends uvm_sequence_item;
`uvm_object_utils(interrupt_transaction)
rand bit [3:0] interrupt;
extern function new (string name = "interrupt_transaction");
endclass
function interrupt_transaction::new(string name = "interrupt_transaction");
super.new(name);
endfunction
class interrupt_mon extends uvm_monitor;
//////////////////////factory registration/////////////////////
`uvm_component_utils(interrupt_mon)
//////////////////////virtual interface //////////////////////
virtual mcu_status_if intr_vif;
interrupt_transaction intr_txn;
function new(string name="interrupt_mon", uvm_component parent);
super.new(name, parent);
endfunction : new
function void build_phase(uvm_phase phase);
super.build_phase(phase);
intr_txn = interrupt_transaction::type_id::create("intr_txn");
endfunction : build_phase
function void connect_phase(uvm_phase phase);
super.connect_phase(phase);
endfunction : connect_phase
task run_phase(uvm_phase phase);
forever
@(posedge intr_vif.McuClk);
begin
intr_txn.interrupt = intr_vif.Interrupt;
`uvm_info("DATA FROM MON", $sformatf("DATA received from Interrupt MONITOR is : [%p] \n", intr_txn.interrupt),UVM_LOW)
end
endtask : run_phase
function void report_phase(uvm_phase phase);
`uvm_info(get_type_name(), "Interrupt Entering into Monitor", UVM_LOW)
endfunction
endclass
//////////////////////////Sequence////////////////////////////////////////
class interrupt_sequence extends base_seq;
`uvm_object_utils (interrupt_sequence)
interrupt_transaction intr_item;
function new(string name = "interrupt_sequence");
super.new(name);
endfunction
task body();
intr_item = interrupt_transaction::type_id::create("intr_item");
start_item(intr_item);
assert(intr_item.randomize());
finish_item(intr_item);
`uvm_info("DATA FROM MON", $sformatf("DATA received from Interrupt MONITOR is : [%p] \n", intr_item.interrupt),UVM_LOW)
if i get the status from monior then i can perform the register operations, please help me to achieve this
/////////////////////////read interrupt controller status
///////////////////////// check intialization is completed or not MCUINITDONE in MCUCL_Reg spec/////
//////////////////////// if it is set mask the init_mask_parm by setting it to 1
endtask
endclass
If you are interested you can get a code example to share data between a spi monitor and a apb sequence. Please reply on my email christoph@christoph-suehnel.de