Hi Team,
I am creating the packet out of one interface and sending it over analysis port write method. Example code is shown below.
class collector extends ovm_monitor;
ovm_analysis_port #( trans_item ) trk_port;
`ovm_component_utils_begin(collector)
// Methods
extern function new (string name = "collector", ovm_component parent = null);
extern function void build();
extern task run();
extern task collect_trans_1();
extern task collect_trans_2();
endclass: collector
//Only relevant code is shown below.
task collector::run();
fork
collect_trans_1();
collect_trans_2();
join_none
endtask : run
task collector::collect_trans_1()
trans_item trans_item_1;
trans_item_1.data = interface1.data;
trans_item_1.address = interface1.address;
trk_port.write(trans_item_1);
endtask: collect_trans_1
task collector::collect_trans_2()
trans_item trans_item_2;
trans_item_2.data = interface2.data;
trans_item_2.address = interface2.address;
trk_port.write(trans_item_2);
endtask: collect_trans_2
Even though both the interfaces are different, I am creating the packet of same type (trans_item) out of it and sending it over analysis_port. This is working fine so far.
Now my question is, If I receive the transaction simultaneously on the bother the interfaces (interface1 and interface2), will
my analysis port (trk_port) be able to handle it?
Could someone kindly explain.
Thanks in advance