This guide walks through hardening the BF16 MAC design with LibreLane on SkyWater 130 nm — without Tiny Tapeout tooling. Tiny Tapeout integration stays in info.yaml and CI for later; local learning uses the configs in librelane/.
LibreLane is a staged ASIC flow:
flowchart LR
A[Verilog RTL] --> B[Synthesis - Yosys]
B --> C[Floorplan + PDN]
C --> D[Placement]
D --> E[CTS]
E --> F[Routing]
F --> G[Signoff - DRC LVS STA]
G --> H[GDSII]
We provide two configs:
| Config | Top module | Use |
|---|---|---|
librelane/mac_core.json |
mac_core |
Start here — smaller, pure datapath |
librelane/tt_um_tensor_mac.json |
tt_um_tensor_mac |
Full TinyTapeout wrapper + streaming bus |
- Docker (running)
- Python 3.9+ on the host (orchestrator only; EDA tools run in the container)
- ~15 GB disk for the LibreLane Docker image (pulled on first run)
# Install LibreLane CLI + ciel (PDK manager) on the host
pip3 install 'librelane==2.4.13'
# Add CLI tools to PATH (macOS user install)
export PATH="$HOME/Library/Python/3.9/bin:$PATH"
# Verify Docker + LibreLane (takes several minutes first time)
python3 -m librelane --docker-no-tty --dockerized --smoke-testYou should see Smoke test passed. at the end.
Note: Tiny Tapeout CI uses LibreLane 3.0.x (Python 3.10+). For local learning we target 2.4.13, which runs on Python 3.9 and uses the same config JSON format. Upgrade to 3.x when you install Python 3.11+.
make librelane # default: mac_core → runs/mac/
make librelane-check # smoke test onlyOr directly:
./scripts/librelane.sh mac_core macOutputs land in runs/mac/:
| Path | Contents |
|---|---|
runs/mac/final/gds/mac_core.gds |
Layout for KLayout |
runs/mac/final/verilog/mac_core.v |
Gate-level netlist |
runs/mac/final/metrics.csv |
Area, cells, timing summary |
runs/mac/logs/ |
Per-step logs (read these when something fails) |
make librelane-wrappermake view-gds # KLayout app if installed, else PNG preview
make view-gds-preview # export PNG only (works without KLayout.app)KLayout GUI (recommended): install KLayout for macOS, then:
open -a KLayout runs/mac/final/gds/mac_core.gds
# or
make view-gdsmake librelane-klayout runs KLayout inside Docker and generally does not open a window on macOS. Use make view-gds instead.
Paths after a successful make librelane:
- Smoke test —
make librelane-check— confirms Docker + PDK inside container. - Synthesis only — read
runs/mac/logs/synthesis.logafter a run; check cell count and warnings. - Full
mac_coreGDS —make librelane— walk through placement/routing failures in logs. - Tune config — adjust
DIE_AREA,PL_TARGET_DENSITY, orCLOCK_PERIODinlibrelane/mac_core.json. - Wrapper —
make librelane-wrapperwhen the core closes. - Tiny Tapeout — re-enable TT CI / shuttle when you want the tile DEF template again.
| Variable | Value | Meaning |
|---|---|---|
CLOCK_PERIOD |
20 |
50 MHz target (ns) |
FP_CORE_UTIL |
40 |
Core utilization % — lower = easier routing |
PL_TARGET_DENSITY |
0.45 |
Placer density — raise if GPL-0302 placement fails |
DIE_AREA |
400×400 µm |
Generous first pass; shrink after you know area |
If placement fails with GPL-0302: increase PL_TARGET_DENSITY toward 0.6–0.7 or enlarge DIE_AREA.
If timing fails: increase CLOCK_PERIOD (e.g. 25 for 40 MHz).
If routing fails: lower FP_CORE_UTIL, enlarge die, or reduce logic (start with mac_core only).
mac_core.sv uses SystemVerilog (logic, always_ff). Yosys inside LibreLane reads .sv files with SV support. If synthesis fails on SV syntax, check runs/mac/logs/synthesis/yosys.log.
| Variable | Default | Purpose |
|---|---|---|
PDK_ROOT |
auto in Docker | Only needed for non-dockerized runs |
LIBRELANE_RUN |
mac |
Run tag / output folder name |
| Symptom | Fix |
|---|---|
cannot attach stdin to a TTY |
Always pass --docker-no-tty before --dockerized |
librelane: command not found |
export PATH="$HOME/Library/Python/3.9/bin:$PATH" |
| Docker pull slow | First smoke-test downloads ~GB; one-time |
| Synthesis SIGKILL / OOM | Increase Docker Desktop memory to 8 GB+; refactor reduced Yosys load |
| Area too large for die | Increase DIE_AREA in the JSON pdk::sky130A block |
- LibreLane configuration variables
- UCSC LibreLane tutorial
- Project architecture: ARCHITECTURE.md