S10.12.2 Model First: Predict the Throughput

MediumImplement22 minIcarus Verilog · serverReview the topic

Predict useful output from a finite batch, including startup, idle service slots and the last partially occupied interval.

Hardware context: Versioned subsystem with a finite work queue. Pre-silicon subsystem integration

This exercise queue begins empty. A producer offers six one-word tickets in order, starting at tick zero. It holds each ticket until accepted and stops after all six enter.

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

The queue has two entries. At each tick the sink can take one previously queued ticket on an even tick only. The producer can fill a slot freed on that tick. A ticket entering an empty queue cannot leave on the same tick.

A window of N ticks includes ticks 0 through N minus one. Count only departures as useful work.

EntryYour decision
SLOTSPhysical queue entries.
AT_ZERODepartures on tick zero.
AFTER_ONETickets stored just after tick one.
EARLIESTTick of the first departure.
BLOCKEDFirst tick with an offered ticket refused.
IN_SIXAdmissions in a window of six ticks.
OUT_SIXDepartures in a window of six ticks.
LAST_INTick accepting the sixth ticket.
LAST_OUTTick delivering the final ticket.
POSTOccupancy just after tick ten.
DELIVEREDTotal tickets delivered during WINDOW ticks.

Examples

Example 1

SLOTS
Input
Physical queue entries.
Output
matches = 1

There are two storage slots.

Example 2

AT ZERO
Input
Departures on tick zero.
Output
matches = 1

The first service opportunity sees an empty queue.

Example 3

AFTER ONE
Input
Tickets stored just after tick one.
Output
matches = 1

Two arrivals fill the two entries.

Constraints and Contract

  • Keep the parameter and named constants. Use the numeric codes and units on this page.
  • For DELIVERED, enter a constant expression using WINDOW. Only this entry changes with the parameter. The supported integer range is 1 through 17, inclusive.

Hints

Hint 1

Write the inclusive tick labels before counting service slots.

Hint 2

An accepted ticket may still be waiting when the window closes.

Hint 3

An empty service slot contributes zero departures.

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 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

SLOTS

Input
Physical queue entries.
Expected output
matches = 1

There are two storage slots.

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

Icarus Verilog · server