The core passes its sleep test, but the cell handoff contains mismatched parts. Repair the declarations against the supplied inventory.
Hardware context: A switchable transmitter and a keep-alive buffer. Match power intent to library signal and supply pins.
Write the cell definitions before loading board.upf. Then map the strategies, including both legacy interface maps. Use the listed cells and pin options. OpenPA records these commands. A worksheet checks the records against this inventory.
Full specification
| Decision | Board requirement |
|---|---|
| Legacy isolation map | Map QUIET in PD_CORE to the active-high, clamp-low cell. |
| Legacy voltage map | Map LS_CORE in PD_CORE to the shifter rated for either voltage direction. |
| Isolation definition | Identify its enable, power and ground pins. Read the pin markers and output function. |
| Shifter definition | The signal travels from input to output for either voltage direction. Name both power pins and common ground. The drawn input and output ranges are each 0.8 to 1.0 V. |
| Switch definition | Drawn GATE8 is a header. OPEN enables its first stage. MAIN feeds the cell and LOCAL leaves it. |
| Switch mapping | Select the drawn header for SW_CORE. Pair each cell pin with its matching switch port from board.upf. |
| Retention mapping | Select the drawn storage cell MEM8 for RET_CORE in PD_CORE. |
| Output supply check | Read the isolation output’s power_down_function. Use draw {power_loss -cell name -output pin -dead_supply pin -active_ground pin} for its two loss conditions. |
| Retention clamp mapping | The RET_CORE clock path takes CLK_STOP. Its asynchronous path takes RESET_STOP. Both are drawn isolation cells. |
| SKY130 cell | Group | Attribute | Value |
|---|---|---|---|
| sky130_fd_sc_hd__lpflow_inputiso0p_1 | cell | is_isolation_cell | true |
| sky130_fd_sc_hd__lpflow_inputiso0p_1 | pg_pin VGND | pg_type | primary_ground |
| sky130_fd_sc_hd__lpflow_inputiso0p_1 | pg_pin VNB | pg_type | nwell |
| sky130_fd_sc_hd__lpflow_inputiso0p_1 | pg_pin VPB | pg_type | pwell |
| sky130_fd_sc_hd__lpflow_inputiso0p_1 | pg_pin VPWR | pg_type | primary_power |
| sky130_fd_sc_hd__lpflow_inputiso0p_1 | pin A | related_power_pin | VPWR |
| sky130_fd_sc_hd__lpflow_inputiso0p_1 | pin SLEEP | isolation_cell_enable_pin | true |
| sky130_fd_sc_hd__lpflow_inputiso0p_1 | pin SLEEP | related_power_pin | VPWR |
| sky130_fd_sc_hd__lpflow_inputiso0p_1 | pin X | function | (!SLEEP&A) |
| sky130_fd_sc_hd__lpflow_inputiso0p_1 | pin X | power_down_function | (!VPWR+VGND) |
| sky130_fd_sc_hd__lpflow_inputiso0p_1 | pin X | related_power_pin | VPWR |
| sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_1 | cell | is_level_shifter | true |
| sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_1 | cell | level_shifter_type | HL_LH |
| sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_1 | pg_pin VGND | pg_type | primary_ground |
| sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_1 | pg_pin VPB | pg_type | pwell |
| sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_1 | pg_pin VPWR | pg_type | primary_power |
| sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_1 | pg_pin VPWRIN | pg_type | primary_power |
| sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_1 | pin A | related_power_pin | VPWRIN |
| sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_1 | pin X | function | (A) |
| sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_1 | pin X | power_down_function | (!VPWRIN+!VPWR+VGND) |
| sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_1 | pin X | related_power_pin | VPWR |
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 |
| Second board trial | hidden scenario |
| Intent equals the reference | the domain of every instance; supply ports, nets and their connections; the primary supply of every domain; supply sets and switches; isolation cells (clamp, enable, sense, supply); where each isolation cell is placed; level shifters; retained registers and their controls; power states; switch names, acknowledge wires, supplies and delays |
The Design
The power-unaware RTL your UPF describes (top pmu_soc). Open a file to read it.
pmu_soc.sv
// pmu_soc: two power domains. The top and the controller are always on; u_core can be switched off.
// The RTL is power-unaware: no isolation cell, no supply, no retention register is written here.
module pmu_soc (
input logic clk,
input logic rst_n,
input logic sleep_req,
input logic wake_req,
input logic en,
input logic [7:0] d,
input logic [1:0] rf_addr,
input logic rf_we,
output logic [7:0] total,
output logic led,
output logic [7:0] rd,
output logic [3:0] beats,
output logic [7:0] status,
output logic [2:0] pmu_state
);
logic iso_en, save, restore, pwr_en, core_rst_n;
logic [7:0] acc, rf_rd;
logic busy;
logic [3:0] core_beats;
pmu u_pmu (
.clk (clk),
.rst_n (rst_n),
.sleep_req (sleep_req),
.wake_req (wake_req),
.iso_en (iso_en),
.save (save),
.restore (restore),
.pwr_en (pwr_en),
.core_rst_n (core_rst_n),
.state_o (pmu_state)
);
core u_core (
.clk (clk),
.rst_n (core_rst_n),
.en (en),
.d (d),
.rf_addr (rf_addr),
.rf_we (rf_we),
.acc (acc),
.rf_rd (rf_rd),
.busy (busy),
.beats (core_beats)
);
// Always-on consumers of the core's outputs.
assign total = acc;
assign led = busy;
assign rd = rf_rd;
assign beats = core_beats;
// A status register: keeps the last accumulator value seen while the core was busy.
always_ff @(posedge clk or negedge rst_n)
if (!rst_n) status <= '0;
else if (busy) status <= acc;
endmodule
pmu.sv
// pmu_soc: the always-on power controller. Power-unaware RTL: it only drives control signals.
// Sleep: isolate, save, switch off. Wake: switch on, reset, restore, release isolation.
module pmu (
input logic clk,
input logic rst_n,
input logic sleep_req,
input logic wake_req,
output logic iso_en,
output logic save,
output logic restore,
output logic pwr_en,
output logic core_rst_n,
output logic [2:0] state_o
);
typedef enum logic [2:0] { RUN, ISOLATE, SAVE, OFF, PWRUP, RESET, RESTORE, RELEASE } st_e;
st_e st;
always_ff @(posedge clk or negedge rst_n)
if (!rst_n) st <= RUN;
else case (st)
RUN: if (sleep_req) st <= ISOLATE;
ISOLATE: st <= SAVE;
SAVE: st <= OFF;
OFF: if (wake_req) st <= PWRUP;
PWRUP: st <= RESET;
RESET: st <= RESTORE;
RESTORE: st <= RELEASE;
RELEASE: st <= RUN;
default: st <= RUN;
endcase
assign iso_en = (st != RUN);
assign save = (st == SAVE);
assign restore = (st == RESTORE);
assign pwr_en = !(st == OFF);
assign core_rst_n = rst_n && (st != RESET);
assign state_o = st;
endmodule
core.sv
// pmu_soc: the switchable core. An accumulator, a beat counter and a 4-word register file.
// Power-unaware RTL: nothing here knows about supplies.
module core (
input logic clk,
input logic rst_n,
input logic en,
input logic [7:0] d,
input logic [1:0] rf_addr,
input logic rf_we,
output logic [7:0] acc,
output logic [7:0] rf_rd,
output logic busy,
output logic [3:0] beats
);
logic [7:0] rf [0:3];
always_ff @(posedge clk or negedge rst_n)
if (!rst_n) begin
acc <= '0;
beats <= '0;
end else if (en) begin
acc <= acc + d;
beats <= beats + 4'd1;
end
always_ff @(posedge clk)
if (rf_we) rf[rf_addr] <= acc;
assign rf_rd = rf[rf_addr];
assign busy = en;
endmodule
Given UPF Files
Your file may load these with load_upf. The grader uses the same text.
board.upf
upf_version 4.0
# pmu_soc power intent, UPF 1.0 style (Accellera UPF tutorial, slides 33-45).
# The always-on top runs at 1.0 V. The core runs at 0.8 V from VDD_LO through a power switch.
create_power_domain PD_TOP -include_scope
create_power_domain PD_CORE -elements {u_core}
# Supply ports, driven by the bench with supply_on()/supply_off()
create_supply_port VDD -direction in
create_supply_port VDD_LO -direction in
create_supply_port VSS -direction in
create_supply_net VDD_N -domain PD_TOP
create_supply_net VDDL_N -domain PD_TOP
create_supply_net VSS_N -domain PD_TOP
connect_supply_net VDD_N -ports {VDD}
connect_supply_net VDDL_N -ports {VDD_LO}
connect_supply_net VSS_N -ports {VSS}
set_domain_supply_net PD_TOP -primary_power_net VDD_N -primary_ground_net VSS_N
# The core's switched supply
create_supply_net VSS_N -reuse -domain PD_CORE
create_supply_net VDD_CORE -domain PD_CORE
create_power_switch SW_CORE \
-domain PD_CORE \
-input_supply_port {vin VDDL_N} \
-output_supply_port {vout VDD_CORE} \
-control_port {ctrl u_pmu/pwr_en} \
-on_state {on vin {ctrl}} \
-off_state {off {!ctrl}}
set_domain_supply_net PD_CORE -primary_power_net VDD_CORE -primary_ground_net VSS_N
create_supply_set AON -function {power VDD_N} -function {ground VSS_N}
set_isolation QUIET -domain PD_CORE -elements {u_core/busy} -applies_to outputs -clamp_value 0 -isolation_signal u_pmu/iso_en -isolation_supply AON -location parent
set_isolation FULL -domain PD_CORE -elements {u_core/beats} -applies_to outputs -clamp_value 1 -isolation_signal u_pmu/iso_en -isolation_supply AON -location self
set_isolation HOLD -domain PD_CORE -elements {u_core/acc} -applies_to outputs -clamp_value latch -isolation_signal u_pmu/iso_en -isolation_supply AON -location parent
set_isolation RELEASE -domain PD_CORE -elements {u_core/rf_rd} -applies_to outputs -clamp_value Z -isolation_signal u_pmu/iso_en -isolation_supply AON -location fanout
# Retention: keep the accumulator, not the beat counter.
set_retention RET_CORE -domain PD_CORE \
-elements {u_core/acc} \
-retention_power_net VDD_N -retention_ground_net VSS_N
set_retention_control RET_CORE -domain PD_CORE \
-save_signal {u_pmu/save posedge} \
-restore_signal {u_pmu/restore posedge}
# Level shifters in both directions between 1.0 V and 0.8 V.
set_level_shifter LS_CORE -domain PD_CORE \
-applies_to both \
-rule both \
-threshold 0.1 \
-location parent
# Legacy power state table (slides 39, 40)
add_port_state VDD -state {ON_10 1.0}
add_port_state VDD_LO -state {ON_08 0.8}
add_port_state SW_CORE/vout -state {ON_08 0.8} -state {OFF off}
add_port_state VSS -state {ON_00 0.0}
create_pst PST_SOC -supplies {VDD VDD_LO SW_CORE/vout VSS}
add_pst_state RUN -pst PST_SOC -state {ON_10 ON_08 ON_08 ON_00}
add_pst_state SLEEP -pst PST_SOC -state {ON_10 ON_08 OFF ON_00}
proc draw {card} {set_design_attributes -elements {.} -attribute [list handoff $card]}
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,rst_n=0,sleep_req=0,wake_req=0,en=0,rf_we=0;
logic [7:0] d=1; logic [1:0] rf_addr=0;
wire [7:0] total,rd,status; wire led; wire [3:0] beats; wire [2:0] pmu_state;
pmu_soc dut(.*);
always #5 clk=~clk;
task sample(input string phase);
$display("%s switch=%b guard=%b raw=%b led=%b",phase,dut.pwr_en,dut.iso_en,dut.u_core.busy,led);
endtask
initial begin
void'(supply_on("VDD")); void'(supply_on("VDD_LO",0.8)); void'(supply_on("VSS",0.0));
repeat(2) @(negedge clk); rst_n=1; en=1; @(negedge clk); sample("work");
sleep_req=1; @(negedge clk); sleep_req=0; sample("prepare");
wait(pmu_state==3); #1; sample("park");
@(negedge clk); wake_req=1; @(negedge clk); wake_req=0; wait(pmu_state==0); #1; sample("return"); $finish;
end
endmoduleExamples
Example 1
What the Reader Checked (Recorded)- Input
Read the starter with the wrong candidate.
- OpenPA reports (recorded)
Notes (20) answer.upf:5: map_isolation_cell is recorded with no effect in simulation: a UPF 2.0 mapping command (not in IEEE 1801-2024; use_interface_cell replaced it); implementation only
OpenPA stores the request. Use the Liberty inventory to decide whether the candidate fits.
Example 2
Domain Ownership (Recorded)- Input
Load the supplied board file.
- OpenPA reports (recorded)
Power domains PD_TOP (board.upf:5): pmu_soc, u_pmu primary supply PD_TOP.primary: power VDD_N, ground VSS_N PD_CORE (board.upf:6): u_core primary supply PD_CORE.primary: power VDD_CORE, ground VSS_N [switchable]
Read the domain ownership and follow each primary supply.
Example 3
Board Sequence (Recorded)- Input
Apply the public bench stimulus.
- The bench prints (recorded)
work switch=1 guard=0 raw=1 led=1 prepare switch=1 guard=1 raw=1 led=0 park switch=0 guard=1 raw=1 led=0 return switch=1 guard=0 raw=1 led=1
Follow the PMU guard across the switch cut. The digital run cannot distinguish physical cell candidates.
Constraints and Contract
- Preserve the supplied board connections and use only the requested handoff entries.
Hints
Hint 1
Follow the board names through the supplied files.
Hint 2
Map QUIET in PD_CORE to the active-high, clamp-low cell.
Hint 3
Check the return path as well as the positive supply.
What the grader checks: OpenPA and Icarus run the abstract board. The worksheet checks cell or library choices independently.
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