-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathahb_apb_bridge_base_test.sv
32 lines (22 loc) · 1.28 KB
/
ahb_apb_bridge_base_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
class ahb_apb_bridge_base_test extends uvm_test;
`uvm_component_utils (ahb_apb_bridge_base_test)
ahb_apb_bridge_env_config env_config_h;
ahb_apb_bridge_environment environment_h;
function new(string name = "ahb_apb_base_test",uvm_component parent = null);
super.new(name, parent);
endfunction
function void build_phase(uvm_phase phase);
env_config_h = ahb_apb_bridge_env_config::type_id::create("env_config_h");
uvm_config_db #(ahb_apb_bridge_env_config)::set(this,"*","ahb_apb_bridge_env_config",env_config_h);
if(!uvm_config_db #(virtual ahb_interface)::get(this,"","ahb_vif",env_config_h.ahb_vif))
`uvm_fatal (get_type_name,"cannot get () ahb_interface - ahb_vif from uvm_config_db");
if(!uvm_config_db #(virtual apb_interface)::get(this,"","apb_vif",env_config_h.apb_vif))
`uvm_fatal (get_type_name,"cannot get () apb_interface - apb_vif from uvm_config_db");
env_config_h.has_ahb_agent = 1;
env_config_h.has_apb_agent = 1;
env_config_h.has_scoreboard = 1;
env_config_h.ahb_agent_is_active = UVM_ACTIVE;
env_config_h.apb_agent_is_active = UVM_ACTIVE;
environment_h = ahb_apb_bridge_environment::type_id::create("env_h",this);
endfunction
endclass