-
Notifications
You must be signed in to change notification settings - Fork 1
/
add_sub_agent.sv
37 lines (29 loc) · 1.58 KB
/
add_sub_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
35
36
37
class add_sub_agent extends uvm_agent;
//----------------------------------------------------------------------------
`uvm_component_utils(add_sub_agent)
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
function new(string name="add_sub_agent",uvm_component parent);
super.new(name,parent);
endfunction
//----------------------------------------------------------------------------
//----------------- class handles --------------------------------------------
add_sub_sequencer sequencer_h;
add_sub_driver driver_h;
add_sub_monitor monitor_h;
//----------------------------------------------------------------------------
//---------------------- build phase -----------------------------------------
function void build_phase(uvm_phase phase);
super.build_phase(phase);
driver_h = add_sub_driver::type_id::create("driver_h",this);
sequencer_h = add_sub_sequencer::type_id::create("sequencer_h",this);
monitor_h = add_sub_monitor::type_id::create("monitor_h",this);
endfunction
//----------------------------------------------------------------------------
//----------------------- connect phase --------------------------------------
function void connect_phase(uvm_phase phase);
super.connect_phase(phase);
driver_h.seq_item_port.connect(sequencer_h.seq_item_export);
endfunction
//----------------------------------------------------------------------------
endclass:add_sub_agent