|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
新手上路,自学《UVM实战》的3.3.4时,书中写filed_automation宏可以if-else结合使用,示例如下:
`uvm_object_utils_begin(my_transaction)
`uvm_field_int(dmac, UVM_ALL_ON)
`uvm_field_int(smac, UVM_ALL_ON)
if(is_vlan)begin
`uvm_field_int(vlan_info1, UVM_ALL_ON)
`uvm_field_int(vlan_info2, UVM_ALL_ON)
`uvm_field_int(vlan_info3, UVM_ALL_ON)
`uvm_field_int(vlan_info4, UVM_ALL_ON)
end
`uvm_field_int(vlan_info1, UVM_ALL_ON)
`uvm_field_int(vlan_info2, UVM_ALL_ON)
// ...
`uvm_object_utils_end
不过本人在仿真(用的是UVM-1.2)时,却发现driver收不到if-else块中变量(is_vlan为1),请问在UVM-1.1或者UVM-1.2中filed_automation宏可以if-else结合使用吗?请各位高手不吝赐教!!! |
|