Find the smallest byte queue that survives a scheduled memory blackout and catches up before the next frame.
Hardware context: UART receive queue and DMA sink. SoC bandwidth budgeting
These are exercise values for an ap_soc capture channel. The queue starts empty. Each of eight active slots offers three bytes, followed by eight silent slots.
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
In slots 1 and 2, no bytes depart. From slot 3 onward RAM can remove up to two already queued bytes before arrivals enter. Unused service expires. Repeat the sixteen-slot frame.
| Entry | Your decision |
|---|---|
| FRAME | Slots in a frame? |
| OFFER | Bytes offered per frame? |
| AFTER_TWO | Queue after slot 2? |
| AFTER_THREE | Queue after slot 3? |
| DEPTH | Minimum byte capacity for no loss? |
| DRAIN | Silent slots needed to empty the peak? |
| EMPTY | First end-of-slot with an empty queue after the burst? |
| LOST | Bytes dropped in a frame with ten spaces, dropping newest excess bytes? |
| SPARE | Unused service bytes per frame at the lossless depth? |
| FIRST_PEAK | Replace the two-slot blackout with BLACKOUT active slots. Size for the first burst from empty. |
Examples
Example 1
FRAME- Input
Slots in a frame?
- Output
matches = 1
Eight active slots and eight silent slots make sixteen.
Example 2
OFFER- Input
Bytes offered per frame?
- Output
matches = 1
Eight groups of three arrive.
Example 3
AFTER TWO- Input
Queue after slot 2?
- Output
matches = 1
All six bytes wait through the blackout.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For FIRST_PEAK, enter a constant expression using BLACKOUT. Only this entry changes with the parameter. The supported integer range is 1 through 8, inclusive.
Hints
Hint 1
Start from the previous backlog and subtract only bytes present.
Hint 2
Count arrivals after the grant and save the largest level.
Hint 3
Continue into the silent slots to see whether the next frame starts empty.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
10 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