V6.6.1 Make the Lost Error Show

EasyBreak It15 minap_soc v1.5 · bus seat · serverReview the topic

A faulty chip loses the error answers of its slow peripheral bus. Every value still reads right. Write the table that passes on the good chip and makes the faulty one fail.

Hardware context: The SRAM wrapper, the bridges and the checkers of ap_soc v1.5 under stimulus only the seat makes. Making a lost error answer show.

Here is the faulty chip, stated plainly. The slow APB, behind the asynchronous bridge, holds the watchdog and ap_pwrctl. On this chip the bridge drops the slow side's error bit on its way back, so every slow access answers OKAY. Reads still return the right values, and writes still land.

Write a table that passes on the good chip and fails visibly on this one. A row that does not get its expected answer is a visible failure. The table cannot hang: every row ends.

Full specification
WindowBaseOn the slow APB?
Watchdog0x1000_3000yes: KEY 0x00, CONTROL 0x04, SERVICE 0x08, all write only
ap_pwrctl0x1000_8000yes: REQUEST 0x00 write only, STATUS 0x04 read only, WAKE_ENABLE 0x08, WAKE_CAUSE 0x0C, IRQ_ENABLE 0x10
Reserved APB pages0x1000_9000 to 0x1000_FFFFno: the fast APB answers them
UART0, GPIO, ap_sysctl, DMA0x1000_0000 and upno

The rule of ap_soc (facts 27.6): an access answers ERROR when its offset holds no register. So does a write of a register with no writable field, or a read of one with no readable field. Never write ap_pwrctl REQUEST: it switches a power domain off.

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.

whoopMeaning
corew wh wbWrite a word, a half, a byte of data at address; the answer must be OKAY
corer rh rbRead; (value & mask) must equal (expect & mask)
corewe reWrite or read that must answer ERROR
corewq rqAs w and r, with the next row's address phase on this row's data phase (back to back)
corepollRead until the masked value is the expected one; data = the most reads (0: 1,000)
coreirqThe interrupt pins now (bit 0 software, 1 timer, 2 external) against mask and expect
corewait_irqWait until a pin of mask is high; data = the most cycles
coreidleEnd a back-to-back run
dmacopyOne job from address to data of mask bytes; STATUS must be expect (2 DONE, 4 FAULT)
jtagidcodeTAP reset, read IDCODE, compare
jtaghalt resume stepDebug control (a halt waits for the core)
jtagrr rwRead or write the register numbered address (0x1000 + n, a CSR, 0x7b0, 0x7b1)
jtagstreamStart background word reads at address A, count D, maximum random gap M, expected word E
tbwait_releaseWait for the system bus and core resets to release. Seat tables also hold each row at dispatch during reset.
tbwatchdogSet the seat stall limit to data system clocks (zero disables it). A stalled request reports its row, address and direction.
tbgapsMaximum random gap D before each seat row, in system cycles (0 disables gaps)
jtagmr mwRead or write a word of memory through the debug manager
jtagarm status"Halt at reset" = data; {halted, error, busy} against mask and expect
jtagcmdCommand number address (0 to 7, facts 27.10) with the word data; its reply against mask and expect
tbuart_sendSend the byte data to the chip
tbuart_expectThe next byte from the chip must be expect; address = the most bit times to wait
tbgpio_set gpio_pulsePad address to level data; a pulse of data cycles of CLK
tbgpio_expectThe sixteen pads against mask and expect
tbreset supplyThe reset pin, or the supply, for data cycles of CLK
tbwait_eventWait until the test writes address to TB_EVENT
tbargDeposit data in TB_ARG
tbwait_statusWait until (TB_STATUS & mask) equals (expect & mask)
tbpoke peekBack-door write of mask bytes (0: 4) of data; back-door read against mask, expect
tbwaitOnly the delay
syma symbol nameBack-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.

Watchdog · register manual
OffsetRegisterBitsFieldAccessResetHeld byMeaning
0x000KEY31:0valuewonot stored0x51, then 0xA2 on the next watchdog write, unlocks one write to CONTROL. Key word.
0x004CONTROL31:0valuewonot storedWrite 1 while unlocked: armed. Arms once. 1 arms the watchdog.
0x008SERVICE31:0valuewonot storedWrite 1: the kick. 1 is a kick.
ap_pwrctl · register manual
OffsetRegisterBitsFieldAccessResetHeld byMeaning
0x000REQUEST0sleepwonot storedStarts a power sequence of PD_PER. 1 starts the switch-off.
0x000REQUEST1wakewonot stored1 starts the switch-on.
0x004STATUS2:0stateroblockWhere the sequencer is, and the levels it drives. 0 on, 1 isolate, 2 save, 3 off, 4 switch on, 5 restore.
0x004STATUS4isolateroblockIsolation enable.
0x004STATUS5saveroblockRetention save level.
0x004STATUS6power_onroblockPower switch closed.
0x008WAKE_ENABLE0padrw0x0regsWhich events may wake PD_PER. The wake detector.
0x008WAKE_ENABLE1watchdogrw0x0regsThe watchdog's early warning.
0x00CWAKE_CAUSE0padw1cblockWhy the last wake happened. A written 1 clears a bit. The wake detector.
0x00CWAKE_CAUSE1watchdogw1cblockThe watchdog's early warning.
0x00CWAKE_CAUSE2softwarew1cblockREQUEST bit 1.
0x010IRQ_ENABLE2:0causerw0x0regsWhich wake causes raise interrupt source 9. Numbered as WAKE_CAUSE.

Examples

Example 1

The Good Chip
Input
your table
Output
pass

Every row gets the answer the rule promises, ERROR included.

Example 2

The Faulty Chip
Input
the same table
Output
fail: a row expected ERROR and got OKAY

Only an access that must fail can show an error that was lost.

Example 3

What Does Not Count
Input
an error asked of a fast page
Output
refused

The fast APB answers there, so the faulty chip still says ERROR.

Constraints and Contract

  • At most 16 rows; no write of ap_pwrctl REQUEST.
  • The good chip runs first and must pass; the stated faulty chip must then fail visibly.

Hints

Hint 1

Which slow accesses must answer ERROR on a good chip?

Hint 2

A read that returns the right value tells you nothing on this chip.

Hint 3

Is the reserved space at 0x1000_9000 behind the same bridge?

What the grader checks: Your table runs on the good chip, which must pass, and then on the stated faulty chip, which must fail visibly.

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

Report a problem with this page

Your code Sequence tableSaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs samples
Not run yet

The Good Chip

Input
your table
Expected output
pass

Every row gets the answer the rule promises, ERROR included.

Run samples executes all 1 public checks. Check all tests runs 1 checks on the server.

ap_soc v1.5 · bus seat · server