This page is a terminal into a small Linux box with macro_gen, ngspice and the SKY130 device models in it. The box runs on your computer, in Docker. Nothing runs on my server, and nothing here is canned: you get the same binary I use, with the same models, and it’s yours to poke at. Size the benchmarks, change their configs, write your own designs, rerun the dev log numbers, and take the whole workspace home when you’re done.

  1. Install Docker

    Install Docker Engine for your distribution. If you'd rather not use sudo for every command, follow the post-install steps.

  2. Start the lab

    docker run --rm -it -p 127.0.0.1:7681:7681 ghcr.io/joyenbenitto/macro-gen-lab

    The first run downloads about 115 MB. It prints a link: open it, or paste the token below. The port is only reachable from your own machine, and only this page, holding the token, can connect.

    Keep your work in a folder on your machine

    With --rm, the container's files go away when you stop it, unless you export them first. To work in a real folder instead, mount one:

    docker run --rm -it -p 127.0.0.1:7681:7681 -v "$PWD/macro-gen-work:/home/lab/work" ghcr.io/joyenbenitto/macro-gen-lab

    An empty folder gets the examples copied in. On Apple Silicon, add --platform linux/amd64.

  3. Connect

    Chrome will ask whether this site may access apps on your device. That's the container: allow it. I've tested this in Chrome; Firefox should work the same way. Safari may refuse to let a website reach localhost, so if it does, use Chrome or Firefox.

What’s in the box

  • macro_gen, built with the CIRCT backend. It reads hw + comb MLIR, sizes every transistor by logical effort against a reference inverter it characterizes in ngspice, and writes SPICE, structural Verilog and a report.
  • ngspice, to simulate what it writes.
  • The SKY130 device models for the tt corner (Apache-2.0).
  • A workspace with ten benchmarks and the reproduction bundles from Dev Log #1 and Dev Log #2, plus vim, nano, python3 and git.

Some things to try once you’re in:

  • macro_gen --config benchmarks/c17/c17.toml --emit-verilog --add-buffer, then less build/spice/c17.spice
  • Raise cload_cinv in that config and watch the buffering change.
  • Long lines widen the terminal on their own, and the box scrolls sideways. You can also maximize the terminal to use the whole window.
  • cd dev-logs/02-sizing-logic && benchmarks/run.py, which regenerates the table from the post.