Random-Directed Low Power Coverage Methodology: Awashesh Kumar and Madhur Bhargava - Mentor, A Siemens Business
Random-Directed Low Power Coverage Methodology: Awashesh Kumar and Madhur Bhargava - Mentor, A Siemens Business
Random-Directed Low Power Coverage Methodology: Awashesh Kumar and Madhur Bhargava - Mentor, A Siemens Business
COVERAGE METHODOLOGY
W H I T E P A P E R
F U N C T I O N A L V E R I F I C A T I O N
w w w . m e n t o r . c o m
Random Directed Low Power Coverage Methodology
I. INTRODUCTION
With the advancement in the technology, low-power design and its verification is becoming more complex. Today’s
chips have multiple power domains each having multiple operating power modes and dynamically changing voltage
levels. The power architecture is controlled with help of a power management unit which issues proper control
sequences to different elements of the power architecture. It is important to ensure that all and proper test vectors are
generated by this unit to verify all power elements and it is even more important to verify the complex interactions
between these elements at a higher abstraction level. A plan to closure approach for low-power verification requires
coverage of power objects (all possible states and transitions). However power-aware coverage closure is hard and
complex in nature.
It is important to note that there is no standardized methodology for low-power coverage, as UPF 2.1 doesn’t
provide anything to address this. With the help of current UPF standards, verification engineers have taken the ad-
hoc approach to achieve coverage of some constructs and their interactions with each other e.g. power states etc.
One such technique is cross-coverage of power states. However it is prone to state explosions and it involves low
level intricate efforts to write the covergroups and coverbins for the cross-coverage. Verification engineer needs to
be well aware of the UPF to figure out the supplies and signals to track. Moreover this whole process is tedious and
dependent on verification tools and EDA vendors. The whole process is error prone and highly time consuming. So
a faster and more direct approach to address low power coverage is a need of the hour.
To keep pace with that, IEEE 1801 standard is expanding its gamut of constructs and commands to include more
scenarios of low-power verification and implementation. In this paper, we will discuss and propose a methodology
by which effective coverage of low-power verification can be achieved using UPF 3.0. With the help of relevant
examples and case studies we will also demonstrate that with the help of this methodology, coverage closure can be
achieved in a much more efficient way thereby significantly saving verification effort and time.
A. Power Intent Specification and Basic Concepts of UPF
IEEE Std 1801™-2015 Unified Power Format (UPF) allows designers to specify the power intent of the design. It is
based on Tcl and provides concepts and commands which are necessary to describe the power management
requirements for IPs or complete SoCs. A power intent specification in UPF is used throughout the design flow;
however it may be refined at various steps in the design cycle. Some of the important concepts and terminology used
in power intent specification are the following:
Power domain: A collection of HDL module instances and/or library cells that are treated as a group for
power management purposes. The instances of a power domain typically, but do not always, share a
primary supply set and typically are all in the same power state at a given time. This group of instances is
referred to as the extent of a power domain.
Power state: The state of a supply net, supply port, supply set, or power domain. It is an abstract
representation of the voltage and current characteristics of a power supply, and also an abstract
representation of the operating mode of the elements of a power domain or of a module instance (e.g., on,
off, sleep).
Isolation Cell: An instance that passes logic values during normal mode operation and clamps its output to
some specified logic value when a control signal is asserted. It is required when the driving logic supply is
switched off while the receiving logic supply is still on.
Level Shifter: An instance that translates signal values from an input voltage swing to a different output
voltage swing.
Retention: Enhanced functionality associated with selected sequential elements or a memory such that
memory values can be preserved during the power-down state of the primary supplies.
1
Random Directed Low Power Coverage Methodology
These kinds of questions are easily addressed by coverage-driven verification. But, it becomes a challenge to capture
the coverage information of UPF objects and power states due to following reasons:
Power states are written in an abstract manner in UPF, and
There is no pre-defined coverage metric to capture power states and their transitions.
The Unified Coverage Interoperability Standard (UCIS) defines various standard metrics related to
coverage items. However, it does not provide any metric to capture power intent (power states, etc.).
Tool-generated coverage metric are used widely for low-power verification. However they may not be useful or
exhaustive in all the designs, as highlighted by the reasons below:
A design can have a very specific requirement which is not being provided by the tool-generated coverage.
The low-power technology is still evolving and hence a new set of protocol appears every now and then,
which may require a different set of coverage that is not yet provided by the tool vendor.
These requirements can be easily met through SystemVerilog functional coverage features. The covergroup
construct of SystemVerilog samples the activities of a signal/property at desired sampling points and one can
distribute these sample points under different coverpoints and bins. These coverpoints and bins can be effectively
used to collect coverage numbers of power states and their transitions. Covergroups also offer a generous syntax to
handle a wide range of complex sampling scenarios especially the wildcard feature for handling state transitions
when multiple states are true at the same time.
Due to the above reasons the user may want to write custom coverage items using the System Verilog coverage
features. These items can be grouped in a checker module, and this checker module can be instantiated into the
design using UPF command “bind_checker”. However the method of instantiation of such a checker module is
not trivial because:
These low-power assertions/coverage items require access to power objects. However, at the early stages of
verification these power objects are only present in the UPF file and do not exist in the design. It is
therefore not straightforward to pass these UPF objects to a checker instance.
No clear way to describe coverpoints and bins to capture coverage of power states and their transitions
using the handles obtained
Some of the property-checking requires access to design/power signals spanning across multiple domains.
Such a task is highly error prone and time consuming.
As the scope and the inputs of these checkers instances are defined in UPF, any change in the UPF or
design might break these checkers and they need to be re-written.
We propose a modeling style using covergroups and UPF’s information model query commands command to
address these challenges.
With respect to the paper, HDL interface and the dynamic properties of the objects are more relevant. There are two
key concepts of information model which can be used to leverage it to develop a low power coverage methodology
which can be random in construction and directed in approach to target specific low power scenarios.
2
Random Directed Low Power Coverage Methodology
Table 1.
Type Name SV Representation
upfPdSsObjT struct {
upfHandleT handle;
upfPowerStateObjT current_state;
} upfPdSsObjT
upfPowerStateObjT struct {
upfHandleT handle;
upfBooleanT is_active;
} upfPowerStateObjT
upfBooleanObjT struct {
upfHandleT handle;
upfBooleanT current_value;
} upfBooleanObjT
upfBooleanObjT struct {
upfHandleT handle;
upfSupplyTypeT current_value;
} upfSupplyObjT
In the Table 1 above the field representing the dynamic property of the object has been highlighted in bold. E.g. for
a power domain or supply set the associated dynamic property is the current power state of the power domain which
is represented by the current_state field of the struct in SV native representation of upfPdSsObjT type. The other
field is a handle to the low power object which has all the static information about the object e.g. object name, its
creation scope, file/line information etc.
Following table 2 summarizes the UPF 3.0 information model objects with native HDL information. The HDL types
defined in table 1 are used to represent the dynamic properties of these objects.
Table 2
Low Power Object Type Dynamic Property Low Power Idea Native HDL Type
Represented
upfPowerDomainT current_state Current power state upfPdSsObjT
upfSupplySetT current_state Current power state upfPdSsObjT
upfCompositeDomainT current_state Current power state upfPdSsObjT
upfPstStateT is_active Is the PST currently active upfPowerStateObjT
upfPowerStateT is_active Is the power state currently upfPowerStateObjT
active
upfAckPortT current_value Logic value at the port upfBooleanObjT
upfExpressionT current_value Value of the expression upfBooleanObjT
upfLogicNetT current_value Logic value of the net upfBooleanObjT
upfLogicPortT current_value Logic value of the port upfBooleanObjT
upfSupplyNetT current_value Value of the supply net upfSupplyObjT
upfSupplyPortT current_value Value of the supply port upfSupplyObjT
3
Random Directed Low Power Coverage Methodology
1. HDL access functions – These are the basic functions to access the low power objects and properties. E.g.
following access function can be used to get the handle of an object.
upfHandleT ps = upf_get_handle_by_name("/top/dut_i/pd.power_state_on")
upfHandleT ps_active_hndl = upf_query_object_properties(ps, UPF_IS_ACTIVE )
integer ps_on_value = upf_get_value_real(ps_active_hndl)
3. Immediate write access HDL functions: Some objects of the information model allow the immediate write
access only if they don’t have an existing driver. This allows the manipulated of low power objects from
testbench or simulation model. E.g. supply_on(“supply_net_name”, value). Following objects which allow
immediate write access
a. upfPowerStateT
b. upfLogicNetT
c. upfLogicPortT
d. upfSupplyNetT
e. upfSupplyPortT
In the context of this paper write access functions are not much relevant, although they are a powerful tool for
users to manipulate low power objects during simulation from testbench.
4. Continuous access HDL functions – These functions enable continuous monitoring of dynamic values of an
object in the information model. It enables user to trigger an always block or process statement using
dynamic values of the low power objects.
5. Utility functions: These functions are general utility function to assist users.
E.g. upfClassIdE upf_query_object_type(upfHandleT handle) – returns the type of a handle, using this user
can find out if the object is a power domain, supply set or some other low power object
The proposed coverage methodology involves getting the handle of low-power object in HDL using the information
model and querying the properties of that object. These properties are then further passed to the coverage module as port
mapping. The coverage module has the covergroups/coverbins to represent the coverage data of low-power strategies of
that domain or dynamic information like the current power state of the domain can be queried in testbench.
4
Random Directed Low Power Coverage Methodology
2. Dynamic property(value) of low power object: Get the dynamic value of the property of interest e.g. user
might be interested in knowing the current power state of a power domain and he intends to check the state
of this power domain w.r.t. the current power state of some other power domain. Also user may use UPF
3.0 continuous access HDL package function to continually monitor the power state of the power domain
and may use assertions for the cases of interest/anomaly.
upfPdSsObjT pd_hdl;
upf_create_object_mirror(“/tb/dut/pd”, “pd”);
upfPowerStateObjT pwr_state = pd.current_state;
upfHandleT pd_name = upf_query_object_properties(pd.handle, UPF_NAME);
upfHandleT state_name = upf_query_object_properties(pwr_state.handle,UPF_NAME);
always@(pd)
$display( "Power domain %s, is in Power State: %s,
upf_get_value_str(pd_name), upf_get_value_str(state_name));
3. Coverage details: Once we have the handle of a low-power object and its dynamic value it is further passed
to a coverage module. The coverage module can be modeled in system Verilog and compiled together with
the design. This module is instantiated in the testbench. The low-power object extracted from information
model and its dynamic properties are passed in the interface of this coverage instance. We can instantiate
as many coverage instances as required.
o Coverage properties (covergroups/coverpoints) are defined inside this coverage module to
calculate the coverage metrics.
Following is an example how a user can get the isolation control of a signal without going deep into UPF to find the
isolation control. This is further passed onto a coverage module to calculate coverage. We first describe the coverage
module which is used to calculate coverage of isolation control. This coverage module is written separately and
compiled together with the design.
UPF
5
Random Directed Low Power Coverage Methodology
Coverage module
The above covergroup contains two coverpoint; ACTIVE_LEVEL is reached when the isolation control is “1” and
ACTIVE_LOW is reached when isolation control is “0”.
Following is the hdl code which has to be modeled in the testbench. The first step is to get the handle of isolation
strategy and thus its isolation control. Next is to monitor the value of isolation control. We can instantiate multiple
coverage instances for each isolation strategy and pass the value of isolation control to these coverage instances.
Let’s consider the following example where we have a camera domain (PD_CAMERA) with three power states
“ON, SLEEP, OFF” and a video domain (PD_VIDEO) with three power states “ON, SLEEP, OFF”. These power
state definitions are defined in UPF using the “add_power_state” command.
add_power_state PD_CAMERA \
-state ON {-logic_expr {primary == ON} } }
…
First step is to extract the handles of power states of PD_CAMERA and get the state variable for these states which
gets active when the particular power state is high. This is achieved with following Information model API calls
defined in testbench. These state variable are then passed on to the coverage instance.
6
Random Directed Low Power Coverage Methodology
These state variables state_ON, state_OFF, state_SLEEP are used to collect state coverage information. In order to
collect transition coverage information we define an array with state variables as elements; we call this an array
transition variable. Any change in any of the state variables will trigger a clock which will act as the sampling event
for state and transition coverage. State determining logic in our sample example looks like:
Coverage module
always @(cov_clk)
cov_clk = 1'b0;
endmodule
We define covergroups for state and transition coverage. The covergroup modeling of the state coverage has a
number of coverpoints that sample the state variables. The covergroup modeling of the transition coverage has a
coverpoint with bins that sample various transitions of the transition variable. State and transition covergroups for
our simple example appear as follows:
7
Random Directed Low Power Coverage Methodology
}
SLEEP: coverpoint state_SLEEP
{
bins ACTIVE = (0=>1);
}
……
endgroup
In the above example defined in section B, there could be a requirement that the combination of state ON for
PD_CAMERA and state ON for PD_VIDEO cannot be true at the same time. This can be checked easily using the
proposed coverage methodology approach.
We can define an assertion module instead of a coverage module and create an instance of this module in testbench.
Assertion Module
always @(cov_clk)
cov_clk = 1'b0;
always@(posedge cov_clk)
assert (state_ON_CAMERA != state_ON_VIDEO) else $error(“Camera and
Video both on at same time”);
endmodule
Verifications engineers can use the proposed verification approach to achieve an early low-power coverage closure.
It is possible to do a directed scenario testing using this methodology. For example user can write a custom assertion
or property to check if two domains should be in a mutually exclusive state by using UPF 3.0 information model
immediate read access function. Since the methodology relies on UPF constructs, so it is consistent and usable across
different vendor tools. Even without detailed knowledge of complex UPF constructs and semantics, verification
engineers can write various directed verification scenarios to achieve low-power coverage closure. The proposed
approach can be easily scaled to bigger and more complex low power design scenarios. The proposed approach can
be compared with approach mentioned in [4] where the verification engineer needs to be aware of the low level
details like supplies and logic values of constituents of supply and logic expressions of power states. Whereas in the
examples presented above such low level details are not required. In the same way cross coverage of power states as
mentioned in [3] can be easily mapped to current approach.
8
Random Directed Low Power Coverage Methodology
The current approach mentioned in this paper is versatile and robust however it lacks few fundamental things like
ability to access analog/mixed-signal parameters from onboard regulators & voltage sources – as these are not part
of the HDL or UPF. However it is an important part of the design and cannot be ignored.
VIII.. CONCLUSION
The complexities in low power verification have greatly increased. Any ad-hoc approach is not likely to succeed and
will result in incomplete verification. In this paper, we proposed a methodology for low-power coverage of the
design using the UPF 3.0 HDL package functions. This methodology will help achieve verification closure in
significantly less time. We presented case studies and examples to elaborate the usage of the UPF 3.0 HDL package
functions with SystemVerilog coverage constructs like covergroups and coverpoints to achieve the coverage of
some key design failure scenarios of a low power design. This paper elaborated on the benefits of using the proposed
approach over other conventional approaches. The paper also touched briefly on the future work and challenges in
using the proposed method.
IX. REFERENCES
[1] IEEE Std 1801™-2015 for Design and Verification of Low Power Integrated Circuits. IEEE Computer Society, 05 Dec 2015.
[2] “Amit Srivastava, Awashesh Kumar”, PA-APIs: Looking beyond power intent specification formats, DVCon USA 2015
[3] “Veeresh Vikram Singh, Awashesh Kumar”, Cross Coverage of Power States, DVCon USA 2016
[4] “Pankaj Kumar Dwivedi, Amit Srivastava, Veeresh Vikram Singh”, Let’s DisCOVER Power States, DVCon USA 2015
This paper was previously presented at DVCon 2017, San Jose, CA.