Table of Contents
Heartbeats provide a way for environments to easily ensure that their descendants are alive. or in other words, the uvm_heart beat catches the deadlock or hang states of the verification components.
How uvm_heartbeat work?
UVM_heartbeat watches for an activity in the test bench and if it finds that there is no activity in the specified interval of time, then uvm_heratbeat issue a fatal message which leads to the end of the simulation.
What are the benefits of using the uvm_heartbeat?
As mentioned earlier uvm_heartbeat identifies the simulation hang situation and terminates the run,
- which will help in identifying the component which is cause for deadlock
- saves the simulation time and releases the resources by early termination of simulation
How to use the uvm_heartbeat?
It involves the below steps,
- Create the heart_beat object
- Set the components to be monitored
- trigger the heartbeat monitor
To make the above steps easy, the uvm_heartbeat has a set of inbuilt methods.
- Creates a new heartbeat instance associated with cntxt.
- The cntxt is the hierarchy of components to be monitored.
- The object of uvm_objections_callback type
This method sets a list of objects to be watched at event e.
This method call Sets or retrieves the heartbeat mode.
the mode shall be,
UVM_ALL_ACTIVE – all components
UVM_ONE_ACTIVE – exactly one component
UVM_ANY_ACTIVE – any component
The add method Adds a single component to the set of components to be monitored.
The Remove method removes a single component from the set of components being monitored.
Calling the start method Starts the heartbeat monitor.