V9.5.3 Synchronizer Latency and the Crossing Inventory

EasyImplement22 minIcarus Verilog · serverReview the topic

Classify crossings of ap_soc the way its crossing inventory does. Then work out how long a level takes to cross into the always-on clock.

Hardware context: The crossings of ap_soc v1.5 between clk_sys, clk_aon, TCK and the pads, and the always-on bridge. Synchronizer latency and the inventory's kinds.

clk_aon rises at 7, 21, 35 ns and every 14 ns after. ap_sync2 is two flip-flops on the receiving clock. A level that changes at t ns is taken by the first flop at the first rising edge after t. It shows at q one edge later. Times are in ns. Ignore metastability, which can add one edge.

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
CodeHow the crossing is made safe (the kind and how columns of tools/soc/ap_soc/gen/ap_soc_crossings.csv)
1sync2: a level through two flip-flops
2handshake: data held still while a synchronized level says it is valid
3static: changes only while the receiver is in reset or before it starts
4reset: asserted with no clock, released through flip-flops
5sampled on a clock the receiver makes itself

Measured on ap_soc v1.5 from the bus-manager seat (V9.5 lab). Seven reads behind the always-on bridge, at seven phases, took 12, 14, 11, 10, 11, 11, 11 cycles of clk_sys. A fast register took 2.

EntryYour decision
FIRST_EDGE_30A level changes at 30 ns. At which time does the first flip-flop take it?
Q_AT_30At which time does q show it?
Q_AT_100A level changes at 100 ns. When does q show it?
SLOW_MINThe quickest recorded read across the always-on bridge, in cycles of clk_sys.
SLOW_MAXThe slowest recorded read, in cycles of clk_sys.
KIND_WAKEThe wake pad into ap_pwrctl: three flip-flops on clk_aon.
KIND_PAYLOADThe address and data of the always-on bridge, copied while req is high.
KIND_STRAPThe sampled BOOT strap into ap_sysctl: set once, before the bus first leaves reset.
KIND_RESETNresetn_sys into the peripherals.
KIND_MISOThe SPI flash's answer into ap_spi.
Q_AT_TA level changes at T ns. At which time does q of ap_sync2 on clk_aon show it?

Examples

Example 1

FIRST EDGE 30
Input
A level changes at 30 ns. At which time does the first flip-flop take it?
Output
matches = 1

The first rising edge after 30 is 35.

Example 2

Q AT 30
Input
At which time does q show it?
Output
matches = 1

One edge later: 49.

Example 3

Q AT 100
Input
A level changes at 100 ns. When does q show it?
Output
matches = 1

Edges at 105 and 119: q at 119.

Constraints and Contract

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

Hints

Hint 1

Edges are at 7 + 14k: find the first one after the change.

Hint 2

Add one period, 14 ns.

Hint 3

Ask what makes the crossing safe: flip-flops, a handshake, a time when nothing samples, or a clock the receiver makes.

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

15 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

FIRST EDGE 30

Input
A level changes at 30 ns. At which time does the first flip-flop take it?
Expected output
matches = 1

The first rising edge after 30 is 35.

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

Icarus Verilog · server