Bit-bash the plain registers of the whole chip, prove that no register answers at two addresses, and make every hole answer ERROR. The table must pass on ap_soc and fail on every faulty chip of a hidden set.
Hardware context: The memory map of ap_soc v1.5: register fields, neighbouring addresses and holes. Bit bash, aliases and holes over the whole chip.
Write a table for the bus-manager seat over the whole of ap_soc. Prove three things. Every bit of every plain read-and-write field can be set on its own and reads back in its own place. Within every block, registers given different values all read back their own value. And every hole of the map answers ERROR: an empty offset in every APB page, and the holes between regions.
Leave PINMUX, CLK_GATE and the mailbox registers out: they move pads, stop clocks or speak to the bench. Put every register you touch back to its reset value.
Your table must pass on the good chip and fail on each chip of a hidden set. Which faults the set holds, the page does not say.
Full specification
| Register | Address | Field | Bits | Access | Reset | Moves by itself | A read | A write |
|---|---|---|---|---|---|---|---|---|
| MSIP | 0x0200_0000 | msip | 0 | rw | 0x0 | no | OKAY | OKAY |
| MTIMECMP_LOW | 0x0200_4000 | value | 31:0 | rw | 0xffffffff | no | OKAY | OKAY |
| MTIMECMP_HIGH | 0x0200_4004 | value | 31:0 | rw | 0xffffffff | no | OKAY | OKAY |
| MTIME_LOW | 0x0200_bff8 | value | 31:0 | rw | 0x0 | yes | OKAY | OKAY |
| MTIME_HIGH | 0x0200_bffc | value | 31:0 | rw | 0x0 | yes | OKAY | OKAY |
| PRIORITY[1] | 0x0c00_0004 | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[2] | 0x0c00_0008 | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[3] | 0x0c00_000c | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[4] | 0x0c00_0010 | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[5] | 0x0c00_0014 | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[6] | 0x0c00_0018 | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[7] | 0x0c00_001c | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[8] | 0x0c00_0020 | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[9] | 0x0c00_0024 | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[10] | 0x0c00_0028 | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[11] | 0x0c00_002c | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[12] | 0x0c00_0030 | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[13] | 0x0c00_0034 | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[14] | 0x0c00_0038 | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[15] | 0x0c00_003c | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PRIORITY[16] | 0x0c00_0040 | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| PENDING | 0x0c00_1000 | sources | 16:1 | ro | — | yes | OKAY | ERROR |
| ENABLE | 0x0c00_2000 | sources | 16:1 | rw | 0x0 | no | OKAY | OKAY |
| THRESHOLD | 0x0c20_0000 | level | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| CLAIM | 0x0c20_0004 | id | 4:0 | rw | 0x0 | yes | OKAY | OKAY |
| TXDATA | 0x1000_0000 | data | 7:0 | wo | — | no | ERROR | OKAY |
| STATUS | 0x1000_0004 | room | 0 | ro | — | yes | OKAY | ERROR |
| STATUS | 0x1000_0004 | rx_ready | 1 | ro | — | yes | OKAY | ERROR |
| STATUS | 0x1000_0004 | rx_full | 2 | ro | — | yes | OKAY | ERROR |
| IRQ_ENABLE | 0x1000_0008 | room | 0 | rw | 0x0 | no | OKAY | OKAY |
| IRQ_ENABLE | 0x1000_0008 | rx_ready | 1 | rw | 0x0 | no | OKAY | OKAY |
| RXDATA | 0x1000_000c | data | 7:0 | ro | — | yes | OKAY | ERROR |
| DIV | 0x1000_0010 | cycles | 15:0 | rw | 0x10 | no | OKAY | OKAY |
| DIR | 0x1000_1000 | value | 15:0 | rw | 0x0 | no | OKAY | OKAY |
| IN | 0x1000_1004 | value | 15:0 | ro | — | yes | OKAY | ERROR |
| OUT | 0x1000_1008 | value | 15:0 | rw | 0x0 | no | OKAY | OKAY |
| SET | 0x1000_100c | value | 15:0 | w1s | — | no | ERROR | OKAY |
| CLR | 0x1000_1010 | value | 15:0 | w1c | — | no | ERROR | OKAY |
| TGL | 0x1000_1014 | value | 15:0 | w1t | — | no | ERROR | OKAY |
| IRQ_ENABLE | 0x1000_1018 | value | 15:0 | rw | 0x0 | no | OKAY | OKAY |
| LEVEL_MODE | 0x1000_101c | value | 15:0 | rw | 0x0 | no | OKAY | OKAY |
| ACTIVE_HIGH | 0x1000_1020 | value | 15:0 | rw | 0xffff | no | OKAY | OKAY |
| STATUS | 0x1000_1024 | value | 15:0 | w1c | — | yes | OKAY | OKAY |
| MASKED_STATUS | 0x1000_1028 | value | 15:0 | ro | — | yes | OKAY | ERROR |
| RUN | 0x1000_2000 | run | 0 | rw | 0x0 | no | OKAY | OKAY |
| DUTY | 0x1000_2004 | slots | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| CAPTURED | 0x1000_2008 | slot | 1:0 | ro | — | yes | OKAY | ERROR |
| DIV_TOP | 0x1000_200c | top | 7:0 | rw | 0x0 | no | OKAY | OKAY |
| COMPARE | 0x1000_2010 | slot | 1:0 | rw | 0x0 | no | OKAY | OKAY |
| IRQ_CLEAR | 0x1000_2014 | match | 0 | wo | — | no | ERROR | OKAY |
| IRQ_ENABLE | 0x1000_2018 | match | 0 | rw | 0x0 | no | OKAY | OKAY |
| EVENT | 0x1000_2020 | enable | 0 | rw | 0x0 | no | OKAY | OKAY |
| EVENT | 0x1000_2020 | online | 1 | ro | — | yes | OKAY | OKAY |
| EVENT | 0x1000_2020 | kick | 2 | wo | — | no | OKAY | OKAY |
| EVENT | 0x1000_2020 | pending | 3 | w1c | — | yes | OKAY | OKAY |
| EVENT | 0x1000_2020 | seen | 4 | rc | — | yes | OKAY | OKAY |
| EVENT | 0x1000_2020 | route | 5 | rw | 0x0 | yes | OKAY | OKAY |
| EVENT_COUNT_LOW | 0x1000_2024 | value | 31:0 | ro | — | yes | OKAY | ERROR |
| EVENT_COUNT_HIGH | 0x1000_2028 | value | 31:0 | ro | — | yes | OKAY | ERROR |
| CHIP_ID | 0x1000_4000 | value | 31:0 | ro | 0x2a5310c5 | no | OKAY | ERROR |
| RESET_CAUSE | 0x1000_4004 | power_on | 0 | ro | — | yes | OKAY | ERROR |
| RESET_CAUSE | 0x1000_4004 | pin | 1 | ro | — | yes | OKAY | ERROR |
| RESET_CAUSE | 0x1000_4004 | watchdog | 2 | ro | — | yes | OKAY | ERROR |
| RESET_CAUSE | 0x1000_4004 | software | 3 | ro | — | yes | OKAY | ERROR |
| RESET_CAUSE | 0x1000_4004 | debug | 4 | ro | — | yes | OKAY | ERROR |
| SOFT_RESET | 0x1000_4008 | timer | 0 | wo | — | no | ERROR | OKAY |
| SOFT_RESET | 0x1000_4008 | chip | 1 | wo | — | no | ERROR | OKAY |
| STRAPS | 0x1000_400c | boot | 0 | ro | — | yes | OKAY | ERROR |
| PINMUX | 0x1000_4010 | select | 31:0 | rw | 0x0 | no | OKAY | OKAY |
| CLK_GATE | 0x1000_4014 | uart0 | 0 | rw | 0x1 | no | OKAY | OKAY |
| CLK_GATE | 0x1000_4014 | gpio | 1 | rw | 0x1 | no | OKAY | OKAY |
| CLK_GATE | 0x1000_4014 | timer | 2 | rw | 0x1 | no | OKAY | OKAY |
| CLK_GATE | 0x1000_4014 | spi | 3 | rw | 0x1 | no | OKAY | OKAY |
| CLK_GATE | 0x1000_4014 | dma | 4 | rw | 0x1 | no | OKAY | OKAY |
| LOCK | 0x1000_4018 | pinmux | 0 | w1s | 0x0 | no | OKAY | OKAY |
| LOCK | 0x1000_4018 | clk_gate | 1 | w1s | 0x0 | no | OKAY | OKAY |
| LOCK | 0x1000_4018 | debug | 2 | w1s | 0x0 | no | OKAY | OKAY |
| TB_STATUS | 0x1000_4020 | value | 31:0 | rw | 0x0 | no | OKAY | OKAY |
| TB_PUTC | 0x1000_4024 | value | 31:0 | rw | 0x0 | no | OKAY | OKAY |
| TB_EVENT | 0x1000_4028 | value | 31:0 | rw | 0x0 | no | OKAY | OKAY |
| TB_ARG | 0x1000_402c | value | 31:0 | rw | 0x0 | no | OKAY | OKAY |
| DATA | 0x1000_5000 | command | 7:0 | wo | — | no | OKAY | OKAY |
| DATA | 0x1000_5000 | received | 23:0 | ro | — | yes | OKAY | OKAY |
| STATUS | 0x1000_5004 | busy | 0 | ro | — | yes | OKAY | OKAY |
| STATUS | 0x1000_5004 | done | 1 | w1c | — | yes | OKAY | OKAY |
| IRQ_ENABLE | 0x1000_5008 | done | 0 | rw | 0x0 | no | OKAY | OKAY |
| SRC | 0x1000_6000 | address | 31:0 | rw | 0x0 | no | OKAY | OKAY |
| DST | 0x1000_6004 | address | 31:0 | rw | 0x0 | no | OKAY | OKAY |
| LEN | 0x1000_6008 | bytes | 31:0 | rw | 0x0 | no | OKAY | OKAY |
| START | 0x1000_600c | start | 0 | wo | — | no | ERROR | OKAY |
| STATUS | 0x1000_6014 | busy | 0 | ro | — | yes | OKAY | OKAY |
| STATUS | 0x1000_6014 | done | 1 | w1c | — | yes | OKAY | OKAY |
| STATUS | 0x1000_6014 | fault | 2 | w1c | — | yes | OKAY | OKAY |
| IRQ_ENABLE | 0x1000_6018 | done | 0 | rw | 0x0 | no | OKAY | OKAY |
| IRQ_ENABLE | 0x1000_6018 | fault | 1 | rw | 0x0 | no | OKAY | OKAY |
| REQUEST | 0x1000_8000 | sleep | 0 | wo | — | no | ERROR | OKAY |
| REQUEST | 0x1000_8000 | wake | 1 | wo | — | no | ERROR | OKAY |
| STATUS | 0x1000_8004 | state | 2:0 | ro | — | yes | OKAY | ERROR |
| STATUS | 0x1000_8004 | isolate | 4 | ro | — | yes | OKAY | ERROR |
| STATUS | 0x1000_8004 | save | 5 | ro | — | yes | OKAY | ERROR |
| STATUS | 0x1000_8004 | power_on | 6 | ro | — | yes | OKAY | ERROR |
| WAKE_ENABLE | 0x1000_8008 | pad | 0 | rw | 0x0 | no | OKAY | OKAY |
| WAKE_ENABLE | 0x1000_8008 | watchdog | 1 | rw | 0x0 | no | OKAY | OKAY |
| WAKE_CAUSE | 0x1000_800c | pad | 0 | w1c | — | yes | OKAY | OKAY |
| WAKE_CAUSE | 0x1000_800c | watchdog | 1 | w1c | — | yes | OKAY | OKAY |
| WAKE_CAUSE | 0x1000_800c | software | 2 | w1c | — | yes | OKAY | OKAY |
| IRQ_ENABLE | 0x1000_8010 | cause | 2:0 | rw | 0x0 | no | OKAY | OKAY |
| Hole | Address |
|---|---|
| The APB page nobody owns | 0x1000_7000 |
| Reserved APB pages | 0x1000_9000 to 0x1000_FFFF |
| No region at all | 0x4000_0000 |
| Just past SRAM | 0x8001_0000 |
| ap_plic priority of source 0 | 0x0C00_0000 |
| ap_clint: an offset with no register | 0x0200_0008 |
| Each APB page | base + 0xFFC |
Rows: who op address data mask expect delay repeat (two words, four hex numbers, two decimal numbers). A core r row checks (value & mask) == (expect & mask). Rows core re and core we must answer ERROR. A core poll row reads until the masked value matches, at most data reads. The bench manual lists every row.
Given Files
Read-only files supplied by the bench.
The sequence table · bench manual
One row a line: who op address data mask expect delay repeat. Two words, four hex numbers, two decimal numbers. delay: cycles to wait before the row. repeat: how often the row runs. A line that starts with # is a comment. With +core=bfm the table is the test: the bench writes TB_STATUS = 2 before the first row and the pass or fail word after the last. With +core=cpu a table holds the bench's side of a firmware test.
| who | op | Meaning |
|---|---|---|
core | w wh wb | Write a word, a half, a byte of data at address; the answer must be OKAY |
core | r rh rb | Read; (value & mask) must equal (expect & mask) |
core | we re | Write or read that must answer ERROR |
core | wq rq | As w and r, with the next row's address phase on this row's data phase (back to back) |
core | poll | Read until the masked value is the expected one; data = the most reads (0: 1,000) |
core | irq | The interrupt pins now (bit 0 software, 1 timer, 2 external) against mask and expect |
core | wait_irq | Wait until a pin of mask is high; data = the most cycles |
core | idle | End a back-to-back run |
dma | copy | One job from address to data of mask bytes; STATUS must be expect (2 DONE, 4 FAULT) |
jtag | idcode | TAP reset, read IDCODE, compare |
jtag | halt resume step | Debug control (a halt waits for the core) |
jtag | rr rw | Read or write the register numbered address (0x1000 + n, a CSR, 0x7b0, 0x7b1) |
jtag | stream | Start background word reads at address A, count D, maximum random gap M, expected word E |
tb | wait_release | Wait for the system bus and core resets to release. Seat tables also hold each row at dispatch during reset. |
tb | watchdog | Set the seat stall limit to data system clocks (zero disables it). A stalled request reports its row, address and direction. |
tb | gaps | Maximum random gap D before each seat row, in system cycles (0 disables gaps) |
jtag | mr mw | Read or write a word of memory through the debug manager |
jtag | arm status | "Halt at reset" = data; {halted, error, busy} against mask and expect |
jtag | cmd | Command number address (0 to 7, facts 27.10) with the word data; its reply against mask and expect |
tb | uart_send | Send the byte data to the chip |
tb | uart_expect | The next byte from the chip must be expect; address = the most bit times to wait |
tb | gpio_set gpio_pulse | Pad address to level data; a pulse of data cycles of CLK |
tb | gpio_expect | The sixteen pads against mask and expect |
tb | reset supply | The reset pin, or the supply, for data cycles of CLK |
tb | wait_event | Wait until the test writes address to TB_EVENT |
tb | arg | Deposit data in TB_ARG |
tb | wait_status | Wait until (TB_STATUS & mask) equals (expect & mask) |
tb | poke peek | Back-door write of mask bytes (0: 4) of data; back-door read against mask, expect |
tb | wait | Only the delay |
sym | a symbol name | Back-door write of data to that C variable, with the symbol's size |
core and dma rows need +core=bfm. soc-rows.mjs turns a list of core and tb rows into both forms: a table for the seat, or a table in SRAM for an interpreter in ROM, with a hand-shake wherever the list goes from one side to the other.
## The sequence table
One row a line: `who op address data mask expect delay repeat`. Two words, four hex numbers, two decimal
numbers. `delay`: cycles to wait before the row. `repeat`: how often the row runs. A line that starts with `# `
is a comment. With `+core=bfm` the table is the test: the bench writes TB_STATUS = 2 before the first row and
the pass or fail word after the last. With `+core=cpu` a table holds the bench's side of a firmware test.
| who | op | Meaning |
| --- | --- | --- |
| `core` | `w` `wh` `wb` | Write a word, a half, a byte of `data` at `address`; the answer must be OKAY |
| `core` | `r` `rh` `rb` | Read; `(value & mask)` must equal `(expect & mask)` |
| `core` | `we` `re` | Write or read that must answer ERROR |
| `core` | `wq` `rq` | As `w` and `r`, with the next row's address phase on this row's data phase (back to back) |
| `core` | `poll` | Read until the masked value is the expected one; `data` = the most reads (0: 1,000) |
| `core` | `irq` | The interrupt pins now (bit 0 software, 1 timer, 2 external) against `mask` and `expect` |
| `core` | `wait_irq` | Wait until a pin of `mask` is high; `data` = the most cycles |
| `core` | `idle` | End a back-to-back run |
| `dma` | `copy` | One job from `address` to `data` of `mask` bytes; STATUS must be `expect` (2 DONE, 4 FAULT) |
| `jtag` | `idcode` | TAP reset, read IDCODE, compare |
| `jtag` | `halt` `resume` `step` | Debug control (a halt waits for the core) |
| `jtag` | `rr` `rw` | Read or write the register numbered `address` (`0x1000 + n`, a CSR, `0x7b0`, `0x7b1`) |
| `jtag` | `stream` | Start background word reads at address A, count D, maximum random gap M, expected word E |
| `tb` | `wait_release` | Wait for the system bus and core resets to release. Seat tables also hold each row at dispatch during reset. |
| `tb` | `watchdog` | Set the seat stall limit to `data` system clocks (zero disables it). A stalled request reports its row, address and direction. |
| `tb` | `gaps` | Maximum random gap D before each seat row, in system cycles (0 disables gaps) |
| `jtag` | `mr` `mw` | Read or write a word of memory through the debug manager |
| `jtag` | `arm` `status` | "Halt at reset" = `data`; `{halted, error, busy}` against `mask` and `expect` |
| `jtag` | `cmd` | Command number `address` (0 to 7, facts 27.10) with the word `data`; its reply against `mask` and `expect` |
| `tb` | `uart_send` | Send the byte `data` to the chip |
| `tb` | `uart_expect` | The next byte from the chip must be `expect`; `address` = the most bit times to wait |
| `tb` | `gpio_set` `gpio_pulse` | Pad `address` to level `data`; a pulse of `data` cycles of CLK |
| `tb` | `gpio_expect` | The sixteen pads against `mask` and `expect` |
| `tb` | `reset` `supply` | The reset pin, or the supply, for `data` cycles of CLK |
| `tb` | `wait_event` | Wait until the test writes `address` to TB_EVENT |
| `tb` | `arg` | Deposit `data` in TB_ARG |
| `tb` | `wait_status` | Wait until `(TB_STATUS & mask)` equals `(expect & mask)` |
| `tb` | `poke` `peek` | Back-door write of `mask` bytes (0: 4) of `data`; back-door read against `mask`, `expect` |
| `tb` | `wait` | Only the delay |
| `sym` | a symbol name | Back-door write of `data` to that C variable, with the symbol's size |
`core` and `dma` rows need `+core=bfm`. `soc-rows.mjs` turns a list of `core` and `tb` rows into both forms: a
table for the seat, or a table in SRAM for an interpreter in ROM, with a hand-shake wherever the list goes from
one side to the other.
ap_clint · register manual
| Offset | Register | Bits | Field | Access | Reset | Held by | Meaning |
|---|---|---|---|---|---|---|---|
0x000000 | MSIP | 0 | msip | rw | 0x0 | block | Machine software interrupt request of hart 0. 1 raises the request. |
0x004000 | MTIMECMP_LOW | 31:0 | value | rw | 0xFFFFFFFF | block | Low word of mtimecmp. Compare value, low word. |
0x004004 | MTIMECMP_HIGH | 31:0 | value | rw | 0xFFFFFFFF | block | High word of mtimecmp. Compare value, high word. |
0x00BFF8 | MTIME_LOW | 31:0 | value | rw | 0x00000000 | block | Low word of mtime. Time, low word. |
0x00BFFC | MTIME_HIGH | 31:0 | value | rw | 0x00000000 | block | High word of mtime. Time, high word. |
## ap_clint (base 0x0200_0000, clk_sys, PD_MAIN) | Offset | Register | Bits | Field | Access | Reset | Held by | Meaning | | --- | --- | --- | --- | --- | --- | --- | --- | | `0x000000` | MSIP | 0 | msip | rw | `0x0` | block | Machine software interrupt request of hart 0. 1 raises the request. | | `0x004000` | MTIMECMP_LOW | 31:0 | value | rw | `0xFFFFFFFF` | block | Low word of mtimecmp. Compare value, low word. | | `0x004004` | MTIMECMP_HIGH | 31:0 | value | rw | `0xFFFFFFFF` | block | High word of mtimecmp. Compare value, high word. | | `0x00BFF8` | MTIME_LOW | 31:0 | value | rw | `0x00000000` | block | Low word of mtime. Time, low word. | | `0x00BFFC` | MTIME_HIGH | 31:0 | value | rw | `0x00000000` | block | High word of mtime. Time, high word. |
ap_plic · register manual
| Offset | Register | Bits | Field | Access | Reset | Held by | Meaning |
|---|---|---|---|---|---|---|---|
0x004 + 4 × (n − 1), n = 1 to 16 | PRIORITY | 2:0 | level | rw | 0x0 | block | Priority of source n, 0 to 7. 0 never competes. Priority. |
0x001000 | PENDING | 16:1 | sources | ro | block | Pending bits; bit number = source ID. One bit for each source. | |
0x002000 | ENABLE | 16:1 | sources | rw | 0x0000 | block | Enable bits; bit number = source ID. One bit for each source. |
0x200000 | THRESHOLD | 2:0 | level | rw | 0x0 | block | The core sees a request only above this priority. Threshold. |
0x200004 | CLAIM | 4:0 | id | rw | 0x00 | block | Read: claim, returns the winner's ID and clears its pending bit. Write: complete, names the ID that is done. Source ID. |
## ap_plic (base 0x0C00_0000, clk_sys, PD_MAIN) | Offset | Register | Bits | Field | Access | Reset | Held by | Meaning | | --- | --- | --- | --- | --- | --- | --- | --- | | `0x004` + 4 × (n − 1), n = 1 to 16 | PRIORITY | 2:0 | level | rw | `0x0` | block | Priority of source n, 0 to 7. 0 never competes. Priority. | | `0x001000` | PENDING | 16:1 | sources | ro | | block | Pending bits; bit number = source ID. One bit for each source. | | `0x002000` | ENABLE | 16:1 | sources | rw | `0x0000` | block | Enable bits; bit number = source ID. One bit for each source. | | `0x200000` | THRESHOLD | 2:0 | level | rw | `0x0` | block | The core sees a request only above this priority. Threshold. | | `0x200004` | CLAIM | 4:0 | id | rw | `0x00` | block | Read: claim, returns the winner's ID and clears its pending bit. Write: complete, names the ID that is done. Source ID. |
ap_pwrctl · register manual
| Offset | Register | Bits | Field | Access | Reset | Held by | Meaning |
|---|---|---|---|---|---|---|---|
0x000 | REQUEST | 0 | sleep | wo | not stored | Starts a power sequence of PD_PER. 1 starts the switch-off. | |
0x000 | REQUEST | 1 | wake | wo | not stored | 1 starts the switch-on. | |
0x004 | STATUS | 2:0 | state | ro | block | Where the sequencer is, and the levels it drives. 0 on, 1 isolate, 2 save, 3 off, 4 switch on, 5 restore. | |
0x004 | STATUS | 4 | isolate | ro | block | Isolation enable. | |
0x004 | STATUS | 5 | save | ro | block | Retention save level. | |
0x004 | STATUS | 6 | power_on | ro | block | Power switch closed. | |
0x008 | WAKE_ENABLE | 0 | pad | rw | 0x0 | regs | Which events may wake PD_PER. The wake detector. |
0x008 | WAKE_ENABLE | 1 | watchdog | rw | 0x0 | regs | The watchdog's early warning. |
0x00C | WAKE_CAUSE | 0 | pad | w1c | block | Why the last wake happened. A written 1 clears a bit. The wake detector. | |
0x00C | WAKE_CAUSE | 1 | watchdog | w1c | block | The watchdog's early warning. | |
0x00C | WAKE_CAUSE | 2 | software | w1c | block | REQUEST bit 1. | |
0x010 | IRQ_ENABLE | 2:0 | cause | rw | 0x0 | regs | Which wake causes raise interrupt source 9. Numbered as WAKE_CAUSE. |
## ap_pwrctl (base 0x1000_8000, interrupt source 9, clk_aon, PD_AON) | Offset | Register | Bits | Field | Access | Reset | Held by | Meaning | | --- | --- | --- | --- | --- | --- | --- | --- | | `0x000` | REQUEST | 0 | sleep | wo | | not stored | Starts a power sequence of PD_PER. 1 starts the switch-off. | | `0x000` | REQUEST | 1 | wake | wo | | not stored | 1 starts the switch-on. | | `0x004` | STATUS | 2:0 | state | ro | | block | Where the sequencer is, and the levels it drives. 0 on, 1 isolate, 2 save, 3 off, 4 switch on, 5 restore. | | `0x004` | STATUS | 4 | isolate | ro | | block | Isolation enable. | | `0x004` | STATUS | 5 | save | ro | | block | Retention save level. | | `0x004` | STATUS | 6 | power_on | ro | | block | Power switch closed. | | `0x008` | WAKE_ENABLE | 0 | pad | rw | `0x0` | regs | Which events may wake PD_PER. The wake detector. | | `0x008` | WAKE_ENABLE | 1 | watchdog | rw | `0x0` | regs | The watchdog's early warning. | | `0x00C` | WAKE_CAUSE | 0 | pad | w1c | | block | Why the last wake happened. A written 1 clears a bit. The wake detector. | | `0x00C` | WAKE_CAUSE | 1 | watchdog | w1c | | block | The watchdog's early warning. | | `0x00C` | WAKE_CAUSE | 2 | software | w1c | | block | REQUEST bit 1. | | `0x010` | IRQ_ENABLE | 2:0 | cause | rw | `0x0` | regs | Which wake causes raise interrupt source 9. Numbered as WAKE_CAUSE. |
DMA · register manual
| Offset | Register | Bits | Field | Access | Reset | Held by | Meaning |
|---|---|---|---|---|---|---|---|
0x000 | SRC | 31:0 | address | rw | 0x00000000 | regs | The address of the first byte to read. Byte address. |
0x004 | DST | 31:0 | address | rw | 0x00000000 | regs | The address of the first byte to write. Byte address. |
0x008 | LEN | 31:0 | bytes | rw | 0x00000000 | regs | The number of bytes. Byte count. |
0x00C | START | 0 | start | wo | not stored | Bit 0 = 1 starts the job. Software writes it last. 1 starts the job. | |
0x014 | STATUS | 0 | busy | ro | block | Job state (new in v1.5). A job is running. | |
0x014 | STATUS | 1 | done | w1c | block | The last write of a job has finished. | |
0x014 | STATUS | 2 | fault | w1c | block | A bus error stopped the job. | |
0x018 | IRQ_ENABLE | 0 | done | rw | 0x0 | regs | Which status bits raise interrupt source 5 (new in v1.5). DONE raises the request. |
0x018 | IRQ_ENABLE | 1 | fault | rw | 0x0 | regs | FAULT raises the request. |
## DMA (base 0x1000_6000, interrupt source 5, clk_sys, PD_MAIN) | Offset | Register | Bits | Field | Access | Reset | Held by | Meaning | | --- | --- | --- | --- | --- | --- | --- | --- | | `0x000` | SRC | 31:0 | address | rw | `0x00000000` | regs | The address of the first byte to read. Byte address. | | `0x004` | DST | 31:0 | address | rw | `0x00000000` | regs | The address of the first byte to write. Byte address. | | `0x008` | LEN | 31:0 | bytes | rw | `0x00000000` | regs | The number of bytes. Byte count. | | `0x00C` | START | 0 | start | wo | | not stored | Bit 0 = 1 starts the job. Software writes it last. 1 starts the job. | | `0x014` | STATUS | 0 | busy | ro | | block | Job state (new in v1.5). A job is running. | | `0x014` | STATUS | 1 | done | w1c | | block | The last write of a job has finished. | | `0x014` | STATUS | 2 | fault | w1c | | block | A bus error stopped the job. | | `0x018` | IRQ_ENABLE | 0 | done | rw | `0x0` | regs | Which status bits raise interrupt source 5 (new in v1.5). DONE raises the request. | | `0x018` | IRQ_ENABLE | 1 | fault | rw | `0x0` | regs | FAULT raises the request. |
Examples
Example 1
The Good Chip- Input
your table
- Output
pass
Every bit in its place, every register at its own address, every hole an ERROR.
Example 2
A Hidden Faulty Chip- Input
your table on a faulty chip
- Output
fail
One fault in the scope; one row must see it.
Example 3
Reach- Input
a table that skips a block
- Output
refused if the block held a fault
A check cannot see where it does not go.
Constraints and Contract
- At most 1,024 rows.
- The good chip must pass. Each hidden faulty chip must fail one of your rows.
Hints
Hint 1
A walking one tests a bit in its own place; a pattern tests many at once.
Hint 2
Some blocks sit behind a slower bridge with its own return path.
Hint 3
Read-back values must differ between neighbours, or an alias passes.
What the grader checks: Your table runs on the pre-built ap_soc v1.5 bench with +core=bfm, on the good chip and on several hidden faulty chips. The good chip must pass with no bench error. The grader cannot see which rows caught a faulty chip.
1 checks on ap_soc v1.5 · bus seat · 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 3 problems on this path