V9.6.2 Reset Crossings and the Gate-Level View

MediumImplement22 minIcarus Verilog · serverReview the topic

Decide which reset crossings of a chip are safe. Then read the recorded gate-level run of the boot ROM, and count what X-pessimism turns unknown.

Hardware context: Reset domains of ap_soc v1.5: a core-only reset beside a running fabric, the always-on bridge's guards, and a gate netlist. Safe and unsafe reset crossings and X-pessimism.

A reset-domain crossing is a path from a flop of one reset domain to a flop of another. The recorded run (tools/fixtures/soc-gate-waves.json) used Yosys 0.70+290 and Icarus 12. It holds the address of ap_ahb_rom still while its select is unknown. RTL keeps the word 0x55555553; the generic gate netlist shows 16 unknown bits.

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
CodeThe crossing
1Safe: the receiver is reset by the same reset
2Safe: the receiver ignores the input while the sender is in reset
3Unsafe: the receiver may act on a change the reset made
4Not a crossing: one domain

In the netlist the read data register is a multiplexer that picks the new word or keeps the old one. With the select unknown and both inputs equal, its AND-OR form gives X for every bit that is 1. Every bit that is 0 stays 0. The recorded RTL run keeps the word.

EntryYour decision
X_BITSHow many bits of the recorded word were unknown on the netlist?
RTL_X_BITSHow many were unknown in RTL?
CROSS_ACKThe always-on bridge's ack into the system side, whose synchronizer resets to 1.
CROSS_TOGGLEA request toggle, reset by the sender's warm reset, into an always-on receiver that takes every edge.
CROSS_PINThe core's bus port into the fabric, under a pin reset.
CROSS_COREThe core's bus port into the fabric, under a reset of the core alone.
CROSS_COUNTTwo counters on clk_sys, both on resetn_sys.
X_FOR_WThe same netlist holds the word W with its select unknown and its address held. How many bits does it show as X?

Examples

Example 1

X BITS
Input
How many bits of the recorded word were unknown on the netlist?
Output
matches = 1

0x55555553 has 16 bits set; each became X.

Example 2

RTL X BITS
Input
How many were unknown in RTL?
Output
matches = 1

The recorded RTL run keeps the word at that cycle: none of its bits is X.

Example 3

CROSS ACK
Input
The always-on bridge's ack into the system side, whose synchronizer resets to 1.
Output
matches = 1

After a warm reset of the system side it waits for a real ack = 0: it ignores what the reset made.

Constraints and Contract

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

Hints

Hint 1

Each set bit of the held word turns X.

Hint 2

Is the receiver reset with the sender? If not, does it ignore the input while the sender is in reset?

Hint 3

A crossing needs two clocks or two resets.

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

12 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

X BITS

Input
How many bits of the recorded word were unknown on the netlist?
Expected output
matches = 1

0x55555553 has 16 bits set; each became X.

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

Icarus Verilog · server