Write the access check of the whole chip from its register description, as one table on the seat. It must pass on ap_soc and fail on every faulty chip of a hidden set.
Hardware context: The register description of ap_soc v1.5 (regs/*.json, the register-model table) turned into a sweep. An access check of the whole chip that catches hidden faults.
The register-model table of ap_soc describes 79 registers in 10 blocks. Write the access part of the register sweep. Every register whose fields are all plain read-and-write must take written values and give them back. Then put each one back to its reset value, so the rest of the table finds the chip as reset left it.
Leave TB_STATUS, TB_PUTC and TB_EVENT alone. Registers with any read-only, write-only, write-1 or read-to-clear field are not part of this check.
Your table must pass on the good chip and fail on each chip of a hidden set. Each hidden chip has one fault somewhere in the registers' paths. 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 |
ap_plic's priority word of source n is at 0x0C00_0000 + 4n, for n from 1 to 16; the lines above show the first. The watchdog has no readable register and no plain field.
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_sysctl · register manual
| Offset | Register | Bits | Field | Access | Reset | Held by | Meaning |
|---|---|---|---|---|---|---|---|
0x000 | CHIP_ID | 31:0 | value | ro | 0x2A5310C5 | const | The chip's identity: the IDCODE of the TAP. Fixed number. |
0x004 | RESET_CAUSE | 0 | power_on | ro | block | Sticky record of reset sources since power-on. Power-on reset. | |
0x004 | RESET_CAUSE | 1 | pin | ro | block | Reset pin. | |
0x004 | RESET_CAUSE | 2 | watchdog | ro | block | Watchdog. | |
0x004 | RESET_CAUSE | 3 | software | ro | block | Software request. | |
0x004 | RESET_CAUSE | 4 | debug | ro | block | Debug request. | |
0x008 | SOFT_RESET | 0 | timer | wo | not stored | Reset requests from software. 1 arms one restart of the timer. | |
0x008 | SOFT_RESET | 1 | chip | wo | not stored | 1 requests the software reset (new in v1.5). | |
0x00C | STRAPS | 0 | boot | ro | block | Straps as sampled at power-up (new in v1.5). 0: start in the boot ROM. 1: start in SRAM. | |
0x010 | PINMUX | 31:0 | select | rw | 0x00000000 | regs | Two bits for each of sixteen pads: 0 released, 1 GPIO, 2 serial, 3 auxiliary. Pad n uses bits 2n+1 and 2n. |
0x014 | CLK_GATE | 0 | uart0 | rw | 0x1 | regs | 1 lets that block's clock run (new in v1.5). UART0. |
0x014 | CLK_GATE | 1 | gpio | rw | 0x1 | regs | GPIO. |
0x014 | CLK_GATE | 2 | timer | rw | 0x1 | regs | Timer and PWM. |
0x014 | CLK_GATE | 3 | spi | rw | 0x1 | regs | SPI. |
0x014 | CLK_GATE | 4 | dma | rw | 0x1 | regs | DMA. |
0x018 | LOCK | 0 | pinmux | w1s | 0x0 | regs | Write-once locks. Only a reset clears one (new in v1.5). 1: PINMUX ignores writes. |
0x018 | LOCK | 1 | clk_gate | w1s | 0x0 | regs | 1: CLK_GATE ignores writes. |
0x018 | LOCK | 2 | debug | w1s | 0x0 | regs | 1: the debug lock is closed. |
0x020 | TB_STATUS | 31:0 | value | rw | 0x00000000 | regs (power-on reset only) | Scratch word 0. The firmware kit reports progress, pass and fail here. Plain storage. |
0x024 | TB_PUTC | 31:0 | value | rw | 0x00000000 | regs (power-on reset only) | Scratch word 1. The firmware kit writes one character here. Plain storage. |
0x028 | TB_EVENT | 31:0 | value | rw | 0x00000000 | regs (power-on reset only) | Scratch word 2. The firmware kit writes an event number here. Plain storage. |
0x02C | TB_ARG | 31:0 | value | rw | 0x00000000 | regs (power-on reset only) | Scratch word 3. A bench leaves a word for the firmware here. Plain storage. |
## ap_sysctl (base 0x1000_4000, clk_sys, PD_MAIN) | Offset | Register | Bits | Field | Access | Reset | Held by | Meaning | | --- | --- | --- | --- | --- | --- | --- | --- | | `0x000` | CHIP_ID | 31:0 | value | ro | `0x2A5310C5` | const | The chip's identity: the IDCODE of the TAP. Fixed number. | | `0x004` | RESET_CAUSE | 0 | power_on | ro | | block | Sticky record of reset sources since power-on. Power-on reset. | | `0x004` | RESET_CAUSE | 1 | pin | ro | | block | Reset pin. | | `0x004` | RESET_CAUSE | 2 | watchdog | ro | | block | Watchdog. | | `0x004` | RESET_CAUSE | 3 | software | ro | | block | Software request. | | `0x004` | RESET_CAUSE | 4 | debug | ro | | block | Debug request. | | `0x008` | SOFT_RESET | 0 | timer | wo | | not stored | Reset requests from software. 1 arms one restart of the timer. | | `0x008` | SOFT_RESET | 1 | chip | wo | | not stored | 1 requests the software reset (new in v1.5). | | `0x00C` | STRAPS | 0 | boot | ro | | block | Straps as sampled at power-up (new in v1.5). 0: start in the boot ROM. 1: start in SRAM. | | `0x010` | PINMUX | 31:0 | select | rw | `0x00000000` | regs | Two bits for each of sixteen pads: 0 released, 1 GPIO, 2 serial, 3 auxiliary. Pad n uses bits 2n+1 and 2n. | | `0x014` | CLK_GATE | 0 | uart0 | rw | `0x1` | regs | 1 lets that block's clock run (new in v1.5). UART0. | | `0x014` | CLK_GATE | 1 | gpio | rw | `0x1` | regs | GPIO. | | `0x014` | CLK_GATE | 2 | timer | rw | `0x1` | regs | Timer and PWM. | | `0x014` | CLK_GATE | 3 | spi | rw | `0x1` | regs | SPI. | | `0x014` | CLK_GATE | 4 | dma | rw | `0x1` | regs | DMA. | | `0x018` | LOCK | 0 | pinmux | w1s | `0x0` | regs | Write-once locks. Only a reset clears one (new in v1.5). 1: PINMUX ignores writes. | | `0x018` | LOCK | 1 | clk_gate | w1s | `0x0` | regs | 1: CLK_GATE ignores writes. | | `0x018` | LOCK | 2 | debug | w1s | `0x0` | regs | 1: the debug lock is closed. | | `0x020` | TB_STATUS | 31:0 | value | rw | `0x00000000` | regs (power-on reset only) | Scratch word 0. The firmware kit reports progress, pass and fail here. Plain storage. | | `0x024` | TB_PUTC | 31:0 | value | rw | `0x00000000` | regs (power-on reset only) | Scratch word 1. The firmware kit writes one character here. Plain storage. | | `0x028` | TB_EVENT | 31:0 | value | rw | `0x00000000` | regs (power-on reset only) | Scratch word 2. The firmware kit writes an event number here. Plain storage. | | `0x02C` | TB_ARG | 31:0 | value | rw | `0x00000000` | regs (power-on reset only) | Scratch word 3. A bench leaves a word for the firmware here. Plain storage. |
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 plain register takes its values and gives them back.
Example 2
A Hidden Faulty Chip- Input
your table on a faulty chip
- Output
fail
One register path is wrong; a row must see it.
Example 3
What Does Not Count- Input
values that clear every bit
- Output
refused
A bit that never holds a 1 is never tested.
Constraints and Contract
- At most 600 rows.
- The good chip must pass. Each hidden faulty chip must fail one of your rows.
Hints
Hint 1
A value whose field is 1 bit wide must still be written as 1 and as 0.
Hint 2
Some blocks sit behind a slower bridge. Are they in your table?
Hint 3
A register left at a pattern can stop a block: CLK_GATE gates clocks.
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 of your 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 2 problems on this path