当你完成寄存器模型的时候,你就会想到给后来的人一个接口,给他更多的扩展,让他做更多的事,一般而言,只有做VIP时,会想到做callbacks.
typedef class uvm_reg; typedef class uvm_mem; typedef class uvm_reg_backdoor; //------------------------------------------------------------------------------ // Title: Register Callbacks // // This section defines the base class used for all register callback // extensions. It also includes pre-defined callback extensions for use on // read-only and write-only registers. //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // Class: uvm_reg_cbs // // Facade class for field, register, memory and backdoor // access callback methods. //------------------------------------------------------------------------------ virtual class uvm_reg_cbs extends uvm_callback; function new(string name = "uvm_reg_cbs"); super.new(name); endfunction