W4.14.2 Attributes for a Black Box

MediumImplementOpenPA + Icarus · serverReview the topic

Two views of a macro arrive from the library team. Attach the revision and complete its pin card before integration.

Hardware context: A transmitter macro and its always-on guard. Carry the isolation control across the boundary and annotate opaque pins.

Two views of a macro arrive from the library team. Attach the revision and complete its pin card before integration.

Use real set_design_attributes for the revision. Put each proposed library or port command inside draw {...}. OpenPA records this worksheet as project metadata. The simulation uses the visible island witness only.

Full specification
DecisionRequirement
RevisionOn u_tx record the project attribute macro_rev with value C.
Old library viewOn macros/island relate pin c to power VP and ground VN with set_pin_related_supply.
Status outputOn model island, c requests a low isolation clamp.
Held outputOn z request the last transparent value.
Async controlWhen the latch isolation control for asynchronous set/reset asserts, z must become one.
Direct connectionIn the opaque view the single-bit ports a and spare belong to one named feedthrough BYPASS.

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.

RowRule
Board sequencepublic scenario: Run shows it
Board trial 1hidden scenario
Intent equals the referencethe 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 boundary_soc). Open a file to read it.

island.sv
module island(input logic [4:0] d, output wire a, b, c, z, spare);
  assign a=d[0]; assign b=d[1]; assign c=d[2]; assign z=d[3]; assign spare=d[4];
endmodule
module boundary_soc(input logic [4:0] d, input logic iso, iso_n,
  output wire a,b,c,z,spare);
  island u_tx(.d(d),.a(a),.b(b),.c(c),.z(z),.spare(spare));
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 boundary_soc
create_power_domain PD_TOP -include_scope
create_power_domain PD_TX -elements {u_tx}
create_supply_port VA -direction in
create_supply_port VT -direction in
create_supply_port VG -direction in
create_supply_net NA
create_supply_net NT
create_supply_net NG
connect_supply_net NA -ports {VA}
connect_supply_net NT -ports {VT}
connect_supply_net NG -ports {VG}
create_supply_set AON -function {power NA} -function {ground NG}
create_supply_set TX -function {power NT} -function {ground NG}
associate_supply_set AON -handle PD_TOP.primary
associate_supply_set TX -handle PD_TX.primary
proc draw {line} {
  set_design_attributes -elements {u_tx} -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 [4:0] d=5'h07; logic iso=0,iso_n=1; wire a,b,c,z,spare;
 boundary_soc dut(.*);
 task sample(string phase); #2; $display("%s data=%h b=%b c=%b",phase,d,b,c); endtask
 initial begin
  void'(supply_on("VA")); void'(supply_on("VG",0.0)); void'(supply_on("VT"));
   sample("run");
   sample("prepare");
  void'(supply_off("VT")); sample("pause");
  void'(supply_on("VT")); d=~d; sample("return");
   sample("resume"); $finish;
 end
endmodule

Examples

Example 1

Connected Supply Nets (Recorded)
Input
Load the supplied board file.
OpenPA reports (recorded)
Supply network
  NT: port VT  {port:VT net:NT fn:TX.power fn:PD_TX.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): boundary_soc
    primary supply AON: power NA, ground NG
  PD_TX (board.upf:4): u_tx
    primary supply TX: power NT, ground NG

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)
run data=07 b=1 c=1
prepare data=07 b=1 c=1
pause data=07 b=x c=x
return data=18 b=0 c=0
resume data=18 b=0 c=0

This is the visible RTL witness. The stored pin card has no effect on these samples.

Constraints and Contract

  • Load board.upf and keep its domains and wiring intact.
  • Use real set_design_attributes for the revision. Put each proposed library or port command inside draw {...}. OpenPA records this worksheet as project metadata. The simulation uses the visible island witness only.

Hints

Hint 1

Start with the supplied wiring and the public stimulus.

Hint 2

On u_tx record the project attribute macro_rev with value C.

Hint 3

Compare the first changed output with the timing of its supply and control.

What the grader checks: Opaque macro annotations are graded as a drawn contract. Only visible RTL and supported UPF run.

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
Your UPF file UPFSaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs
Not run yet

Run checks the public scenario. Submit checks every row in the description.

OpenPA + Icarus · server