-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathring_test.sv
More file actions
58 lines (46 loc) · 2.28 KB
/
ring_test.sv
File metadata and controls
58 lines (46 loc) · 2.28 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
class ring_test extends uvm_test;
//--------------------------------------------------------------------------
`uvm_component_utils(ring_test)
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
function new(string name="ring_test",uvm_component parent);
super.new(name,parent);
endfunction
//--------------------------------------------------------------------------
ring_env env_h;
int file_h;
//--------------------------------------------------------------------------
function void build_phase(uvm_phase phase);
super.build_phase(phase);
env_h = ring_env::type_id::create("env_h",this);
endfunction
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
function void end_of_elobartion_phase(uvm_phase phase);
//factory.print();
$display("End of eleboration phase in agent");
endfunction
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
function void start_of_simulation_phase(uvm_phase phase);
$display("start_of_simulation_phase");
file_h=$fopen("LOG_FILE.log","w");
set_report_default_file_hier(file_h);
set_report_severity_action_hier(UVM_INFO,UVM_DISPLAY+UVM_LOG);
set_report_verbosity_level_hier(UVM_MEDIUM);
endfunction
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
task run_phase(uvm_phase phase);
ring_sequence seq;
reset_sequence rst_seq;
phase.raise_objection(this);
seq= ring_sequence::type_id::create("seq");
rst_seq= reset_sequence::type_id::create("rst_seq");
rst_seq.start(env_h.agent_h.sequencer_h);
seq.start(env_h.agent_h.sequencer_h);
#1000;
phase.drop_objection(this);
endtask
//--------------------------------------------------------------------------
endclass:ring_test