forked from praveenkhemalapure/DDR3-controller-verification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDDR3_CONTROLLER_test_lib.sv
64 lines (38 loc) · 1.57 KB
/
DDR3_CONTROLLER_test_lib.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
// This is DDR3_CONTROLLER_base_test class
class DDR3_CONTROLLER_base_test extends uvm_test;
`uvm_component_utils(DDR3_CONTROLLER_base_test)
DDR3_CONTROLLER_env env;
DDR3_CONTROLLER_MASTER_agent MASTER_agent;
DDR3_CONTROLLER_MASTER_seq config_seq;
// Class constructor
function new(string name = "DDR3_CONTROLLER_base_test", uvm_component parent);
super.new(name, parent);
endfunction : new
// UVM Build Phase
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
env = DDR3_CONTROLLER_env::type_id::create("env",this);
config_seq = DDR3_CONTROLLER_MASTER_seq :: type_id :: create ("config_seq",this);
$display("hello master");
endfunction : build_phase
virtual function void connect_phase(uvm_phase phase);
// lcd_score.DDR3_CONTROLLER_output_score_port.connect(lcd_score.moni_out.analysis_export);
endfunction : connect_phase
// UVM End_of_Elaboration Phase
virtual function void end_of_elaboration_phase(uvm_phase phase);
uvm_top.print_topology();
endfunction : end_of_elaboration_phase
// UVM Start_of_simulation Phase
virtual function void start_of_simulation_phase(uvm_phase phase);
uvm_test_done.set_drain_time(this,100ns);
endfunction : start_of_simulation_phase
// UVM Run Phase
virtual task run_phase(uvm_phase phase);
begin
phase.raise_objection(this);
config_seq.start(env.MASTER_agent.sequencer);
#1000000000;
phase.drop_objection(this);
end
endtask : run_phase
endclass : DDR3_CONTROLLER_base_test