-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathring_agent.sv
More file actions
37 lines (29 loc) · 1.55 KB
/
ring_agent.sv
File metadata and controls
37 lines (29 loc) · 1.55 KB
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 ring_agent extends uvm_agent;
//----------------------------------------------------------------------------
`uvm_component_utils(ring_agent)
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
function new(string name="ring_agent",uvm_component parent);
super.new(name,parent);
endfunction
//----------------------------------------------------------------------------
//----------------- class handles --------------------------------------------
ring_sequencer sequencer_h;
ring_driver driver_h;
ring_monitor monitor_h;
//----------------------------------------------------------------------------
//---------------------- build phase -----------------------------------------
function void build_phase(uvm_phase phase);
super.build_phase(phase);
driver_h = ring_driver::type_id::create("driver_h",this);
sequencer_h = ring_sequencer::type_id::create("sequencer_h",this);
monitor_h = ring_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:ring_agent