A sensor buffer enters several low-voltage modes. Keep its samples usable until the event each mode actually prohibits.
Hardware context: A switched accumulator and a low-voltage sample buffer. Locate the event that first destroys stored data.
A sensor buffer enters several low-voltage modes. Keep its samples usable until the event each mode actually prohibits.
Define the six named UNIT supply states. Each FULL_ON voltage is an exact set point. Use supply expressions on UNIT. Add -update when extending an existing declaration. Ground stays on at zero volts. It also applies PARTIAL_ON without translating it.
Full specification
| Decision | Requirement |
|---|---|
| Service at 1.00 V | Allow writes and normal output changes. |
| Watch at 0.81 V | Lose changing outputs individually. Keep an unchanged stored sample. |
| Hold at 0.74 V | Lose a stored sample only when its value changes. Keep combinational validity functional. |
| Pulse at 0.68 V | Lose the sample at the first active clock edge, even with writes disabled. |
| Quiet at 0.62 V | Lose state and driven outputs together after activity at an input. |
| Ramp | When the regulator reports PARTIAL_ON, use the nonoperational placeholder that can be refined later. |
| Instance policy | Explicitly enable only simstate semantics for u_sample. |
| Library handoff | Draw the load_simstate_behavior command for library sensors and file sample_policy.upf inside draw {...}. OpenPA records the card without loading a library. |
What the Grader Checks
OpenPA reads your file. A refusal ends the check with OpenPA's message and line. Otherwise every row below must pass.
| Row | Rule |
|---|---|
| Board sequence | public scenario: Run shows it |
| Board trial 1 | hidden scenario |
| Board trial 2 | hidden scenario |
| Board trial 3 | hidden scenario |
| Board trial 4 | hidden scenario |
| Board trial 5 | hidden scenario |
| Intent equals the reference | the domain of every instance; supply ports, nets and their connections; the primary supply of every domain; isolation cells (clamp, enable, sense, supply); where each isolation cell is placed; supply sets and switches; power states; level shifters; retained registers and their controls; switch names, acknowledge wires, supplies and delays |
The Design
The power-unaware RTL your UPF describes (top sense_soc). Open a file to read it.
tile.sv
module tile(input logic clk, wr, input logic [7:0] data,
output logic [7:0] stored, output wire valid);
always_ff @(posedge clk) if (wr) stored <= data;
assign valid = wr;
endmodule
module sense_soc(input logic clk,wr,input logic [7:0] data,output wire [7:0] stored,output wire valid);
tile u_sample(.clk(clk),.wr(wr),.data(data),.stored(stored),.valid(valid));
endmoduleGiven UPF Files
Your file may load these with load_upf. The grader uses the same text.
board.upf
upf_version 4.0
set_design_top sense_soc
create_power_domain PD_TOP -include_scope
create_power_domain PD_UNIT -elements {u_sample}
create_supply_port VHOST -direction in
create_supply_net HOST_N
connect_supply_net HOST_N -ports {VHOST}
create_supply_port VUNIT -direction in
create_supply_net UNIT_N
connect_supply_net UNIT_N -ports {VUNIT}
create_supply_port VKEEP -direction in
create_supply_net KEEP_N
connect_supply_net KEEP_N -ports {VKEEP}
create_supply_port VSS -direction in
create_supply_net GND_N
connect_supply_net GND_N -ports {VSS}
create_supply_set HOST -function {power HOST_N} -function {ground GND_N}
create_supply_set UNIT -function {power UNIT_N} -function {ground GND_N}
create_supply_set KEEP -function {power KEEP_N} -function {ground GND_N}
associate_supply_set HOST -handle PD_TOP.primary
associate_supply_set UNIT -handle PD_UNIT.primary
proc draw {line} {
set_design_attributes -elements {u_sample} -attribute [list drawing $line]
}
The Public Scenario
Board sequence. Run checks its output and shows the expected lines and any failure.
tb.sv (public scenario)
`timescale 1ns/1ps
module tb;
import UPF::*;
logic clk=0,wr=0; logic [7:0] data=0;
wire [7:0] stored; wire valid;
sense_soc dut(.*);
task tick; #1 clk=1; #1 clk=0; #1; endtask
task sample(input string phase);
$display("%s mode=%0d wr=%b valid=%b stored=%h",phase,openpa_dom_PD_UNIT_sim,wr,valid,stored);
endtask
initial begin
void'(supply_on("VHOST")); void'(supply_on("VSS",0.0)); void'(supply_on("VUNIT"));
#2; wr=1; data=8'h18; tick; wr=0; #1; sample("loaded");
void'(supply_on("VUNIT",0.81)); #2; sample("entry");
tick; sample("idle_edge");
wr=1; #1; sample("data_edge");
tick; sample("same_word");
data=~data; tick; sample("new_word");
void'(supply_on("VUNIT")); #2; sample("back");
tick; sample("rewritten"); $finish;
end
endmoduleExamples
Example 1
Connected Supply Nets (Recorded)- Input
Load the supplied board file.
- OpenPA reports (recorded)
Supply network UNIT_N: port VUNIT {port:VUNIT net:UNIT_N fn:UNIT.power fn:PD_UNIT.primary.power}
Follow each supply port to the net it drives.
Example 2
Domain Ownership (Recorded)- Input
Load the supplied board file.
- OpenPA reports (recorded)
Power domains PD_TOP (board.upf:3): sense_soc primary supply HOST: power HOST_N, ground GND_N PD_UNIT (board.upf:4): u_sample primary supply UNIT: power UNIT_N, ground GND_N
The two domains separate the peripheral from its powered host.
Example 3
Board Sequence (Recorded)- Input
Apply the public bench stimulus.
- The bench prints (recorded)
loaded mode=0 wr=0 valid=0 stored=18 entry mode=3 wr=0 valid=0 stored=18 idle_edge mode=3 wr=0 valid=0 stored=18 data_edge mode=3 wr=1 valid=x stored=18 same_word mode=3 wr=1 valid=x stored=18 new_word mode=3 wr=1 valid=x stored=xx back mode=0 wr=1 valid=1 stored=xx rewritten mode=0 wr=1 valid=1 stored=e7
An idle edge keeps the sample. A validity change and a changing write affect different outputs.
Constraints and Contract
- Load board.upf and keep its domains and wiring intact.
- Define the six named UNIT supply states. Each FULL_ON voltage is an exact set point. Use supply expressions on UNIT. Add -update when extending an existing declaration. Ground stays on at zero volts. It also applies PARTIAL_ON without translating it.
Hints
Hint 1
Start with the supplied wiring and the public stimulus.
Hint 2
Allow writes and normal output changes.
Hint 3
Compare the first changed output with the timing of its supply and control.
What the grader checks: OpenPA models digital supply and register behavior. Icarus represents corruption with X.
Run checks the public scenario only and never accepts. Submit runs every row. OpenPA is our open power-aware tool: it reads the UPF, writes a power-aware copy of the RTL, and Icarus runs that copy.
See all 2 problems on this path