A camera board streams without a buffer. Preserve its three allowed rail pairs across a legacy table and a domain state model.
Hardware context: A camera with separate pixel and buffer supplies. Preserve allowed rail pairs and reject forbidden changes between modes.
A camera board streams without a buffer. Preserve its three allowed rail pairs across a legacy table and a domain state model.
Complete the UPF for sensor_hub. The board file supplies the wiring. The camera input grab drives the output request.
Full specification
| Decision | Required behavior |
|---|---|
| Port vocabulary | Use add_port_state on VPIX and VBUF. Name 0.85 V up, 0.75 V held, and OFF cut on both. |
| Header | Create MASK with VPIX first and VBUF second. |
| Store | In both forms allow ready pixels and a valid buffer. |
| Stream | In both forms allow ready pixels with an empty buffer. |
| Rest | In both forms allow idle pixels with an empty buffer. |
| Conversion | Use Store, Stream and Rest as row and HUB state names. Use PIX and BUF from board.upf in the domain expressions. |
| Other pairs | Keep HUB complete. An idle pixel with a valid buffer matches neither form. Overlapping modes also fail. |
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 |
|---|---|
| Camera sequence | public scenario: Run shows it |
| Board trial B | hidden scenario |
| Board trial C | hidden scenario |
| Intent equals the reference | power states; the domain of every instance; supply ports, nets and their connections; the primary supply of every domain; supply sets and switches |
The Design
The power-unaware RTL your UPF describes (top sensor_hub). Open a file to read it.
sensor_hub.sv
module sensor_hub(input logic grab, output logic request);
assign request = grab;
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 sensor_hub
create_power_domain HUB -include_scope
create_supply_port VHOST
create_supply_net VHOST_N
connect_supply_net VHOST_N -ports {VHOST}
create_supply_port VPIX
create_supply_net VPIX_N
connect_supply_net VPIX_N -ports {VPIX}
create_supply_port VBUF
create_supply_net VBUF_N
connect_supply_net VBUF_N -ports {VBUF}
create_supply_port GND
create_supply_net GND_N
connect_supply_net GND_N -ports {GND}
create_supply_set BOARD -function {power VHOST_N} -function {ground GND_N}
associate_supply_set BOARD -handle HUB.primary
create_supply_set PIX -function {power VPIX_N} -function {ground GND_N}
create_supply_set BUF -function {power VBUF_N} -function {ground GND_N}
add_power_state PIX -supply -state {READY -supply_expr {power == {FULL_ON 0.85}}}
add_power_state PIX -supply -update -state {IDLE -supply_expr {power == OFF}}
add_power_state BUF -supply -state {VALID -supply_expr {power == {FULL_ON 0.75}}}
add_power_state BUF -supply -update -state {EMPTY -supply_expr {power == OFF}}
The Public Scenario
Camera 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 grab=0;
wire request;
sensor_hub dut(.*);
initial begin
void'(supply_on("VHOST",1.0)); void'(supply_on("GND",0.0));
#1;
void'(supply_off("VPIX")); void'(supply_off("VBUF")); grab=0; #2;
$display("sample 1 pixel=%b buffer=%b request=%b pix_state=%0s mode=%0s row=%0s D8=%0d",get_supply_on_state(get_supply_value("VPIX")),get_supply_on_state(get_supply_value("VBUF")),request,dut.openpa_cn1(openpa_ss_PIX_st),dut.openpa_cn3(openpa_ds_HUB_st),dut.openpa_cn4(openpa_pst_MASK_row),dut.openpa_n[8]);
void'(supply_on("VPIX",0.85)); void'(supply_off("VBUF")); grab=0; #2;
$display("sample 2 pixel=%b buffer=%b request=%b pix_state=%0s mode=%0s row=%0s D8=%0d",get_supply_on_state(get_supply_value("VPIX")),get_supply_on_state(get_supply_value("VBUF")),request,dut.openpa_cn1(openpa_ss_PIX_st),dut.openpa_cn3(openpa_ds_HUB_st),dut.openpa_cn4(openpa_pst_MASK_row),dut.openpa_n[8]);
void'(supply_on("VPIX",0.85)); void'(supply_on("VBUF",0.75)); grab=0; #2;
$display("sample 3 pixel=%b buffer=%b request=%b pix_state=%0s mode=%0s row=%0s D8=%0d",get_supply_on_state(get_supply_value("VPIX")),get_supply_on_state(get_supply_value("VBUF")),request,dut.openpa_cn1(openpa_ss_PIX_st),dut.openpa_cn3(openpa_ds_HUB_st),dut.openpa_cn4(openpa_pst_MASK_row),dut.openpa_n[8]);
$finish;
end
endmoduleExamples
Example 1
Pixel and Buffer Rails (Recorded)- Input
Load board.upf.
- OpenPA reports (recorded)
Supply network VPIX_N: port VPIX {port:VPIX net:VPIX_N fn:PIX.power} VBUF_N: port VBUF {port:VBUF net:VBUF_N fn:BUF.power}
Each regulator drives its own net. Follow each port name to the connected net.
Example 2
The Domain in the Starter (Recorded)- Input
Read the starter with board.upf.
- OpenPA reports (recorded)
Power domains HUB (board.upf:3): sensor_hub primary supply BOARD: power VHOST_N, ground GND_N
HUB contains the camera logic. Its primary supply stays on during the sequence.
Example 3
Camera Sequence (Recorded)- Input
Apply the public regulator and request sequence.
- The bench prints (recorded)
sample 1 pixel=0 buffer=0 request=0 pix_state=IDLE mode=Rest row=Rest D8=0 sample 2 pixel=1 buffer=0 request=0 pix_state=READY mode=Stream row=Stream D8=0 sample 3 pixel=1 buffer=1 request=0 pix_state=READY mode=Store row=Store D8=0
Rest, Stream and Store appear in that order. Each rail pair matches one table row and one domain mode.
Constraints and Contract
- Load board.upf. Keep its supply ports, nets and supply-set wiring as given.
- Use -update on later add_power_state commands for the same object. The grader checks settled modes and D8 reports.
Hints
Hint 1
The camera input is grab. The request output follows grab.
Hint 2
Follow a legal path through the sample before considering the other paths.
Hint 3
Check what the policy says at the first differing sample.
What the grader checks: OpenPA checks the digital supply model at the requested voltages.
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