Skip to main content...
S2 · Verilog RTL Design
30 min

Day 92: Wiring peripherals into chipx_top

chipx_top is the whole SoC in one module — core, fabric, memories, peripherals. Integration is where system bugs surface.

Wiring peripherals into chipx_top

Assemble the full SoC in `chipx_top`: instantiate the core, the AXI fabric, boot ROM and SRAM, and every peripheral, wiring their AXI slave ports to the fabric and their interrupt lines back to the core. This top-level integration is where system-level issues appear — address-map overlaps, mis-wired interrupts, reset distribution — that no single module test would reveal.

chipx_top: the SoC integration (skeleton)
module chipx_top (
    input clk, rst_n,
    input rx, output tx,           // UART pins
    inout [15:0] gpio,             // GPIO pins
    // SPI, I2C pins ...
);
    core_sc_or_pipe u_core (.clk(clk), .rst_n(rst_n), .m_axi(cpu_axi), .irq(irq));
    axi_fabric      u_fab  (.m(cpu_axi), .s({rom, ram, uart_s, spi_s, i2c_s, gpio_s, tmr_s}));
    uart u_uart (.axi(uart_s), .rx(rx), .tx(tx), .irq(irq_uart));
    timer u_tmr (.axi(tmr_s), .irq(irq_timer));
    gpio  u_gpio(.axi(gpio_s), .pins(gpio), .irq(irq_gpio));
    // ... spi, i2c, memories ...
    assign irq = irq_uart | irq_timer | irq_gpio;   // (or a proper controller)
endmodule

Integration bugs are their own species

Every sub-block passed its self-check, yet the assembled system can still fail — an overlapping address range, a swapped interrupt line, a reset that doesn't reach one block. That's precisely why Stage 3 (verification) exists and is the biggest stage: unit correctness ≠ system correctness. A quick smoke test (blink an LED, echo a UART byte) at the top level catches the grossest wiring errors now.

Progress for Day 92

Why can chipx_top fail even when every sub-module passed its own self-checking testbench?

We use cookies

We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies. Learn more

    Day 92: Wiring peripherals into chipx_top | RBTechIconX