-1

I'm new to OVM and Saola. Can anyone explain what does

'ovm_do_with(a,{b=0}) actually does?

  • I only know about UVM, not OVM. I would imagine my answer is valid for OVM as well as UVM given the similarity, but you need to check this. – Matthew Taylor Jan 03 '19 at 08:29

1 Answers1

0
`uvm_do_with(req, CONSTRAINT) 

is a macro. It expands to

req = tx_type::type_id::create("req");
start_item(req);
if( !req.randomize() with CONSTRAINT ) `uvm_error(...)
finish_item(req);

So

'ovm_do_with(a,{b=0})

expands to

a = tx_type::type_id::create("a");
start_item(a);
if( !a.randomize() with {b=0}) `uvm_error(...)
finish_item(a);
Matthew Taylor
  • 13,365
  • 3
  • 17
  • 44