|
楼主 |
发表于 2013-4-18 08:44:59
|
显示全部楼层
test的代码:
- `include "tb.sv"
- class base_test extends uvm_test;
- `uvm_component_utils(base_test)
- tb tb0;
- vsequencer vsqr;
- function new(string name="base_test",uvm_component parent);
- super.new(name,parent);
- endfunction:new
- virtual function void build_phase(uvm_phase phase);
- super.build_phase(phase);
- tb0 = tb::type_id::create("tb0",this);
- vsqr = vsequencer::type_id::create("vsqr",this);
- //uvm_config_int::set(this,"tb0.apb0.bus_monitor","coverage_enable",0);
- uvm_config_db#(uvm_object_wrapper)::set(this,"vsqr.run_phase","default_sequence",apb_vdo_seq::type_id::get());
- endfunction : build_phase
- virtual function void connect_phase(uvm_phase phase);
- vsqr.apb_sqr=tb0.apb0.master.sequencer;
- vsqr.vdo_sqr=tb0.vdo0.master.sequencer;
- vsqr.regmodel=tb0.regmodel;
- endfunction : connect_phase
- virtual task run_phase(uvm_phase phase);
- endtask : run_phase
- endclass : base_test
复制代码 |
|