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
| Signal | Width | Role |
|---|---|---|
question | 8 | input of each check |
Full specification
| Code | How the crossing is made safe (the kind and how columns of tools/soc/ap_soc/gen/ap_soc_crossings.csv) |
|---|---|
| 1 | sync2: a level through two flip-flops |
| 2 | handshake: data held still while a synchronized level says it is valid |
| 3 | static: changes only while the receiver is in reset or before it starts |
| 4 | reset: asserted with no clock, released through flip-flops |
| 5 | sampled 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.
| Entry | Your decision |
|---|---|
| FIRST_EDGE_30 | A level changes at 30 ns. At which time does the first flip-flop take it? |
| Q_AT_30 | At which time does q show it? |
| Q_AT_100 | A level changes at 100 ns. When does q show it? |
| SLOW_MIN | The quickest recorded read across the always-on bridge, in cycles of clk_sys. |
| SLOW_MAX | The slowest recorded read, in cycles of clk_sys. |
| KIND_WAKE | The wake pad into ap_pwrctl: three flip-flops on clk_aon. |
| KIND_PAYLOAD | The address and data of the always-on bridge, copied while req is high. |
| KIND_STRAP | The sampled BOOT strap into ap_sysctl: set once, before the bus first leaves reset. |
| KIND_RESETN | resetn_sys into the peripherals. |
| KIND_MISO | The SPI flash's answer into ap_spi. |
| Q_AT_T | A 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