Two working peripherals share a board adapter. A firmware read can still reach the wrong register.
Hardware context: The I/O and startup adapters of a small SoC board. Debug address formation, decode, interrupt routing, pin selection and queue reads.
Two working peripherals share a board adapter. A firmware read can still reach the wrong register.
The starter has one defect at each of five boundaries. Repair the adapter without changing its ports.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
plan_index | 3 | input of each check |
Full specification
| Boundary | Required behavior |
|---|---|
| Software map | Form the UART byte address from its base 0x10000000 and the unsigned 12-bit offset. |
| Device select | Select GPIO throughout 0x10001000 through 0x10001fff. Ignore transfer direction for this output. |
| Interrupts | Drive UART receive on line 1 and GPIO on line 2. Both can request together. |
| Board pin | When uart_mode is high, drive tx. Otherwise drive gpio_bit. Both sources can change independently. |
| Queue access | Pulse pop on a completed read of 0x1000000c only. transfer_done marks completion for either direction. |
Examples
Example 1
Read and Write Sweep- Input
Cycle through seven addresses while every combination of seven control inputs appears.
- Output
map = 1, decode = 1, interrupt = 1, pin = 1, pop = 1
Each bit stays high while its boundary agrees with the board contract.
Example 2
Shift the Addresses- Input
Repeat the control patterns with the address order shifted by one slot.
- Output
map = 1, decode = 1, interrupt = 1, pin = 1, pop = 1
Changing input order must preserve each of the five agreements.
Example 3
GPIO Window Edges- Input
Shift by two slots. Check the first and last byte of the GPIO window.
- Output
map = 1, decode = 1, interrupt = 1, pin = 1, pop = 1
Changing input order must preserve each of the five agreements.
Constraints and Contract
- Keep the module name and every port.
- A zero result bit identifies a boundary that failed at least one observation.
- The five result bits follow the boundaries in order, most significant first.
Hints
Hint 1
Preserve the byte offset when forming an address.
Hint 2
Try both requests together, then drive opposite values on the pin sources.
Hint 3
Check the queue after a write and after an unfinished read.
What the grader checks: The private bench varies addresses, transfer direction, simultaneous requests and independent pad inputs. It checks combinational behavior.
8 checks on Icarus Verilog · server. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain your source only; samples require the simulation service. A passing result establishes the tested cases, not a proof for all possible inputs.
See all 2 problems on this path