Twelve Things Only a Chip Gets Wrong

Chip bugs fall into twelve classes, and every one lives on a boundary between parts. Learn the list, a story for each, and how a short walk over the memory map catches one of them.

You Will Be Able To

  • Name the twelve classes of chip-level bug.
  • Place a bug report in its class by finding the boundary it sits on.
  • Read a map walk and spot a hole that answers.
Lesson
V1.2
Time
24 min
Runs on
Your browser
Check
5 questions

The bring-up log has forty failures, and the team lead wants owners by noon. Some are wires, some are software, some are resets, and three look identical but are not. A short list of classes turns that pile into twelve smaller questions.

Twelve Places a Chip Goes WrongStep through the twelve classes. Each one sits on a boundary between parts that were made separately.
  • Processor
  • Memory
  • Bus
  • Control / FSM
  • Peripheral
  • Clock / reset
  • Debug
  • Pads
  • Data
  • Interrupt
  • Clock
  • Debug
Twelve Places a Chip Goes WrongStep through the twelve classes. Each one sits on a boundary between parts that were made separately. processor Core runs the firmware memory ROM and SRAM boot code, data bus Bus fabric decoder, arbiter control Interruptcontroller sources 1 to 6 peripheral Peripherals UART0, GPIO, timer clock reset Clock, reset,power sources, order,domains debug Debug JTAG door pads Pads and pin mux the only way out boot fetchloads, storesrequestinterruptsignalsclocks, resets, powerhalt, step
  1. control Interrupt controllersources 1 to 6
    • interrupt → Core
  2. peripheral PeripheralsUART0, GPIO, timer
    • request → Interrupt controller
    • signals → Pads and pin mux
  3. bus Bus fabricdecoder, arbiter
  4. processor Coreruns the firmware
    • loads, stores → Bus fabric
  5. pads Pads and pin muxthe only way out
  6. memory ROM and SRAMboot code, data
    • boot fetch → Core
  7. clock reset Clock, reset, powersources, order, domains
    • clocks, resets, power → Bus fabric
  8. debug DebugJTAG door
    • halt, step → Core
  1. 1 and 2. Connectivity; The memory map

    A wire missing, swapped, tied off or the wrong width. A region that does not decode, a hole that answers, two addresses that reach one register.

  2. 3 and 4. Hardware and software agreement; Use cases across blocks

    The header, the driver or start-up code disagrees with the registers. Each block works, but a byte in, an interrupt and a byte out do not.

  3. 5 and 6. Boot; Interrupts and DMA end to end

    Reset to first instruction to main fails in one boot mode. Source, controller, core, handler, completion: one link breaks.

  4. 7 and 8. Clock and reset; Power flows

    A block runs before its clock, leaves reset in the wrong order, or crosses domains unsafely. Sleep, wake, switch-off, isolation or retention goes wrong.

  5. 9 and 10. Security and locks; Debug and test mode

    Something that must not be reachable is reachable. The debugger cannot get in, or test mode breaks normal function.

  6. 11 and 12. Pins; Concurrency and performance

    A function on the wrong pad, the wrong direction, or the wrong state after reset. Two managers compete, and one waits too long or starves.

Read the diagram as text
  • Core: runs the firmware
  • ROM and SRAM: boot code, data
  • Bus fabric: decoder, arbiter
  • Interrupt controller: sources 1 to 6
  • Peripherals: UART0, GPIO, timer
  • Clock, reset, power: sources, order, domains
  • Debug: JTAG door
  • Pads and pin mux: the only way out
  • ROM and SRAM → Core: boot fetch
  • Core → Bus fabric: loads, stores
  • Peripherals → Interrupt controller: request
  • Interrupt controller → Core: interrupt
  • Peripherals → Pads and pin mux: signals
  • Clock, reset, power → Bus fabric: clocks, resets, power
  • Debug → Core: halt, step

An architecture drawing with a bug class pinned on each boundary. Every block shown can pass its own bench.

Before You Start

Read What the Block Bench Already Proved first. The map lab builds on The Memory Map and Address Decode and Aliases. The integration hunt of The Integration Bug Hunt shows three of these classes on real slices.

The labs of this module are small slices. They use the real addresses and interrupt numbers of ap_soc v1.5, and each page says so. The whole chip runs from module V2 on, and in the guided run of the fundamentals module.

Five questions this page answers
Question
1Why do chip bugs sit on boundaries?
2What are the twelve classes of chip-level bug?
3What does each class look like in a bring-up report?
4How does a map walk find a hole that answers?
5Why does naming the class come before fixing the bug?

