V7.4.2 Wait Times and the Promise

MediumImplement22 minIcarus Verilog · serverReview the topic

Work out who wins under each arbitration policy, read a recorded histogram of wait times, and state the bound round-robin promises.

Hardware context: The round-robin arbiter of each target of ap_soc's matrix. Who wins under each policy, and the bound.

Managers are numbered 0 debug, 1 DMA, 2 core data port, 3 core instruction port. With FAIR = 0 the lowest number wins. With FAIR = 1 (ap_soc as built) the search starts one above the manager served last and wraps (facts 27.7). Recorded (record-v7-labs.mjs): the seat read SRAM 513 times back to back beside a DMA copy and debug reads. Its latencies were 1 cycle 320 times, 2 cycles 97 times, 3 cycles 96 times. The DMA's 192 SRAM transfers each took 1 cycle. The same table on a build with FAIR = 0 gave the same numbers. Enter a code or a whole number.

This worksheet uses named constants. The first three entries show how to record your decisions.

Replace each unresolved value of 65535 with your result.

Signals in the Timeline

SignalWidthRole
question8input of each check
Full specification
CodeManager
1Debug manager (0)
2DMA (1)
3Core data port, the seat (2)
4Core instruction port (3)
EntryYour decision
FIXED_WINNERFAIR = 0. All four managers ask for SRAM in one cycle. Who wins?
RR_NEXTFAIR = 1. The DMA was served last; all four ask. Who wins?
RR_WRAPFAIR = 1. The core instruction port was served last; the DMA and the seat ask. Who wins?
BOUNDFAIR = 1, four managers. At most how many transfers of others go before a waiting transfer?
SEAT_WORSTThe seat's worst recorded latency, in cycles.
SEAT_SLOWHow many of the seat's transfers took more than 1 cycle?
SAMEThe seat's worst latency on the FAIR = 0 build, in cycles.
RR_BOUNDRound-robin with MANAGERS_N managers that all ask: at most how many transfers of others go before a waiting transfer?

Examples

Example 1

FIXED WINNER
Input
FAIR = 0. All four managers ask for SRAM in one cycle. Who wins?
Output
matches = 1

The lowest number.

Example 2

RR NEXT
Input
FAIR = 1. The DMA was served last; all four ask. Who wins?
Output
matches = 1

The search starts one above the DMA.

Example 3

RR WRAP
Input
FAIR = 1. The core instruction port was served last; the DMA and the seat ask. Who wins?
Output
matches = 1

The search wraps to 0, finds no request, then takes the DMA.

Constraints and Contract

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

Hints

Hint 1

The lowest number that asks.

Hint 2

Start one above the last served, wrap, take the first that asks.

Hint 3

Count and subtract.

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

FIXED WINNER

Input
FAIR = 0. All four managers ask for SRAM in one cycle. Who wins?
Expected output
matches = 1

The lowest number.

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

Icarus Verilog · server