Transaction及field_automation Transaction是整个验证平台中流动的信息单元。Sequence产生出transaction,通过sequencer把此transaction转交给driver,driver根据此transaction的信息驱动接口信号。Monitor监测接口数据,并把数据封装成transaction的形式传递给reference model或者scoreboard。
Field_automation机制的使用: uvm_object_utils_begin(mac_transaction)
uvm_field_int(dmdc,UVM_ALL_ON) ……… `uvm_object_utils_end Uvm_field_*系列宏有以下几种: Uvm_field_array_A表示动态数组,A表示动态数组中存放的内容的类型, Uvm_field_sarray_A表示静态数组 Uvm_field_queue_A表示的是队列 Uvm_field_aa_A_B表示联合数组,A表示联合数组中存放的内容类型,B表示联合数组的索引类型。 ARG表示transaction中定义的变量名字,FLAG表示标志位。包括 UVM_ALL_ON:表示打开copy、compare、PRint、record、pack功能。 UVM_COPY:表示copy UVM_NOCOPY:表示no_copy UVM_COMPARE:表示compare UVM_NOCOMPARE:表示no_compare UVM_PRINT:表示print UVM_NOPRINT:表示no_print UVM_PACK:表示pack UVM_NOPACK:表示no_pack UVM_RECORD:表示record UVM_NORECORD:表示no_record
Mac_transaction tr; tr::constraint_mode(0);关闭所有的约束 或者tr.default_cons::constraint_mode(0),关闭特定的约束。
在uvm_field_*宏前后使用if语句
新闻热点
疑难解答