The Idea: Bugs Live Where Teams Meet

Every block of a chip was built by one team and checked by its own bench. Every boundary between blocks was built by agreement: a table of wires, a memory map, a register header, a reset order. An agreement written in two places can drift apart, and nothing inside either block notices.

So chip bugs cluster on boundaries, and boundaries come in a few kinds. Experienced chip teams sort failures into classes before they chase them. The class tells you which document to open, which team to call, and which check was missing from the plan.

New Words

New words on this page
WordMeaning
Bug classA family of chip bugs that sit on the same kind of boundary and are found by the same kind of check.
Map walkA test that reads the first and last word of every region, and one address in every hole of the memory map.
HoleAn address range that belongs to no block. A read there must get an error response.
AliasOne register reached from two addresses, because a decoder looks at too few address bits.
Default subordinateThe part of the bus that answers every hole with an error.

The Twelve Classes

Twelve classes of chip-level bug
ClassOne real-shaped story
1ConnectivityThe SPI request output was left unconnected; the controller input is tied to 0.
2The memory mapA write to an empty address changes a GPIO register.
3Hardware and software agreementThe header calls bit 1 ROOM; the block uses bit 0.
4Use cases across blocksEvery block passes, but a typed byte never echoes back.
5BootWith the boot strap at 1, the core still fetches from ROM.
6Interrupts and DMA end to endThe DMA done interrupt fires once and never again.
7Clock and resetUART0 leaves reset before its clock starts.
8Power flowsAfter a wake, the timer outputs stay clamped to 0.
9Security and locksA write-once lock bit can be cleared by a second write.
10Debug and test modeThe debugger reads the wrong chip identity.
11PinsA GPIO pad drives out right after reset, with its direction bit at 0.
12Concurrency and performanceWith the DMA busy, instruction fetches wait so long that a timer interrupt is missed.

The stories are invented for teaching, in the shape of real reports. The list itself is the plan of this track (section 2.1); later modules give each class its own tests.

Notice what is missing: no story says a block computes the wrong answer. That belongs to the block bench. Each story is two parts that disagree.

The Rules

  1. Rule 1: Find the two parties.

    Every chip bug is a disagreement. Name both sides before you name the bug.

  2. Rule 2: Pick the narrowest class.

    An interrupt that never completes is class 6 before it is a broken use case.

  3. Rule 3: Each class needs its own check.

    A plan that has no test for a class will ship that class of bug.

Sources for These Rules

Mehta, ASIC/SoC Functional Design Verification, section 2.2: a plan has its own item for interconnect, low power, software and more.

The twelve-class list is this track's own (docs/soc-verification-plan.md section 2.1), drawn from common practice. No single book gives this list.

Now Run It: A Map Walk Finds a Hole That Answers

The integrated chip for this track is still being built, so this lab is a small slice. It holds a lab decoder with four regions of the ap_soc map, at their real v1.0 addresses. They are Boot ROM, UART0, GPIO and SRAM. The integrator wrote the GPIO compare by hand.

The test is a map walk. It probes the first and last word of each region, and one address in each hole of this lab's map. Address 0x1000_7000 is a real hole in ap_soc too, between the DMA page and the reserved space.

Printed by the lab (Icarus). Each row is one probe: address, what it is, which region answered, and the verdict.
00000000 ROM first    -> ROM   ok
00000ffc ROM last     -> ROM   ok
00001000 hole         -> ERROR ok
10000000 UART0 first  -> UART0 ok
10000ffc UART0 last   -> UART0 ok
10001000 GPIO first   -> GPIO  ok
10001ffc GPIO last    -> GPIO  ok
10007000 hole         -> GPIO  WRONG, want ERROR
80000000 SRAM first   -> SRAM  ok
8000fffc SRAM last    -> SRAM  ok
80010000 hole         -> ERROR ok
map walk: 1 of 11 reads wrong

Walk the rows. Ten probes land where the map says. The row for 10007000 says GPIO answered a hole, so writes there would change GPIO registers. The GPIO compare looks at bit 12 and the top sixteen bits, and forgets bits 15 to 13.

That is class 2, the memory map. A block test could never find it, because the decoder is not inside GPIO. The walk found it in eleven reads, without any software.

The Trap: Testing Only the Addresses That Work

A first chip test usually writes and reads one register in each block. Every read comes back right, and the map looks proved. But that test never touches a hole, so a decoder that answers holes, or aliases them, passes.

