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
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
| Code | Region | Base | Size | Bus | Clock | Power | Interrupt |
|---|---|---|---|---|---|---|---|
| 1 | Boot ROM | 0x0000_0000 | 0x0000_1000 | AHB | clk_sys | PD_MAIN | 0 |
| 2 | ap_clint | 0x0200_0000 | 0x0001_0000 | AHB | clk_sys | PD_MAIN | 0 |
| 3 | ap_plic | 0x0C00_0000 | 0x0040_0000 | AHB | clk_sys | PD_MAIN | 0 |
| 4 | UART0 | 0x1000_0000 | 0x0000_1000 | fast APB | clk_sys | PD_MAIN | 1 |
| 5 | GPIO | 0x1000_1000 | 0x0000_1000 | fast APB | clk_sys | PD_MAIN | 2 |
| 6 | Timer and PWM | 0x1000_2000 | 0x0000_1000 | fast APB | clk_sys | PD_PER | 3 |
| 7 | Watchdog | 0x1000_3000 | 0x0000_1000 | slow APB | clk_aon | PD_AON | 6 |
| 8 | ap_sysctl | 0x1000_4000 | 0x0000_1000 | fast APB | clk_sys | PD_MAIN | 0 |
| 9 | SPI | 0x1000_5000 | 0x0000_1000 | fast APB | clk_sys | PD_PER | 4 |
| 10 | DMA | 0x1000_6000 | 0x0000_1000 | fast APB | clk_sys | PD_MAIN | 5 |
| 11 | ap_pwrctl | 0x1000_8000 | 0x0000_1000 | slow APB | clk_aon | PD_AON | 9 |
| 12 | SRAM | 0x8000_0000 | 0x0001_0000 | AHB | clk_sys | PD_MAIN | 0 |
| Code | Bus |
|---|---|
| 1 | AHB |
| 2 | fast APB |
| 3 | slow APB |
| 4 | nobody: a hole |
| Entry | Your decision |
|---|---|
| OWNER_10000004 | Code of the region that answers 0x1000_0004. |
| BUS_WATCHDOG | Bus code of the watchdog. |
| IRQ_DMA | Interrupt input of the DMA. |
| OWNER_80001000 | Code of the region that answers 0x8000_1000. |
| BUS_10007000 | Bus code of the address 0x1000_7000. |
| TIMER_OFF | Can the timer lose its power while UART0 keeps it? (1 yes, 0 no) |
| PWRCTL_IRQ | Interrupt input of ap_pwrctl. |
| GATE_RESET | What CLK_GATE reads after reset. |
| GATE_UART_OFF | The CLK_GATE value that stops only UART0's clock. |
| CHIP_ID_ADDR | Address of CHIP_ID. |
| CHIP_ID | What a read of CHIP_ID returns. |
| CLK_GATE_ADDR | Address of CLK_GATE. |
| RUNS | A 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