Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Share a named UVM configuration event

Hardware interview practice

Share a named UVM configuration event

MediumSystemVerilog and UVMSystemVerilog

A producer and consumer are created independently but must rendezvous through the global UVM event pool after configuration is published. Write the two UVM tasks that publish and consume a version number without missing an early trigger.

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Starting point

Question code

class cfg_version_obj extends uvm_object; int unsigned version; endclass
task publish_cfg(int unsigned version);
task wait_cfg(output int unsigned version);
Reviewed example

Work through one case

Input
Start wait_cfg first, then call publish_cfg(7) using the shared global event.
Expected output
wait_cfg returns version = 7.

Both tasks resolve the same named event, and the trigger data carries the published version object to the waiter.

What to cover

Requirements

  1. Both tasks obtain the same uvm_event from uvm_event_pool::get_global_pool().get("cfg_done").
  2. publish_cfg creates cfg_version_obj, fills its version, and triggers the event once with that object.
  3. wait_cfg uses wait_on so a trigger that happened before the task began is still observed, then reads the stored trigger data.
  4. The producer never resets the event; only the test resets it between test cases after both tasks finish.
asic.fyi · Learn silicon end to end.info@asic.fyi