The cost shows up late. Firmware with a stray pointer writes into a hole, and a GPIO pin changes on the customer's board. Always probe the addresses that must fail, not only the ones that must work.

Try It

Run the lab and find the WRONG row.

Fix the GPIO compare to addr[31:12] == 20'h10001. Predict the last row.

Add a probe at 0x1000_3000. Before you run it, predict what the faulty decoder answers there.

RUNIcarus Verilog · in your browser
Edit the code, then run it
Expected: 00000000 ROM first -> ROM ok 00000ffc ROM last -> ROM ok 00001000 hole -> ERROR ok 10000000 UART0 first -> UART0 ok 10000ffc UART0 last -> UART0 ok 10001000 GPIO first -> GPIO ok 10001ffc GPIO last -> GPIO ok 10007000 hole -> GPIO WRONG, want ERROR 80000000 SRAM first -> SRAM ok 8000fffc SRAM last -> SRAM ok 80010000 hole -> ERROR ok map walk: 1 of 11 reads wrong

Check Yourself

Predict the outputThe GPIO compare becomes addr[31:13] == 19'h08000 && addr[12]. What is the last line the lab prints?
// A lab decoder with four regions of the ap_soc map (v1.0 addresses). Not the chip's fabric.
// The integrator wrote the GPIO compare by hand.
module lab_decoder (input logic [31:0] addr, output logic [2:0] sel);
  // 0 = no region (the default subordinate answers ERROR), 1 = Boot ROM, 2 = UART0, 3 = GPIO, 4 = SRAM
  always @(*) begin
    sel = 0;
    if (addr[31:12] == 20'h00000) sel = 1;
    else if (addr[31:12] == 20'h10000) sel = 2;
    else if (addr[31:13] == 19'h08000 && addr[12]) sel = 3;
    else if (addr[31:16] == 16'h8000) sel = 4;
  end
endmodule

module tb;
  logic [31:0] addr; logic [2:0] sel;
  function automatic string names(input int s);
    case (s) 1: return "ROM"; 2: return "UART0"; 3: return "GPIO"; 4: return "SRAM"; default: return "ERROR"; endcase
  endfunction
  int wrong = 0, total = 0;
  lab_decoder dut (.addr, .sel);
  task automatic probe(input logic [31:0] a, input int want, input string what);
    addr = a; #1 total++;
    if (sel == want) $display("%h %-12s -> %-5s ok", a, what, names(sel));
    else begin wrong++; $display("%h %-12s -> %-5s WRONG, want %s", a, what, names(sel), names(want)); end
  endtask
  initial begin
    probe(32'h0000_0000, 1, "ROM first");   probe(32'h0000_0FFC, 1, "ROM last");   probe(32'h0000_1000, 0, "hole");
    probe(32'h1000_0000, 2, "UART0 first"); probe(32'h1000_0FFC, 2, "UART0 last");
    probe(32'h1000_1000, 3, "GPIO first");  probe(32'h1000_1FFC, 3, "GPIO last");  probe(32'h1000_7000, 0, "hole");
    probe(32'h8000_0000, 4, "SRAM first");  probe(32'h8000_FFFC, 4, "SRAM last");  probe(32'h8001_0000, 0, "hole");
    $display("map walk: %0d of %0d reads wrong", wrong, total);
  end
endmodule
ConceptWhich report is a power-flow bug?
ConceptWhat must a read of a hole return?
ConceptIn the lab, which part is faulty?
ConceptWhy sort failures into classes before chasing them?

Common Mistakes

Wrong Probe only the registers that exist.

A hole that answers, or an alias, passes every such test.

Fix Probe every hole as well, and expect an error there.

Wrong File every chip failure under "integration".

One label gives no owner and no missing check.

Fix Name the class: wires, map, software, boot, interrupts, clocks, power, locks, debug, pins or concurrency.

Wrong Blame the block that showed the symptom.

In the lab, GPIO answered a hole, but GPIO is correct; the decoder is wrong.

Fix Find the two parties that disagree, then the boundary between them.

Remember

  • Every chip bug sits on a boundary between parts made separately.
  • Twelve classes: connectivity, map, software agreement, use cases, boot, interrupts and DMA, clock and reset, power, locks, debug and test, pins, concurrency.
  • Naming the class gives the owner and shows the missing check in the plan.
  • A map walk probes holes as well as regions; a hole must answer with an error.

Practice

Report a problem with this page