-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapb_wr_rd_test.sv
More file actions
54 lines (45 loc) · 1.62 KB
/
Copy pathapb_wr_rd_test.sv
File metadata and controls
54 lines (45 loc) · 1.62 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
class apb_wr_rd_test extends apb_base_test;
//======================
// Factory registeration
//======================
`uvm_component_utils(apb_wr_rd_test)
//======================
// Constructor
//======================
function new(string name = "apb_wr_rd_test" , uvm_component parent="apb_base_test");
super.new(name , parent);
endfunction
//======================
// sequence handle
//======================
apb_master_seq apb_seq;
//======================
// Config class handle
//======================
apb_config apb_cfg;
//======================
// Build phase
//======================
function void build_phase(uvm_phase phase);
super.build_phase(phase);
`uvm_info(get_type_name() , "_________Starting Build Phase_________" , UVM_MEDIUM)
apb_seq = apb_master_seq::type_id::create("apb_seq");
if(!uvm_config_db#(apb_config)::get(null , "" , "apb_cfg" , apb_cfg)) begin
`uvm_fatal(get_type_name() , "Failed to recieve apb configuration")
end
else begin
`uvm_info(get_type_name() , "apb configuration successfully received" , UVM_HIGH);
end
`uvm_info(get_type_name() , "_________Ending Build Phase_________" , UVM_MEDIUM)
endfunction
//======================
// Main phase
//======================
virtual task main_phase(uvm_phase phase);
//uvm_objection objection = phase.get_objection();
phase.raise_objection(this);
apb_seq.start(env.apb_agnt.master_sequencer);
phase.drop_objection(this);
//objection.display_objections();
endtask
endclass