-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapb_env.sv
More file actions
39 lines (30 loc) · 1.09 KB
/
apb_env.sv
File metadata and controls
39 lines (30 loc) · 1.09 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
38
39
`include "apb_agent.sv"
`include "apb_scoreboard.sv"
class apb_env extends uvm_env;
//---------------------------------------
// agent and scoreboard instance
//---------------------------------------
apb_agent agent;
apb_scoreboard scb;
`uvm_component_utils(apb_env)
//---------------------------------------
// constructor
//---------------------------------------
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
//---------------------------------------
// build_phase - crate the components
//---------------------------------------
function void build_phase(uvm_phase phase);
super.build_phase(phase);
agent = apb_agent::type_id::create("agent", this);
scb = apb_scoreboard::type_id::create("scb", this);
endfunction
//---------------------------------------
// connect_phase - connecting monitor and scoreboard port
//---------------------------------------
function void connect_phase(uvm_phase phase);
agent.monitor.item_collected_port.connect(scb.item_collected_export);
endfunction
endclass