-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfifo_environment.sv
More file actions
29 lines (23 loc) · 937 Bytes
/
Copy pathfifo_environment.sv
File metadata and controls
29 lines (23 loc) · 937 Bytes
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 fifo_environment extends uvm_env;
fifo_agent agt;
fifo_sub coverage_h;
fifo_scoreboard scb;
`uvm_component_utils(fifo_environment)
function new(string name = "fifo_environment", uvm_component parent);
super.new(name, parent);
endfunction
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
agt = fifo_agent::type_id::create("agt", this);
coverage_h = fifo_sub::type_id::create("coverage_h", this);
scb = fifo_scoreboard::type_id::create("scb", this);
endfunction
virtual function void connect_phase(uvm_phase phase);
super.connect_phase(phase);
//monitor to coverage
agt.mon.item_got_port.connect(coverage_h.item_got_export1);
//monitor to scoreboard connection
agt.mon.item_got_port.connect(scb.item_got_export);
uvm_report_info("FIFO_ENVIRONMENT", "connect_phase, Connected monitor to scoreboard");
endfunction
endclass