-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheth_agent.sv
34 lines (27 loc) · 953 Bytes
/
eth_agent.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
30
31
32
33
34
class eth_agent extends uvm_agent;
//declaring agent components
eth_driver driver;
eth_sequencer sequencer;
eth_monitor monitor;
// UVM automation macros for general components
`uvm_component_utils(eth_agent)
// constructor
function new (string name, uvm_component parent);
super.new(name, parent);
endfunction : new
// build_phase
function void build_phase(uvm_phase phase);
super.build_phase(phase);
if(get_is_active() == UVM_ACTIVE) begin
driver = eth_driver::type_id::create("driver", this);
sequencer = eth_sequencer::type_id::create("sequencer", this);
end
monitor = eth_monitor::type_id::create("monitor", this);
endfunction : build_phase
// connect_phase
function void connect_phase(uvm_phase phase);
if(get_is_active() == UVM_ACTIVE) begin
driver.seq_item_port.connect(sequencer.seq_item_export);
end
endfunction : connect_phase
endclass : eth_agent