VF.1.2 Follow an Address

EasyImplement12 minIcarus Verilog · serverReview the topic

Follow addresses of ap_soc to the block, bus, clock and interrupt that answer them, and read the chip's clock-gate register.

Hardware context: ap_soc v1.5 read from its data files: managers, map, interrupts, clocks, power domains and pads. Following addresses and one register through the map.

The table below is generated from tools/soc/ap_soc/map.json, blocks.csv and irq.csv, as in the lesson's lab. CLK_GATE is at offset 0x14 of ap_sysctl, base 0x1000_4000. Bit 0 is UART0, 1 GPIO, 2 timer, 3 SPI, 4 DMA, and 1 lets the clock run. Yes is 1, no is 0.

This worksheet uses named constants. The first three entries show how to record your decisions.

Replace each unresolved value of 4294967295 with your result.

Signals in the Timeline

SignalWidthRole
question8input of each check
Full specification
CodeRegionBaseSizeBusClockPowerInterrupt
1Boot ROM0x0000_00000x0000_1000AHBclk_sysPD_MAIN0
2ap_clint0x0200_00000x0001_0000AHBclk_sysPD_MAIN0
3ap_plic0x0C00_00000x0040_0000AHBclk_sysPD_MAIN0
4UART00x1000_00000x0000_1000fast APBclk_sysPD_MAIN1
5GPIO0x1000_10000x0000_1000fast APBclk_sysPD_MAIN2
6Timer and PWM0x1000_20000x0000_1000fast APBclk_sysPD_PER3
7Watchdog0x1000_30000x0000_1000slow APBclk_aonPD_AON6
8ap_sysctl0x1000_40000x0000_1000fast APBclk_sysPD_MAIN0
9SPI0x1000_50000x0000_1000fast APBclk_sysPD_PER4
10DMA0x1000_60000x0000_1000fast APBclk_sysPD_MAIN5
11ap_pwrctl0x1000_80000x0000_1000slow APBclk_aonPD_AON9
12SRAM0x8000_00000x0001_0000AHBclk_sysPD_MAIN0
CodeBus
1AHB
2fast APB
3slow APB
4nobody: a hole
EntryYour decision
OWNER_10000004Code of the region that answers 0x1000_0004.
BUS_WATCHDOGBus code of the watchdog.
IRQ_DMAInterrupt input of the DMA.
OWNER_80001000Code of the region that answers 0x8000_1000.
BUS_10007000Bus code of the address 0x1000_7000.
TIMER_OFFCan the timer lose its power while UART0 keeps it? (1 yes, 0 no)
PWRCTL_IRQInterrupt input of ap_pwrctl.
GATE_RESETWhat CLK_GATE reads after reset.
GATE_UART_OFFThe CLK_GATE value that stops only UART0's clock.
CHIP_ID_ADDRAddress of CHIP_ID.
CHIP_IDWhat a read of CHIP_ID returns.
CLK_GATE_ADDRAddress of CLK_GATE.
RUNSA test writes 0x15 to CLK_GATE. Enter 1 if the clock of block B still runs, 0 if not. B: 0 UART0, 1 GPIO, 2 timer, 3 SPI, 4 DMA.

Examples

Example 1

OWNER 10000004
Input
Code of the region that answers 0x1000_0004.
Output
matches = 1

UART0 spans 0x1000_0000 to 0x1000_0FFF.

Example 2

BUS WATCHDOG
Input
Bus code of the watchdog.
Output
matches = 1

It runs on clk_aon, so it sits on the slow APB.

Example 3

IRQ DMA
Input
Interrupt input of the DMA.
Output
matches = 1

irq.csv: 5,DMA.

Constraints and Contract

  • Keep the parameter and named constants. Use the numeric codes and units on this page.
  • For RUNS, enter a constant expression using B. Only this entry changes with the parameter. The supported integer range is 0 through 4, inclusive.

Hints

Hint 1

An address belongs to a region if it is at least the base and below base plus size.

Hint 2

clk_aon blocks sit on the slow APB.

Hint 3

Bit n of CLK_GATE is one block's clock.

What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.

17 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

OWNER 10000004

Input
Code of the region that answers 0x1000_0004.
Expected output
matches = 1

UART0 spans 0x1000_0000 to 0x1000_0FFF.

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

Icarus Verilog · server