V8.6.1 The Word That Went Unknown

HardDebug25 minap_ahb_rom · recorded RTL and generic gatesReview the topic

The chip's boot ROM runs the same stimulus as RTL and as a gate netlist. The two recordings agree, then the netlist shows unknown bits where the RTL shows a word. Find the first cycle they differ, the register, and why.

The boot ROM of ap_soc v1.5 (ap_ahb_rom) was simulated twice on Icarus 12 with one stimulus. Once as RTL, once as a generic NAND netlist from Yosys. Each row is sampled just after a rising clock edge.

In one cycle the bench drives the ROM's select input to an unknown value on purpose, with the address held. The table below gives hrdata of both recordings in hex. A digit x has all four bits unknown, a digit X only some. The form under it shows every port, bit by bit. Name the first cycle where they differ, the signal that differs, and the cause.

Icarus Verilog version 12.0 (stable) (); Yosys 0.70+290. Words are in hex. A digit x has all four bits unknown. A digit X has some bits unknown and some known (IEEE 1800 clause 21.2.1.3).
Cyclehselhaddrhrdata RTLhrdata gates
000x0xxxx_xxxxxxxx_xxxx
110x05555_55535555_5553
2x0x05555_5553XXXX_XXXX
310x4aaaa_aaacaaaa_aaac
410x4aaaa_aaacaaaa_aaac
500x4aaaa_aaacaaaa_aaac
600x4aaaa_aaacaaaa_aaac
Full specification

The ROM registers its read data. On a rising edge with a read selected (hsel, hready, an active htrans, no write), it loads the addressed word. Otherwise hrdata keeps its value. hrdata has no reset. A write answers the two-cycle ERROR through hreadyout and hresp. The ROM image holds 0x5555_5553 at even words and 0xAAAA_AAAC at odd words.

Diagnose the Failing Run

CycleHRESETnHSELHADDR (hex)HREADYOUTHRESPRTL HRDATAGate HRDATA
0000000000010xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
11100000000100101010101010101010101010101001101010101010101010101010101010011
21x0000000010010101010101010101010101010100110x0x0x0x0x0x0x0x0x0x0x0x0x0x00xx
31100000004101010101010101010101010101010110010101010101010101010101010101100
41100000004011010101010101010101010101010110010101010101010101010101010101100
51000000004111010101010101010101010101010110010101010101010101010101010101100
61000000004101010101010101010101010101010110010101010101010101010101010101100
Show read data in hexadecimal

An x digit has four unknown bits. X marks a digit with some unknown bits (IEEE 1800-2017 §21.2.1.4).

CycleHRESETnHSELHADDR (hex)HREADYOUTHRESPRTL HRDATAGate HRDATA
0000000000010xxxxxxxxxxxxxxxx
11100000000105555555355555553
21x000000001055555553XXXXXXXX
3110000000410aaaaaaacaaaaaaac
4110000000401aaaaaaacaaaaaaac
5100000000411aaaaaaacaaaaaaac
6100000000410aaaaaaacaaaaaaac
Step 1 · The first bad cycle and signal
Step 2 · The cause