-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathagent_rb.sv
29 lines (23 loc) · 922 Bytes
/
agent_rb.sv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class agent_rb extends uvm_agent;
typedef uvm_sequencer#(transaction_rb) sequencer;
sequencer sqr;
driver_rb drv;
monitor_rb mon;
uvm_analysis_port #(transaction_rb) agt_req_port;
`uvm_component_utils(agent_rb)
function new(string name = "agent_rb", uvm_component parent = null);
super.new(name, parent);
agt_req_port = new("agt_req_port", this);
endfunction
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
mon = monitor_rb::type_id::create("mon", this);
sqr = sequencer::type_id::create("sqr", this);
drv = driver_rb::type_id::create("drv", this);
endfunction
virtual function void connect_phase(uvm_phase phase);
super.connect_phase(phase);
mon.req_port.connect(agt_req_port);
drv.seq_item_port.connect(sqr.seq_item_export);
endfunction
endclass: agent_rb