A camera request can arrive while its pixel rail is off. Identify that failure without flagging a normal pause.
Hardware context: A pixel regulator and a capture request. Separate unsafe requests from unclassified supply voltages.
A camera request can arrive while its pixel rail is off. Identify that failure without flagging a normal pause.
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 |
|---|---|
| Pixel supply | Name 0.85 V FULL_ON READY and OFF IDLE on PIX. Adjacent voltages are outside READY. |
| Capture | Name a request on a ready pixel rail CAPTURE. |
| Waiting | Name a ready pixel rail without a request WAIT. |
| Parked | Name an off pixel rail without a request PARK. |
| Lost request | Name an off pixel rail with a request LOST and mark it illegal. |
| Inventory | Declare HUB complete. A rail value outside its modes must report a gap. Keep modes disjoint. |
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}
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_on("VPIX",0.85)); void'(supply_off("VBUF")); grab=0; #2;
$display("sample 1 pixel=%b buffer=%b request=%b pix_state=%0s mode=%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_cn2(openpa_ds_HUB_st),dut.openpa_n[8]);
void'(supply_on("VPIX",0.85)); void'(supply_off("VBUF")); grab=1; #2;
$display("sample 2 pixel=%b buffer=%b request=%b pix_state=%0s mode=%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_cn2(openpa_ds_HUB_st),dut.openpa_n[8]);
void'(supply_off("VPIX")); void'(supply_off("VBUF")); grab=0; #2;
$display("sample 3 pixel=%b buffer=%b request=%b pix_state=%0s mode=%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_cn2(openpa_ds_HUB_st),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=1 buffer=0 request=0 pix_state=READY mode=WAIT D8=0 sample 2 pixel=1 buffer=0 request=1 pix_state=READY mode=CAPTURE D8=0 sample 3 pixel=0 buffer=0 request=0 pix_state=IDLE mode=PARK D8=0
Samples 1 and 2 keep pixel on while request changes. The final cut has no pending request, so D8 stays zero.
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