S5.3.3 Pick the Scheme for Each Crossing

MediumImplement22 minIcarus Verilog · serverReview the topic

Choose a crossing that preserves the promise made to the consumer.

Hardware context: ap_soc timer crossing. Clock planning for peripherals

Two unrelated clocks feed a telemetry port. Four crossing macros are available. Select the simplest listed macro that meets each receiver’s needs.

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

Code 1 samples a persistent single level through two flops. Code 2 toggles an event bit and detects its change. Here it requires four receiver periods between events. Code 3 transfers one held request, with optional payload, and waits for an acknowledgement. Code 4 queues ordered words across the clocks. Each source obeys its macro’s ready or full indication.

EntryYour decision
CABLECable present stays steady until observed. Only its current state matters.
TICKA narrow tick can recur every six receiver periods. Each tick must count.
BLOCKFour ordered words may arrive before the reader starts. The producer needs four free entries.
CONFIGA changing 16-bit configuration must arrive intact. Only one update may be outstanding.
IDLEA stable, single idle flag has no associated payload.
DONEA completion pulse repeats at most once per four receiver periods.
BURSTEight consecutive samples arrive during a reader pause. All eight must survive.
CLEARA command may wait, but the sender needs confirmation before issuing another.
EVENTOne event at a time, no payload. GAP gives guaranteed receiver periods between offers. Sender can wait for acknowledgement if necessary.

Examples

Example 1

CABLE
Input
Cable present stays steady until observed. Only its current state matters.
Output
matches = 1

A persistent state can be sampled as a level. Record CABLE = 1.

Example 2

TICK
Input
A narrow tick can recur every six receiver periods. Each tick must count.
Output
matches = 1

The toggle persists between suitably spaced ticks. Record TICK = 2.

Example 3

BLOCK
Input
Four ordered words may arrive before the reader starts. The producer needs four free entries.
Output
matches = 1

The FIFO can hold multiple outstanding words. Record BLOCK = 4.

Constraints and Contract

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

Hints

Hint 1

Decide whether the receiver wants a value or every event.

Hint 2

Count words that must survive while the receiver waits.

Hint 3

Compare the shortest possible spacing with the macro contract.

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

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

CABLE

Input
Cable present stays steady until observed. Only its current state matters.
Expected output
matches = 1

A persistent state can be sampled as a level. Record CABLE = 1.

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

Icarus Verilog · server