-
Notifications
You must be signed in to change notification settings - Fork 1
/
add_sub_test.sv
61 lines (51 loc) · 2.44 KB
/
add_sub_test.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
class add_sub_test extends uvm_test;
//--------------------------------------------------------------------------
`uvm_component_utils(add_sub_test)
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
function new(string name="add_sub_test",uvm_component parent);
super.new(name,parent);
endfunction
//--------------------------------------------------------------------------
add_sub_env env_h;
int file_h;
//--------------------------------------------------------------------------
function void build_phase(uvm_phase phase);
super.build_phase(phase);
env_h = add_sub_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);
add_sub_sequence seq;
add_only seq2;
sub_only seq3;
phase.raise_objection(this);
seq= add_sub_sequence::type_id::create("seq");
seq2=add_only::type_id::create("seq2");
seq3=sub_only::type_id::create("seq3");
seq2.N=40;
seq3.N=40;
seq.start(env_h.agent_h.sequencer_h);
seq2.start(env_h.agent_h.sequencer_h);
seq3.start(env_h.agent_h.sequencer_h);
#10;
phase.drop_objection(this);
endtask
//--------------------------------------------------------------------------
endclass:add_sub_test