Two accumulator sockets share a contract. The board routes the right regulator to the CPU and the left regulator to the GPU.
Hardware context: A PMU and two separately supplied accumulator sockets. Refine one IP contract across a board and a technology handoff.
Load board.upf once. OpenPA takes one socket per scoped load of bank.upf. Load both sockets and bind each primary handle. Use draw {...} for equivalence and library commands. Write the definition for package.upf, then load the package before using its library. Supply names remain case sensitive.
Full specification
| Decision | Board requirement |
|---|---|
| First socket | Load the unchanged bank.upf at u_cpu with -scope. |
| Second socket | Load the same file at u_gpu with -scope. |
| CPU regulator | Bind the CPU bank to RIGHT_SS. |
| GPU regulator | Bind the GPU bank to LEFT_SS. |
| Electrical equivalence | Draw an electrical set equivalence between the two host names that have identical supply connections. |
| Library definition | Draw an empty UPF library named kit with explicit -contents {}. This is a worksheet for the packaging team. |
| Library file | Draw the one-time library load from package.upf. |
| Local visibility | Draw the command that makes kit visible in the consuming scope. |
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 duo). Open a file to read it.
duo.sv
// duo: an always-on top with a CPU and a GPU. Power-unaware RTL.
module duo (
input logic clk,
input logic rst_n,
input logic en,
input logic [7:0] d,
input logic sleep_cpu_n,
input logic pwr_gpu,
input logic iso_cpu,
input logic iso_gpu,
output logic [7:0] q_cpu,
output logic [7:0] q_gpu,
output logic [1:0] acks
);
wire ack_cpu, ack_gpu; // no RTL drives these wires: the UPF switches' -ack_port do
acc u_cpu (.clk(clk), .rst_n(rst_n), .en(en), .d(d), .q(q_cpu));
acc u_gpu (.clk(clk), .rst_n(rst_n), .en(en), .d(d + 8'd1), .q(q_gpu));
assign acks = {ack_gpu, ack_cpu};
endmodule
acc.sv
// acc: an 8-bit accumulator.
module acc (
input logic clk,
input logic rst_n,
input logic en,
input logic [7:0] d,
output logic [7:0] q
);
always_ff @(posedge clk or negedge rst_n)
if (!rst_n) q <= '0;
else if (en) q <= q + d;
endmodule
Given 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 duo
create_power_domain HOST -include_scope
foreach pad {VHOST VLEFT VRIGHT VG} {
create_supply_port $pad
create_supply_net N_$pad
connect_supply_net N_$pad -ports $pad
}
foreach {label net} {HOST_SS N_VHOST LEFT_SS N_VLEFT RIGHT_SS N_VRIGHT HOST_ALIAS N_VHOST} {
create_supply_set $label -function [list power $net] -function {ground N_VG}
}
associate_supply_set HOST_SS -handle HOST.primary
proc draw {card} {set_design_attributes -elements {.} -attribute [list handoff $card]}
bank.upf
create_power_domain BANK -elements {.}
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,en=1,sleep_cpu_n=1,pwr_gpu=1,iso_cpu=0,iso_gpu=0;
logic [7:0] d=9; wire [7:0] q_cpu,q_gpu; wire [1:0] acks;
duo dut(.*);
task tick; #2 clk=1; #2 clk=0; endtask
task sample(input string phase); #2; $display("%s cpu=%h gpu=%h",phase,q_cpu,q_gpu); endtask
initial begin
void'(supply_on("VG",0.0)); void'(supply_on("VHOST")); void'(supply_on("VLEFT")); void'(supply_on("VRIGHT"));
#2; tick; rst_n=1; tick; sample("both");
void'(supply_off("VRIGHT")); #2; tick; sample("one");
void'(supply_on("VRIGHT")); rst_n=0; #2; tick; rst_n=1;
void'(supply_off("VLEFT")); #2; tick; sample("other"); $finish;
end
endmoduleExamples
Example 1
Connected Supply Nets (Recorded)- Input
Load the supplied board file.
- OpenPA reports (recorded)
Supply network N_VHOST: port VHOST {port:VHOST net:N_VHOST fn:HOST_SS.power fn:HOST_ALIAS.power fn:HOST.primary.power} N_VLEFT: port VLEFT {port:VLEFT net:N_VLEFT fn:LEFT_SS.power} N_VRIGHT: port VRIGHT {port:VRIGHT net:N_VRIGHT fn:RIGHT_SS.power} N_VG: port VG {port:VG net:N_VG fn:HOST_SS.ground fn:LEFT_SS.ground fn:RIGHT_SS.ground fn:HOST_ALIAS.ground fn:HOST.primary.ground}
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 HOST (board.upf:3): duo, u_cpu, u_gpu primary supply HOST_SS: power N_VHOST, ground N_VG
Read the domain ownership and follow each primary supply.
Example 3
Board Sequence (Recorded)- Input
Apply the public bench stimulus.
- The bench prints (recorded)
both cpu=09 gpu=0a one cpu=xx gpu=14 other cpu=09 gpu=xx
Cut each regulator in turn. The other accumulator keeps counting.
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
Load the unchanged bank.upf at u_cpu with -scope.
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