Reconstruct a DMA queue from a service calendar and decide whether more storage can buy enough time.
Hardware context: UART receive to DMA to SRAM. Streaming peripheral and memory integration
Use an initially empty UART receive FIFO. DMA removes one old byte on a service edge when one is waiting. The receiver then accepts one offered byte if space remains. An unaccepted byte stays offered.
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
Exercise calendar: capacity two bytes. Offer a byte on every edge starting at e0. Service is available on e2, e5, e8 and every third edge thereafter. Entries name edges by their integer index.
| Entry | Your decision |
|---|---|
| FIRST | Occupancy after e0? |
| SECOND | Occupancy after e1? |
| SERVED | Total removals through e2? |
| BLOCK | First edge on which an offer must wait? |
| COUNT | Total accepted through e8? |
| RATE | Over 12 consecutive busy edges, how many bytes leave? |
| LATENCY | First removal edge minus first acceptance edge? |
| BURST | With unlimited storage, what minimum depth accepts 9 offers through e8? |
| HEAD | Two destinations share a FIFO. Head needs a busy bank, second needs a free bank. How many can issue in order now? |
| STALL | Keep the same service calendar. At depth DEPTH, what is the first blocked edge? |
Examples
Example 1
FIRST- Input
Occupancy after e0?
- Output
value = 1
One offer occupies the empty FIFO.
Example 2
SECOND- Input
Occupancy after e1?
- Output
value = 2
Another offer fills its last slot.
Example 3
SERVED- Input
Total removals through e2?
- Output
value = 1
DMA has its first service opportunity at e2.
Constraints and Contract
- Keep the parameter and named constants. Use the numeric codes and units on this page.
- For STALL, enter a constant expression using DEPTH. Only this entry changes with the parameter. The supported integer range is 1 through 8, inclusive.
Hints
Hint 1
Work from left to right, one edge at a time.
Hint 2
Remove first, then decide whether the next offer fits.
Hint 3
A busy destination matters only when the waiting request needs it.
What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.
13 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