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.
| Cycle | hsel | haddr | hrdata RTL | hrdata gates |
|---|---|---|---|---|
| 0 | 0 | 0x0 | xxxx_xxxx | xxxx_xxxx |
| 1 | 1 | 0x0 | 5555_5553 | 5555_5553 |
| 2 | x | 0x0 | 5555_5553 | XXXX_XXXX |
| 3 | 1 | 0x4 | aaaa_aaac | aaaa_aaac |
| 4 | 1 | 0x4 | aaaa_aaac | aaaa_aaac |
| 5 | 0 | 0x4 | aaaa_aaac | aaaa_aaac |
| 6 | 0 | 0x4 | aaaa_aaac | aaaa_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
| Cycle | HRESETn | HSEL | HADDR (hex) | HREADYOUT | HRESP | RTL HRDATA | Gate HRDATA |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 00000000 | 1 | 0 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 1 | 1 | 1 | 00000000 | 1 | 0 | 01010101010101010101010101010011 | 01010101010101010101010101010011 |
| 2 | 1 | x | 00000000 | 1 | 0 | 01010101010101010101010101010011 | 0x0x0x0x0x0x0x0x0x0x0x0x0x0x00xx |
| 3 | 1 | 1 | 00000004 | 1 | 0 | 10101010101010101010101010101100 | 10101010101010101010101010101100 |
| 4 | 1 | 1 | 00000004 | 0 | 1 | 10101010101010101010101010101100 | 10101010101010101010101010101100 |
| 5 | 1 | 0 | 00000004 | 1 | 1 | 10101010101010101010101010101100 | 10101010101010101010101010101100 |
| 6 | 1 | 0 | 00000004 | 1 | 0 | 10101010101010101010101010101100 | 10101010101010101010101010101100 |
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).
| Cycle | HRESETn | HSEL | HADDR (hex) | HREADYOUT | HRESP | RTL HRDATA | Gate HRDATA |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 00000000 | 1 | 0 | xxxxxxxx | xxxxxxxx |
| 1 | 1 | 1 | 00000000 | 1 | 0 | 55555553 | 55555553 |
| 2 | 1 | x | 00000000 | 1 | 0 | 55555553 | XXXXXXXX |
| 3 | 1 | 1 | 00000004 | 1 | 0 | aaaaaaac | aaaaaaac |
| 4 | 1 | 1 | 00000004 | 0 | 1 | aaaaaaac | aaaaaaac |
| 5 | 1 | 0 | 00000004 | 1 | 1 | aaaaaaac | aaaaaaac |
| 6 | 1 | 0 | 00000004 | 1 | 0 | aaaaaaac | aaaaaaac |