这里使用uvm_object_utils_begin和uvm_object_utils_end来实现my_transaction的factory注册,在这两个宏中间,使用uvm_field宏注册所有字段。uvm_field系列宏随着transaction成员变量的不同而不同,如上面的定义中出现了针对bit类型的uvm_field_int及针对 byte类型动态数组的uvm_field_array_int。 当使用上述宏注册之后,可...
`uvm_object_utils_begin(my_transaction) `uvm_field_int(dmac, UVM_ALL_ON) `uvm_field_int(smac, UVM_ALL_ON) `uvm_field_int(ether_type, UVM_ALL_ON) `uvm_field_array_int(pload, UVM_ALL_ON) `uvm_field_int(crc, UVM_ALL_ON) `uvm_object_utils_end function new(string name = "my_...
UVM field automation机制是为了方便用户对事务进行打印、复制、打包、解压、比较、记录等一系列功能而建立的一套服务机制。简单的来说就是可使用UVM内建的函数对事务进行处理。3.3.2. uvm_field宏注册几种常用的宏:`uvm_object_utils_begin (my transaction) //对于object类型 //`uvm_component_utils begin (my...
`uvm_object_utils_begin(my_transaction) `uvm_field_int(dmac,UVM_ALL_ON) `uvm_field_int(smac,UVM_ALL_ON) `uvm_object_utils_end endclass //***interface ***// interface my_if (input clk,input rst_n); logic [7:0] dat ; logic dat_vld; endinterface //***driver ***// class m...
(my_transaction)31 `uvm_field_int(dmac,UVM_ALL_ON)32 `uvm_field_int(smac,UVM_ALL_ON)33 `uvm_field_int(ether_type,UVM_ALL_ON)34 `uvm_field_array_int(pload,UVM_ALL_ON)35 `uvm_field_int(crc,UVM_ALL_ON)36 `uvm_object_utils_end37 38 function new(string name = "my_transaction"...
// Which PSEL is the monitor connected to logic[31:0] start_address[15:0]; logic[31:0] range[15:0]; //--- // Methods //--- // Standard UVM Methods: extern function new(string name = "apb_agent_config");endclass: apb_agent_config function apb_agent_config::new(string name...
这里使用uvm_object_utils_begin和uvm_object_utils_end来实现my_transaction的factory注册,在这两个宏中间,使用uvm_field宏注册所有字段。uvm_field系列宏随着transaction成员变量的不同而不同,如上面的定义中出现了针对bit类型的uvm_field_int及针对byte类型动态数组的uvm_field_array_int。3.3.1节列出了所有的uvm_...
UVM_TIME Print/record the field in time format typedef enum {FALSE, TRUE} e_bool; class Child extends uvm_object; string m_name; logic[3:0] m_age; `uvm_object_utils_begin(Child) `uvm_field_string (m_name, UVM_ALL_ON) `uvm_field_int (m_age, UVM_ALL_ON) `uvm_object_utils_en...
do_record() 方法的目的是将数据对象看作波形 GUI 中的事务。与打印数据对象方法一样,其原理是记录的字段能够在事务查看器中查看。do_record() 方法中使用的 `uvm_record_field 宏的底层实现是与仿真器有关,例如对于 Questa 仿真器使用 $add_attribute() 系统调用: ...
field_name是给资源的名称。 value保存从数据库检索到的实际值或引用;如果检索成功,get()调用返回1,否则返回0来表示数据库中不存在这种类型且具有这种作用域名称的资源。 从配置数据库中获取虚接口的示例如下: class test extends uvm_test; ... function void build_phase( uvm_phase phase ); ... if( !uv...