Low-Power Scenario Basics
Verify power-state transitions, isolation, retention, reset interaction, and safe recovery in a reusable UVM environment.
Learning objectives
- Explain why low-power behavior requires scenario-level verification rather than only steady-state checking.
- Model power-state transitions explicitly in a UVM test environment.
- Distinguish power control, isolation, retention, and reset responsibilities.
- Determine which transactions are legal before, during, and after a power-state transition.
- Verify that retained and non-retained state behaves according to the specification.
- Make scoreboards, predictors, monitors, and sequences aware of power-state transitions.
- Verify wake-up and recovery without allowing stale expectations to create false failures.
Step 1: Understand the verification problem
Low-power verification is not simply checking whether a signal called power_down changes value. A power transition changes the conditions under which the rest of the environment can safely generate, observe, and compare transactions.
A simplified scenario might look like this:
ACTIVE
|
| request low-power entry
v
QUIESCING
|
| outstanding activity drained
v
LOW_POWER
|
| wake request
v
RESTORING
|
| reset/recovery complete
v
ACTIVE
The exact states and signals depend on the design. Some systems have multiple low-power modes, separate power domains, retention controls, isolation controls, or power-management handshakes.
The verification environment therefore needs to answer:
- When does the DUT enter the low-power state?
- What activity must stop before entry?
- Which state is retained?
- Which state is expected to reset or become invalid?
- Which interfaces remain usable?
- What happens to interrupts?
- What happens to outstanding transactions?
- What must happen before normal checking resumes?
Step 2: Separate the major low-power concepts
Several concepts are often mixed together but should be verified separately.
| Concept | Verification question |
|---|---|
| Power control | Did the intended power state transition occur? |
| Isolation | Are signals crossing a powered-down boundary driven to the required safe values? |
| Retention | Did state that should survive the transition remain intact? |
| Reset | Which state is reset or reinitialized during entry or wake-up? |
| Wake-up | Does the domain return to a usable state in the required order? |
| Protocol availability | Which transactions are legal in each power state? |
These concepts interact, but keeping them conceptually separate makes failures easier to diagnose.
Step 3: Define a power-state model
A reusable environment benefits from an explicit representation of the current power state.
typedef enum {
POWER_ACTIVE,
POWER_ENTERING_LOW,
POWER_LOW,
POWER_WAKING
} power_state_e;
class power_state_tracker extends uvm_component;
`uvm_component_utils(power_state_tracker)
power_state_e state = POWER_ACTIVE;
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
function void set_state(power_state_e new_state);
state = new_state;
`uvm_info("POWER_STATE",
$sformatf("Power state changed to %s",
new_state.name()),
UVM_MEDIUM)
endfunction
endclass
This tracker does not make the DUT's state correct. It records the verification environment's interpretation of the state so that other components can make appropriate decisions.
The state transition should be driven by actual observable evidence or an explicit power-management protocol, rather than by a testbench variable changing arbitrarily.
Step 4: Make power transitions observable
If the design exposes power-management signals, create a monitor or dedicated power-management agent to observe them.
class power_event extends uvm_sequence_item;
`uvm_object_utils(power_event)
power_state_e state;
time timestamp;
function new(string name = "power_event");
super.new(name);
endfunction
endclass
class power_monitor extends uvm_monitor;
`uvm_component_utils(power_monitor)
virtual power_if vif;
uvm_analysis_port #(power_event) analysis_port;
function new(string name, uvm_component parent);
super.new(name, parent);
analysis_port = new("analysis_port", this);
endfunction
task run_phase(uvm_phase phase);
power_event item;
forever begin
@(posedge vif.clk);
// Replace this example transition logic with the DUT's
// actual power-management protocol.
if (vif.low_power_active) begin
item = power_event::type_id::create("item");
item.state = POWER_LOW;
item.timestamp = $time;
analysis_port.write(item);
end
end
endtask
endclass
The monitor should publish meaningful state transitions rather than forcing every consumer to interpret raw power-control signals independently.
sleep_req may mean that entry was requested, not that the DUT has successfully entered the low-power state. If the design provides a completion or acknowledge indication, use it to establish the actual transition boundary.
Step 5: Coordinate the scenario explicitly
Low-power scenarios usually involve more than one interface. A virtual sequence is therefore a natural place to coordinate the scenario.
class low_power_vseq extends uvm_sequence;
`uvm_object_utils(low_power_vseq)
bus_sequence bus_seq;
function new(string name = "low_power_vseq");
super.new(name);
endfunction
task body();
// 1. Configure the DUT.
configure_device();
// 2. Generate normal traffic.
start_normal_activity();
// 3. Request low-power entry.
request_low_power();
// 4. Wait for observable entry completion.
wait_for_low_power_state();
// 5. Verify low-power behavior.
check_low_power_state();
// 6. Request wake-up.
request_wakeup();
// 7. Wait for recovery.
wait_for_active_state();
// 8. Resume normal traffic.
start_post_wakeup_activity();
endtask
endclass
The sequence expresses scenario intent. The individual bus, interrupt, and power agents remain responsible for their respective protocols.
This follows the environment-layering principles from Lesson 54: coordinate relationships at the layer that owns the scenario rather than reaching into child-agent internals.
Step 6: Handle outstanding transactions before power-down
One of the most important questions is what happens to transactions already in flight.
Transaction A ---------------------> response
|
+-- power-down request
|
v
What happens?
Possible specifications include:
- all transactions must complete before entry;
- transactions are canceled;
- transactions survive the power transition;
- transactions receive an error response; or
- the interface blocks new requests but permits existing work to finish.
The scoreboard must use the same semantics as the DUT.
For example, if power-down legally cancels all outstanding operations, clearing the scoreboard's expectations at the power-state boundary may be correct. If transactions survive, clearing them would hide a real failure.
Step 7: Verify isolation behavior
When a powered-down domain communicates with another domain, isolation may be required to prevent invalid or uncontrolled values from propagating across the boundary.
Powered domain A
|
| signals
v
Isolation logic
|
v
Powered domain B
If the specification requires a signal to be forced to a safe value while isolation is active, this is often an excellent candidate for an assertion.
ap_isolated_output:
assert property (
@(posedge clk)
isolation_enable |-> output_signal == SAFE_VALUE
)
else
`uvm_error("POWER_ISO",
"Output violated required isolation value");
The exact property must match the timing and semantics of the design. For asynchronous isolation controls, the verification strategy may need a different clocking or event model.
Step 8: Verify retained state
Retention means that selected state is expected to survive a power transition. The verification environment should capture the state before the transition and compare it with the state after recovery.
Before low power
|
v
Read/capture retained state
|
v
Enter low power
|
v
Wake up
|
v
Read state again
|
v
Compare with retained expectation
For a register-based example, the RAL model introduced in Lesson 56 can be useful for accessing the relevant registers.
uvm_status_e status;
uvm_reg_data_t before;
uvm_reg_data_t after;
reg_model.RETAINED_CFG.read(
status,
before,
UVM_FRONTDOOR
);
// Enter low-power state and wake up.
reg_model.RETAINED_CFG.read(
status,
after,
UVM_FRONTDOOR
);
if (after !== before)
`uvm_error("RETENTION",
$sformatf(
"Retained register changed: before=%0h after=%0h",
before, after));
Do not assume every register should retain its value. Retention is a specification property, not a universal property of low-power designs.
Step 9: Verify non-retained and reset state separately
Retention checking alone is not enough. Some state is deliberately lost or reset during a power transition.
For example:
State before power-down
|
+---- retained state ----> must survive
|
+---- non-retained state -> expected reset/default value
Use the register specification to classify the expected state after wake-up.
| State type | Expected after wake-up |
|---|---|
| Retained | Preserved according to specification. |
| Reset state | Returns to the defined reset value. |
| Reinitialized state | Set by wake-up or software initialization. |
| Undefined state | Must not be compared as though a deterministic value were required. |
This prevents a common checker mistake: treating every post-wakeup value different from its pre-power-down value as a failure.
Step 10: Verify interrupt behavior across power states
Lesson 58 introduced interrupt verification. Low-power transitions add another dimension: what happens to interrupts while the domain is entering, sleeping, or waking?
Possible requirements include:
- interrupts are masked before power-down;
- pending interrupts are cleared;
- an interrupt can wake the domain;
- interrupt status is retained;
- interrupt status is reset; or
- interrupt outputs are isolated during low power.
The environment should explicitly verify whichever behavior the specification defines.
Power state
|
+---- ACTIVE ------> normal interrupt behavior
|
+---- ENTERING ----> transition-specific behavior
|
+---- LOW ----------> masked/isolated/wake-capable behavior
|
+---- WAKING -------> recovery behavior
This is a good example of why the power state should be available as context to the interrupt checker.
Step 11: Define legal traffic in each state
A low-power test should not blindly continue generating normal traffic while the DUT is unavailable.
| Power state | Example legal activity | Example illegal activity |
|---|---|---|
| ACTIVE | Normal bus and data traffic | None, unless restricted by protocol |
| ENTERING_LOW | Power-management handshake | New transactions that must be quiesced |
| LOW_POWER | Wake request or specified always-on traffic | Transactions to unavailable logic |
| WAKING | Recovery handshake | Normal traffic before readiness |
The table is illustrative only. The actual legal activity must come from the design's power-management specification.
Step 12: Make the scoreboard power-state aware
A conventional scoreboard assumes that observed transactions can be compared continuously. Low-power transitions can temporarily invalidate that assumption.
For example, a checker might maintain:
class power_aware_scoreboard extends uvm_component;
`uvm_component_utils(power_aware_scoreboard)
power_state_e power_state = POWER_ACTIVE;
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
function void handle_power_state(power_state_e new_state);
power_state = new_state;
case (new_state)
POWER_ENTERING_LOW:
handle_entering_low();
POWER_LOW:
handle_low_power();
POWER_WAKING:
handle_waking();
POWER_ACTIVE:
handle_active();
endcase
endfunction
function void handle_entering_low();
// Apply specification-defined quiescing policy.
endfunction
function void handle_low_power();
// Suspend, reject, or reinterpret checks as required.
endfunction
function void handle_waking();
// Wait for defined recovery boundary.
endfunction
function void handle_active();
// Resume normal checking.
endfunction
endclass
The important design principle is not the particular method names. It is that power transitions become explicit inputs to the checking architecture instead of being hidden assumptions inside transaction comparison code.
Step 13: Verify the complete power transition
A strong scenario tests both entry and recovery.
Configure
|
v
Normal traffic
|
v
Quiesce
|
v
Enter low power
|
+---- verify isolation
+---- verify retained state
+---- verify interrupt behavior
+---- verify illegal traffic handling
|
v
Wake request
|
v
Restore/reinitialize
|
+---- verify retained state
+---- verify reset/non-retained state
+---- verify protocol readiness
|
v
Normal traffic
|
v
Verify recovery
The final normal transaction is important. It demonstrates that the environment has not merely observed a transition but has verified that the DUT returns to a usable state.
Step 14: Add repeated and interrupted transitions
Once a single transition works, vary the scenario.
- Enter and exit low power repeatedly.
- Request low power while traffic is active.
- Attempt wake-up before entry has completed.
- Generate an allowed wake-up interrupt.
- Reset during entry.
- Reset during low power.
- Reset during wake-up.
- Attempt an illegal transaction while the domain is unavailable.
These scenarios expose ordering assumptions that a single happy-path test often misses.
Step 15: Debug low-power failures from the transition boundary
Low-power failures can produce many secondary errors. Start with the first incorrect state transition rather than the largest number of scoreboard messages.
Power request
|
v
Entry handshake correct?
|
v
Quiescence achieved?
|
v
Isolation correct?
|
v
Power state actually entered?
|
v
State retention/reset correct?
|
v
Wake request accepted?
|
v
Recovery complete?
|
v
Normal traffic works?
Useful diagnostics include:
- power-state transition and timestamp;
- reset state;
- isolation state;
- outstanding transaction count;
- retained-state snapshot;
- interrupt state;
- last accepted transaction;
- first post-wakeup transaction; and
- the exact point where normal checking resumed.
Common mistakes
- Equating power-down with reset: some state may be retained while other state is reset or reinitialized.
- Checking only power-control signals: verify the observable consequences of the transition as well.
- Continuing normal traffic during unavailable states: define legal traffic explicitly for each state.
- Flushing every scoreboard expectation on power-down: only discard transactions when the specification says they are canceled or invalidated.
- Assuming wake-up means immediately ready: recovery may involve multiple handshakes or initialization stages.
- Checking all registers for retention: classify retained, reset, reinitialized, and unspecified state separately.
- Ignoring interrupts: interrupt masking, retention, isolation, and wake-up behavior may be part of the power specification.
- Making the power sequence control child-agent internals: coordinate protocols through their public interfaces and virtual sequences.
- Using testbench state as proof of DUT state: a variable saying
POWER_LOWdoes not prove the DUT actually entered that state. - Ignoring reset during power transitions: reset and power management can interact in ways that invalidate ordinary checker assumptions.
Try it yourself
Imagine a subsystem with:
- a bus agent;
- an interrupt agent;
- a power-management interface;
- two retained registers;
- two non-retained registers; and
- a reset signal.
Design a test that:
- configures the subsystem;
- performs normal traffic;
- captures retained state;
- quiesces outstanding activity;
- enters low power;
- checks isolation and interrupt behavior;
- wakes the subsystem;
- checks retained and non-retained state separately; and
- performs normal traffic after recovery.
Challenge: Build a power-aware environment
Extend a multi-interface environment with a power-management monitor and power-state tracker.
Your environment should be able to:
- observe power-state transitions;
- publish power events through an analysis port;
- prevent or flag illegal traffic in low-power states;
- apply the correct policy to outstanding scoreboard expectations;
- verify retained register state after wake-up;
- verify reset/non-retained state separately;
- check interrupt behavior across the transition; and
- resume normal checking only after the defined recovery boundary.
Extra challenge: inject a fault from Lesson 59 during the power transition. Decide whether the fault should be accepted, rejected, deferred, or ignored according to the specification, and make sure the checker reports the result correctly.
Knowledge check
-
Why is low-power verification more than checking a power-control signal?
Because a power transition changes protocol availability, state retention, isolation, reset behavior, interrupt behavior, and recovery requirements.
-
Should entering low power always clear the scoreboard?
No. Outstanding expectations should be discarded, preserved, or otherwise handled according to the DUT's specified transaction semantics.
-
Why must retained and non-retained state be checked differently?
Retained state is expected to survive, while non-retained state may legitimately return to a reset or reinitialized value.
-
Why should the testbench distinguish a power request from successful power-state entry?
A request indicates intent; the DUT may require a handshake or completion indication before the state transition is actually complete.
-
Why should normal checking not necessarily resume immediately after a wake request?
Wake-up may require restoration, reset release, initialization, isolation removal, or other completion conditions before normal traffic is valid.
-
What is a useful debugging strategy when many checks fail after wake-up?
Find the first incorrect power, reset, isolation, or recovery transition before analyzing the secondary transaction failures.
Key takeaways
- Low-power verification is primarily about verifying state transitions and their consequences, not merely toggling a power-control signal.
- Model power states explicitly so sequences, monitors, and checkers share a clear view of the current verification context.
- Separate power control, isolation, retention, reset, interrupt, and protocol-availability requirements.
- Define what happens to outstanding transactions before deciding whether a scoreboard should preserve or discard expectations.
- Use the register model to verify retained, reset, and reinitialized state where appropriate.
- Make interrupt checking aware of power-state semantics when interrupts interact with low-power modes.
- Do not treat a power request or wake request as proof that the transition has completed.
- Resume normal checking only at a well-defined recovery boundary.
- When debugging, find the first incorrect transition before chasing the secondary failures it creates.
Module 6 complete
You have now connected several production-environment concepts into one verification architecture:
Reusable Agents
|
v
Multiple Interfaces
|
v
Protocol Contracts
|
v
Environment Layering
|
v
Reusable Components
|
+---- Register Access
|
+---- Reset Verification
|
+---- Interrupt Verification
|
+---- Error Injection
|
+---- Low-Power Scenarios
The next module moves from environment construction into Debug and Regression. The focus shifts from building verification capabilities to controlling reports, reproducing failures, minimizing failing scenarios, and turning those capabilities into an efficient regression workflow.