Find the owner and the offset of real 32-bit addresses in a memory map.
Hardware context: ap_soc memory map, four regions. Reading a memory map during bring-up
A decoder is being checked against this part of the ap_soc v1.0 memory map. For each address, decide which region contains it and how far inside it lies.
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
| Code | Owner | First address (base) | Size |
|---|---|---|---|
| 1 | Boot ROM | 0x0000_0000 | 0x1000 |
| 2 | UART0 | 0x1000_0000 | 0x1000 |
| 3 | GPIO | 0x1000_1000 | 0x1000 |
| 4 | SRAM | 0x8000_0000 | 0x1_0000 |
Use code 9 for an address that no region in this table contains. Enter offsets in bytes, as plain numbers.
| Entry | Your decision |
|---|---|
| OWNER_A | Owner code of address 0x1000_0000. |
| OFFSET_A | Offset of 0x1000_0000 inside its region. |
| OWNER_B | Owner code of address 0x1000_1004. |
| OFFSET_B | Offset of 0x1000_1004 inside its region. |
| OWNER_C | Owner code of address 0x0000_0FFC. |
| OWNER_D | Owner code of address 0x0000_1000. |
| OWNER_E | Owner code of address 0x1000_0FFF. |
| OWNER_F | Owner code of address 0x8000_FFFF. |
| OWNER_G | Owner code of address 0x8001_0000. |
| UART_REG | Registers are four bytes wide. Which UART0 register number contains address 0x1000_000C? |
| GPIO_DIGITS | How many leading hex digits must match to select GPIO? |
| GPIO_REG_OFFSET | Offset in bytes of GPIO register number N. Registers are four bytes wide, and the first one is number 0. |
Examples
Example 1
OWNER A- Input
Owner code of address 0x1000_0000.
- Output
matches = 1
UART0 starts exactly at 0x1000_0000.
Example 2
OFFSET A- Input
Offset of 0x1000_0000 inside its region.
- Output
matches = 1
The address equals the base, so nothing is left after subtracting.
Example 3
OWNER B- Input
Owner code of address 0x1000_1004.
- Output
matches = 1
GPIO runs from 0x1000_1000 to 0x1000_1FFF.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For GPIO_REG_OFFSET, enter a constant expression using N. Only this entry changes with the parameter. The supported integer range is 0 through 15, inclusive.
Hints
Hint 1
The last address of a region is its base plus its size, minus one.
Hint 2
An address belongs to a region only if it is at least the base and at most the last address.
Hint 3
What is left is the offset inside the region.
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 1 problem on this path