-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapb_test.sv
64 lines (35 loc) · 1.03 KB
/
apb_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
62
63
64
package test;
`include "uvm_macros.svh"
`include"apb_env.sv"
import trans::*;
import uvm_pkg::*;
class apb_test extends uvm_test;
`uvm_component_utils(apb_test);
apb_env env;
//apb_sequence seq;
apb_config cfg;
virtual itf vif;
function new (string name = "test",uvm_component parent);
super.new(name,parent);
endfunction
function void build_phase(uvm_phase phase);
super.build_phase(phase);
env=apb_env::type_id::create("env",this);
cfg = apb_config::type_id::create("config");
if(!uvm_config_db#(virtual itf)::get(this,"*","VIF",vif))
`uvm_fatal("TEST","VIF");
cfg.vif=vif;
cfg.is_active=UVM_ACTIVE;
cfg.has_scoreboard=1;
cfg.has_coverage=1;
uvm_config_db#(apb_config)::set(this,"env","cfg",cfg);
endfunction
/*task run_phase(uvm_phase phase);
super.run_phase(phase);
seq= apb_sequence::type_id::create("seq");
phase.raise_objection(this,"CONNECT THE SEQUENCE");
seq.start(env.agt.seq);
phase.drop_objection(this,"CONNECTED");
endtask*/
endclass
endpackage