Describe every select of pad IO4 in connect.csv rows: one output function, one input function, GPIO and the released state. The proof must hold on the good chip and fail on two hidden miswired chips.
Hardware context: The wiring of ap_soc v1.5 as data: connect.csv, irq.csv and pins.csv, and the top level generated from them. Catching a miswired pad with a proof.
A pad is several paths, chosen by its two bits of PINMUX. Pad IO4 of ap_soc carries GPIO at select 1 and the SPI data output at select 2. At select 3 it carries the timer's event input. At select 0, the reset value, the chip leaves it alone.
Write the rows of part pad-io4. Most of them are conditional: the cross column holds the select under which the row must hold, such as IO4==2. Each select decides two things at the pad. Does the chip drive it, through io_oe? And with what, through io_out? An input function must also receive the pad. The given file lists every destination with its condition, and the sources you may use.
Your rows run three times. On the good wiring every row must hold. Two hidden chips each differ in one wire of this part, and on each at least one of your rows must fail. A destination with no row fails the good wiring already, because nothing would notice when its wire is wrong.
Full specification
| Column | Meaning |
|---|---|
| from | The driver: an instance output (u_uart.rx_ready), a slice of one (u_fabric.psel[3:3]), or a constant (1'b0) |
| to | The load: an instance input, or a slice of one |
| width | Bits, a decimal number; both ends must have it |
| clock | The clock of the destination: clk_sys, clk_aon, pad or const |
| power | The power domain of the destination: PD_MAIN, PD_AON or PD_PER |
| cross | Empty for a plain wire, static for a value set once and held. IOp==v marks a pad path that exists only under that PINMUX select |
| note | Free text; the proof ignores it |
An example from another part, the DMA's request inputs: u_uart.rx_ready,u_dma.rx_ready,1,clk_sys,PD_MAIN,, proves the property u_dma.rx_ready == u_uart.rx_ready with every block an empty box.
| IO4 select | Function | Direction |
|---|---|---|
| 0 | released (reset value) | the chip does not drive the pad |
| 1 | GPIO | GPIO decides: its own enable and data for pad 4 |
| 2 | SPI data out (MOSI) | out: the chip drives the pad |
| 3 | timer event input | in: the chip does not drive the pad |
| any | GPIO IN bit 4 | reads the pad whatever the select |
u_pads.io_oe[4] is 1 when the chip drives the pad, and io_out[4] is the level it drives. u_pads.io_in[4] is the level on the pad. The event input goes into u_sync_event, a two-flip-flop synchronizer; the proof checks the wire into its input d. A row whose condition says the pad is not driven needs no io_out row.
Before any proof, each row is screened. It needs seven fields, a destination and a source of this part, and the same width. Its clock, power and crossing must be the destination's. A row that fails the screen is refused with its line number.
Given Files
Read-only files supplied by the bench.
pad-io4-ports.txt
from,to,width,clock,power,cross,note
Source endpoints: 1'b0, 1'b1, u_gpio.pad_oe[4], u_gpio.pad_out[4], u_pads.io_in[4], u_spi.mosi
Required destination, width, clock, power and crossing (one row per destination and condition):
u_gpio.pad_in[4],1,clk_sys,PD_MAIN,
u_pads.io_oe[4],1,clk_sys,PD_MAIN,IO4==0
u_pads.io_oe[4],1,clk_sys,PD_MAIN,IO4==1
u_pads.io_oe[4],1,clk_sys,PD_MAIN,IO4==2
u_pads.io_oe[4],1,clk_sys,PD_MAIN,IO4==3
u_pads.io_out[4],1,clk_sys,PD_MAIN,IO4==1
u_pads.io_out[4],1,clk_sys,PD_MAIN,IO4==2
u_sync_event.d,1,clk_sys,PD_MAIN,IO4==3
IOp==v means the two PINMUX bits for pad p equal v. Joined conditions must all hold.
CDC rows prove the named boundary connections with block outputs free.
Examples
Example 1
The Good Wiring- Input
8 rows
- Output
proved
Each select drives, releases and receives the pad as the pin table says.
Example 2
The Functions Only- Input
the SPI output, the event input and GPIO IN
- Output
unconstrained wires
The enables and the GPIO rows are destinations too. A wrong enable is as real a miswire as a wrong data wire.
Example 3
The Wrong Direction- Input
the enable at select 3 tied to 1
- Output
counterexample
The proof finds values with select 3 under which io_oe[4] is 0, not 1. The chip leaves an input pad alone, as it should.
Constraints and Contract
- Seven-column CSV, one row per destination and condition.
- Proved on the good wiring; a counterexample on each hidden chip.
Hints
Hint 1
List the four selects and ask, for each one: does the chip drive pad 4?
Hint 2
An enable row for a select where the chip must not drive has a constant as its driver. Which one?
Hint 3
GPIO IN reads the pad under every select, so its row has an empty cross column.
What the grader checks: Your rows are proved on the released E4 slice of part pad-io4, first on the good wiring. Then they run on two copies of the top, each with one connection of this part changed. The page never says which. The proof covers the pad's enable, data and input paths up to the synchronizer's input. It says nothing about the SPI controller, the timer or the board.
3 checks on ap_soc v1.5 · SymbiYosys · server. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain your text only; the chip, the bench and the hidden checks stay on the server. A passing result establishes the tested cases, not a proof for all possible inputs.
See all 2 problems on this path