S5.3.1 Colour the Domains

MediumImplement22 minIcarus Verilog · serverReview the topic

Mark each pair of clock pins on a timing review and decide which paths need a common edge calendar.

Hardware context: ap_soc timer crossing. Clock planning for peripherals

This exercise revision of ap_crg has one master H, a rising-edge divide-by-two P, and an independent crystal R. A debug selector changes the source of the service clock.

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

Use 1 for identical active edges. Use 2 for different edges with a guaranteed relationship. Use 3 for independent clocks. Ideal buffers preserve edge identity. The dividers have fixed reset phase.

EntryYour decision
BUSAHB and SRAM both take rising H.
BRIDGEBridge source uses H and its sink uses P.
CRYSTALAlarm launches on R and arrives at an H register.
SERVICETwo service registers both use R.
MIRRORSecond oscillator trimmed to the same nominal rate as H feeds debug. Compare with H.
PHASEOne register launches on falling H and another captures on rising H.
PINSGPIO and UART both use rising P.
SLOWA divide-by-four from H launches into P.
SELECTEDCompare service with H when SEL chooses H (0), P (1) or R (2).

Examples

Example 1

BUS
Input
AHB and SRAM both take rising H.
Output
matches = 1

Both use the same rising edges. Record BUS = 1.

Example 2

BRIDGE
Input
Bridge source uses H and its sink uses P.
Output
matches = 1

P has a known parent and phase. Record BRIDGE = 2.

Example 3

CRYSTAL
Input
Alarm launches on R and arrives at an H register.
Output
matches = 1

R has its own oscillator. Record CRYSTAL = 3.

Constraints and Contract

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

Hints

Hint 1

Start at the clock pin, including its active edge.

Hint 2

Trace both pins to their roots and inspect every divider.

Hint 3

Repeat the comparison after switching service mode.

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

11 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

BUS

Input
AHB and SRAM both take rising H.
Expected output
matches = 1

Both use the same rising edges. Record BUS = 1.

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

Icarus Verilog · server