前言
【前端验证】通关寄存器与ral_model —— apb agent组件编写
完成组件编写后,进行下组件的环境自测。
自测环境
apb_scb
`ifndef __APB_SCB_SV__
`define __APB_SCB_SV__
class apb_scb extends uvm_scoreboard;
apb_transaction expect_q[$];
uvm_blocking_get_port #(apb_transaction) exp_port;
uvm_blocking_get_port #(apb_transaction) act_port;
`uvm_component_utils(apb_scb)
extern function new(string name, uvm_component parent = null);
extern virtual function void build_phase(uvm_phase phase);
extern virtual task run_phase(uvm_phase phase);
endclass
function apb_scb::new(string name, uvm_component parent = null);
super.new(name, parent);
endfunction: new
function void apb_scb::build_phase(uvm_phase phase);
super.build_phase(phase);
exp_port = new("exp_port", this)