S4.10.2 Budget the Peripheral Branch

MediumImplement22 minIcarus Verilog · serverReview the topic

Decide when splitting the peripheral branch actually meets a service deadline.

Hardware context: Three single-word register interfaces. Peripheral subsystem design

A GPIO logger and a timer sampler each write four words per frame. Both are ready at the start. All clocks are identical. Count whole periods from first setup to last completion.

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

Each APB transfer takes one setup and one access plus peripheral waits. GPIO adds one wait per word. The timer adds none. A shared branch serializes all work. Two independent branches start together and overlap fully. Ignore ingress and crossing overhead for this exercise.

EntryYour decision
GPIO_WORDPeriods for one GPIO word?
TIMER_WORDPeriods for one timer word?
WORDSTotal words per frame?
SHAREDPeriods for the frame on one branch?
SPLITPeriods for the frame on independent branches?
SAVEDPeriods saved by splitting?
MARGINUnused periods on the split design under a 16-period deadline?
LIMITMost extra waits a single GPIO word can gain before the split frame exceeds 16 periods?
CAN_SHAREA different frame allows 22 periods. One timer word gains EXTRA waits. Return 1 if a shared branch meets the deadline, else 0.

Examples

Example 1

GPIO WORD
Input
Periods for one GPIO word?
Output
value = 3

Setup, access and one wait occupy three periods.

Example 2

TIMER WORD
Input
Periods for one timer word?
Output
value = 2

Setup and access occupy two periods.

Example 3

WORDS
Input
Total words per frame?
Output
value = 8

Two writers send four words each.

Constraints and Contract

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

Hints

Hint 1

Count occupied periods for each device.

Hint 2

Add intervals on a shared link.

Hint 3

For independent branches compare finishing times.

What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.

18 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

GPIO WORD

Input
Periods for one GPIO word?
Expected output
value = 3

Setup, access and one wait occupy three periods.

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

Icarus Verilog · server