44 runs to signoff: closing timing on a RISC-V SoC with open-source tools
The architecture of an RV32IM microcontroller SoC, the open-source RTL-to-GDSII flow on SKY130, and the 44 tracked runs that took it from −10 ns of worst setup slack to tapeout-ready GDSII.
I wanted to take one design through each stage from RTL to a chip myself: architecture, RTL, firmware, physical design and signoff. So I designed a small microcontroller-class SoC around a RISC-V core. I took it to GDSII on SkyWater's open SKY130 PDK, with the same signoff checks that a commercial tapeout requires. Along the way, I tracked every implementation run.
The SoC
The core is an RV32IM processor with a 5-stage pipeline. The M extension adds hardware multiply and divide. The address selects where instructions come from. Below 0x8000_0000, the core fetches from a 2 KB on-chip SRAM. Above it, the core fetches through a 2 KB instruction cache that refills over the interconnect.
The rest of the SoC sits on an AXI4-Lite interconnect:
- an APB bridge for the UART, GPIO, SPI, timer and interrupt controller
- a boot loader that reads code from external SPI flash
- an SDR SDRAM controller for 32 MB of external memory, at 100 MHz in its own clock domain behind async FIFOs
A later variant adds a PCIe Gen1 x1 root port. Its PHY is a hard macro behind an on-chip 32-bit PIPE interface at 62.5 MHz. The lane uses analog pads, and the PHY has its own clamped supply pads.
I also wrote the bare-metal firmware: startup assembly, linker scripts, interrupt-driven tests and a two-stage boot loader. The boot loader copies code from SPI flash into SDRAM and jumps to it. The firmware tests run in RTL simulation with Verilator and Icarus Verilog. They run again in gate-level simulation with back-annotated routed delays.
The flow and the targets
The flow uses only open-source tools:
- Yosys for synthesis
- OpenROAD for floorplanning, placement, clock-tree synthesis and routing
- OpenSTA for timing
- OpenRCX for parasitic extraction
- Magic and KLayout for DRC
- Netgen for LVS
I fixed the targets at the start:
- a fixed die with an 82-pad I/O ring and a seal ring built to SkyWater's I/O guide
- setup timing at typical and at the slow corner (ss, 100 °C), and hold timing at the fast corner (ff, −40 °C)
- zero DRC, LVS and antenna errors, with fill and density inside the PDK limits
- IR drop and electromigration within limits
How I tracked the runs
Each implementation run changed one variable. I committed each run with its reports and a short journal entry: what changed, which metrics moved, and what to try next. Each run has the name of its change, so the history reads as a list of decisions: sram-channels, placement-padding, load-use-stall, hold-repair, kogge-stone, fetch-ahead, on-chip-variation.
Each run records the same metrics: worst negative slack (WNS), total negative slack (TNS), failing endpoints, the achievable frequency (Fmax), die size and utilization, power, IR drop, and the DRC, LVS and antenna counts. With the same columns on each run, it is easy to see which change moved which number. A few runs (02, 04 and 21 to 23) stopped before they produced timing reports. They stay in the journal, because a run that fails early still rules out an option.
Stage 1: the baseline
Run 01 was the baseline, with a 15 ns core clock and a 10 ns memory clock. The worst setup slack was −10.06 ns, and the total negative slack was −9075 ns. In total, 1210 endpoints failed, for an Fmax of 33.3 MHz. Magic reported 1943 DRC errors, LVS reported mismatches, and 65 nets had antenna violations.
The baseline reports gave the list of problems for the next stage.
Stage 2: physical fixes, then the first pipeline fix
| Run | Change | Worst setup slack | Failing endpoints |
|---|---|---|---|
| 01 | baseline | −10.06 ns | 1210 |
| 03 | routing channels around the SRAM macros | −8.86 ns | 1218 |
| 05 | cell padding in congested areas | −3.68 ns | 1209 |
| 06 | added an instruction register | −4.74 ns | 1275 |
| 07 | reworked the load-use stall logic | −0.23 ns | 19 |
| 08 | calibrated pre-route wire RC | +2.78 ns | 0 |
| 10 | global-route repair | +5.69 ns | 0 |
Run 03 opened routing channels around the SRAM macros, and the Magic DRC count went from 1943 to zero. Run 05 padded cells in the congested areas. The worst setup slack improved from −8.86 ns to −3.68 ns, and LVS matched for the first time.
Run 06 added an instruction register, and the slack got worse, at −4.74 ns. This showed that the critical path was elsewhere. Run 07 reworked the load-use stall logic. The slack moved to −0.23 ns, with only 19 failing endpoints. Run 08 calibrated the pre-route wire RC estimates, and the slack went positive for the first time, at +2.78 ns. By run 10, the design had +5.69 ns of slack and an Fmax of 69.9 MHz.
Stage 3: hold, clock crossings and antennas
The SDRAM port in run 11 brought 32 hold violations, with a worst hold slack of −0.256 ns. In run 12, I tried the hold repair of the tool first. It barely moved the result: −0.222 ns, still with 32 violations. The cause was structural, in the timing of the SDRAM interface. In run 13, I moved the SDRAM interface timing to the falling edge. Hold went to +0.074 ns, with zero violations.
Run 14 added bounded delay constraints to the SDRAM clock crossings. The SDRAM controller runs on its own clock behind async FIFOs. A false path would remove those crossings from timing analysis. A bounded constraint keeps each crossing checked. Run 15 repaired antennas with diodes and buffers and took the count from 74 nets to zero.
Run 16 raised utilization to 64% and shrank the die from 923 µm to 844 µm on a side. The denser layout had two antenna violations. Runs 17 and 19 cleared them with extra repair passes and antenna buffers.
Stage 4: power grid, multiplier and cache
From run 18, the journal also tracks IR drop, which started at 1.60 mV. Run 20 added the RV32M multiplier and the instruction cache. The die grew from 844 µm to 1178 µm, and core power rose from 16.7 mW to 31.7 mW. IR drop went to 2.89 mV, and setup slack fell back to −3.08 ns.
Runs 21 to 23 tried a two-cycle multiplier, resize-only repair and a 52% utilization target. All three stopped early. Run 24 lowered utilization to 45% on a 1361 µm die. Setup was met again at +2.08 ns, with an Fmax of 78.8 MHz.
Stage 5: PCIe and the move to 100 MHz
Run 26 brought in the PCIe root port and a third clock. Timing held at +1.43 ns, and core power rose to 45.7 mW. Runs 27 to 29 moved the PIPE interface timing to the falling edge, reworked the link resets and finished the antenna diodes.
Then, in run 30, I tightened the core clock from 15 ns to 10 ns. The slack fell to −4.11 ns, with 1904 failing endpoints. This time, the fixes had to be architectural:
| Run | Change | Worst setup slack | Failing endpoints | Core power |
|---|---|---|---|---|
| 30 | core clock to 10 ns (100 MHz) | −4.11 ns | 1904 | 63.3 mW |
| 31 | extra register-read stage | −0.39 ns | 10 | 66.7 mW |
| 32 | Kogge-Stone adder | −0.40 ns | 5 | 88.3 mW |
| 33 | Booth multiplier | −1.02 ns | 34 | 66.8 mW |
| 34 | clock tree without buffering | −1.85 ns | 37 | 66.8 mW |
| 35 | registered multiplier operands | −0.54 ns | 11 | 67.9 mW |
| 36 | fetch-ahead in the front end | +0.014 ns | 0 | 67.3 mW |
| 37 | control reset rework | +0.24 ns | 0 | 67.9 mW |
The register-read stage did most of the work. It removed almost 3.7 ns from the worst path. The Kogge-Stone adder reduced the number of failing endpoints, but it raised core power by more than 20 mW. Run 34 tested a clock tree without buffering and made timing worse.
At first, the Booth multiplier cost timing. Registered operands recovered most of that loss, to −0.54 ns. Fetch-ahead in the front end then met timing at +0.014 ns. After the reset rework in run 37, the design had +0.24 ns of slack and an Fmax of 102.4 MHz.
Stage 6: pad ring, variation and signoff
Run 38 placed the design inside the final pad ring on a 3.2 mm die and added the slow-corner analysis. IR drop jumped from 3.73 mV to 12.1 mV, because supply current now enters through the pad ring instead of an ideal grid. Setup slack dipped to −0.30 ns. Run 39 fixed the PHY timing and cleared four electromigration violations. Runs 41 and 42 budgeted and placed decap and fill cells, which cleared 219 density findings.
Run 43 applied a 5% on-chip variation derate to cell and wire delays, and setup slack went back to −0.064 ns. In run 44, I sized the pad drivers, and the slack came to +0.137 ns.
Results
The signoff build of the main SoC has 22860 cells on a 2.12 x 2.12 mm die with an 82-pad ring:
- 100 MHz on both clocks at typical, 50 and 62.5 MHz at the slow corner, and hold met at the fast corner
- 50.4 mW of core power and 17.1 mV of IR drop from the supply pads
- zero DRC errors, an LVS match and zero antenna violations, with fill and density inside the PDK limits
The PCIe variant sits on a 2.4 x 2.4 mm die with 64 digital signal pads, 7 analog pads and 22 supply pads. It draws 76.3 mW, with 15.5 mV of IR drop. It passes DRC and LVS. Timing is met at three corners with the 5% OCV derate.
Lessons
Change one variable per run, and write it down. With dozens of runs, the journal is the record of which change moved which number.
Physical fixes recovered the large negative slack, and architectural fixes closed the last nanosecond. Channels, padding and wire RC calibration took the design from −10 ns to positive slack. At 100 MHz, only pipeline and datapath changes closed the gap.
Tool repair can't fix a structural hold problem. The SDRAM hold violations needed a change in the timing of the interface. More buffers did not help.
Constrain clock crossings instead of cutting them. A false path removes a crossing from analysis. A bounded constraint keeps it checked.
The pad ring changes IR drop. IR drop roughly tripled when supply current came in through the pads.
Faster adders cost power. The Kogge-Stone adder bought timing margin for about 21.6 mW.
Later, I migrated the same SoC to GlobalFoundries GF180MCU. Migrating a SKY130 RISC-V SoC to GF180MCU describes the migration.