S1.6.1 Five Facts from the Document

EasyImplement12 minIcarus Verilog · serverReview the topic

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

SignalWidthRole
question8input of each check
Full specification
SlotDeviceFirst addressSize
0UART00x1000_00000x1000
1GPIO0x1000_10000x1000
2Timer and PWM0x1000_20000x1000
3Watchdog0x1000_30000x1000
4ap_sysctl0x1000_40000x1000
5SPI0x1000_50000x1000
6DMA0x1000_60000x1000
Interrupt sourceDevice
1UART0
2GPIO
3Timer and PWM
4SPI
5DMA
6Watchdog, as an early warning
7 to 16spare, no device
Bit of the reset cause registerSet by
0power-on reset
1the reset pin
2the watchdog
3software
4the 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 sourceFrequency
RC oscillator25 MHz
Crystal oscillator50 MHz
PLL100 MHz
EntryYour decision
UART_SOURCEWhich interrupt source is UART0?
GPIO_SLOTWhich slot of the memory map holds GPIO?
WATCHDOG_BITWhich bit of the reset cause register does the watchdog set?
SPI_SOURCEWhich interrupt source is SPI?
SPI_SLOTWhich slot of the memory map holds SPI?
PLL_MHZWhat is the frequency of the PLL output, in MHz?
SLOT_3_SOURCEWhich interrupt source belongs to the device at 0x1000_3000?
SPAREHow many interrupt sources have no device?
CAUSE_SLOTWhich slot holds the register that records the cause of a reset?
CAUSE_VALUEPower comes on. Later the watchdog resets the chip. What does the reset cause register read, as a decimal number?
NO_SOURCEHow many of the seven devices in the map have no interrupt source?
SOURCE_OF_SLOTWhich 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

Report a problem with this page

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

UART SOURCE

Input
Which interrupt source is UART0?
Expected output
matches = 1

The interrupt table lists UART0 at source 1.

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

Icarus Verilog · server