S8.7.1 Where Does It Back Up

MediumImplement22 minIcarus Verilog · serverReview the topic

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

SignalWidthRole
question8input 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.

EntryYour decision
FIRSTOccupancy after e0?
SECONDOccupancy after e1?
SERVEDTotal removals through e2?
BLOCKFirst edge on which an offer must wait?
COUNTTotal accepted through e8?
RATEOver 12 consecutive busy edges, how many bytes leave?
LATENCYFirst removal edge minus first acceptance edge?
BURSTWith unlimited storage, what minimum depth accepts 9 offers through e8?
HEADTwo destinations share a FIFO. Head needs a busy bank, second needs a free bank. How many can issue in order now?
STALLKeep 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

Report a problem with this page

Your code SystemVerilogSaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs samples
Not run yet

FIRST

Input
Occupancy after e0?
Expected output
value = 1

One offer occupies the empty FIFO.

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

Icarus Verilog · server