Read an excerpt of the ap_soc architecture document. Find facts in one table, then facts that need two tables.
Hardware context: An excerpt of the ap_soc architecture document and a small top level. Specification reading and spec-against-RTL checks
You join the team of ap_soc. Your first task is to answer questions from its architecture document. The excerpt has four tables.
This worksheet uses named constants. The first three entries show how to record your decisions.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
| Slot | Device | First address | Size |
|---|---|---|---|
| 0 | UART0 | 0x1000_0000 | 0x1000 |
| 1 | GPIO | 0x1000_1000 | 0x1000 |
| 2 | Timer and PWM | 0x1000_2000 | 0x1000 |
| 3 | Watchdog | 0x1000_3000 | 0x1000 |
| 4 | ap_sysctl | 0x1000_4000 | 0x1000 |
| 5 | SPI | 0x1000_5000 | 0x1000 |
| 6 | DMA | 0x1000_6000 | 0x1000 |
| Interrupt source | Device |
|---|---|
| 1 | UART0 |
| 2 | GPIO |
| 3 | Timer and PWM |
| 4 | SPI |
| 5 | DMA |
| 6 | Watchdog, as an early warning |
| 7 to 16 | spare, no device |
| Bit of the reset cause register | Set by |
|---|---|
| 0 | power-on reset |
| 1 | the reset pin |
| 2 | the watchdog |
| 3 | software |
| 4 | the debugger |
The reset cause register is in ap_sysctl, at offset 4. A power-on reset sets it to bit 0 alone. Every later reset adds its own bit.
| Clock source | Frequency |
|---|---|
| RC oscillator | 25 MHz |
| Crystal oscillator | 50 MHz |
| PLL | 100 MHz |
| Entry | Your decision |
|---|---|
| UART_SOURCE | Which interrupt source is UART0? |
| GPIO_SLOT | Which slot of the memory map holds GPIO? |
| WATCHDOG_BIT | Which bit of the reset cause register does the watchdog set? |
| SPI_SOURCE | Which interrupt source is SPI? |
| SPI_SLOT | Which slot of the memory map holds SPI? |
| PLL_MHZ | What is the frequency of the PLL output, in MHz? |
| SLOT_3_SOURCE | Which interrupt source belongs to the device at 0x1000_3000? |
| SPARE | How many interrupt sources have no device? |
| CAUSE_SLOT | Which slot holds the register that records the cause of a reset? |
| CAUSE_VALUE | Power comes on. Later the watchdog resets the chip. What does the reset cause register read, as a decimal number? |
| NO_SOURCE | How many of the seven devices in the map have no interrupt source? |
| SOURCE_OF_SLOT | Which interrupt source belongs to the device in slot SLOT of the memory map? Enter 0 if it has none. |
Examples
Example 1
UART SOURCE- Input
Which interrupt source is UART0?
- Output
matches = 1
The interrupt table lists UART0 at source 1.
Example 2
GPIO SLOT- Input
Which slot of the memory map holds GPIO?
- Output
matches = 1
The map lists GPIO at 0x1000_1000, which is slot 1.
Example 3
WATCHDOG BIT- Input
Which bit of the reset cause register does the watchdog set?
- Output
matches = 1
The reset table lists the watchdog at bit 2.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For SOURCE_OF_SLOT, enter a constant expression using SLOT. Only this entry changes with the parameter. The supported integer range is 0 through 6, inclusive.
Hints
Hint 1
Addresses are in the map, sources in the interrupt table, causes in the reset table.
Hint 2
A device name found in one table is the key to the next.
Hint 3
A device in one table and not in another is a fact too.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
12 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