我是OVM和Saola的新手。谁能解释
'ovm_do_with(a,{b=0})
实际上呢?
答案 0 :(得分:0)
`uvm_do_with(req, CONSTRAINT)
是宏。它扩展为
req = tx_type::type_id::create("req");
start_item(req);
if( !req.randomize() with CONSTRAINT ) `uvm_error(...)
finish_item(req);
所以
'ovm_do_with(a,{b=0})
扩展到
a = tx_type::type_id::create("a");
start_item(a);
if( !a.randomize() with {b=0}) `uvm_error(...)
finish_item(a);