Tuesday, August 18, 2026

svn add everything that starts with ?

The white space always gets me. SVN to add all unversioned files:

svn status | sed -n 's/^?       //p' | while IFS= read -r f; do svn add -- "$f"; done

Wednesday, July 29, 2026

macportseda: open-source EDA tools on macOS that I use for SKY130.

I put together a MacPorts port tree for the open-source EDA tools I use, and I've been running it on macOS 13, 15, and 26 on arm64. It's called macportseda and it's up on GitHub: https://github.com/bpdegnan/macportseda

My work is mostly analog and mixed-signal, and the tools I need either aren't in stock MacPorts or the versions that are there don't fit together into a working flow. I wanted an open ADC design flow that runs on a Mac without Docker or a Linux VM, so I packaged the pieces myself.

What's in it right now: OpenSTA, KLayout, Magic, netgen (LVS), xschem, ngspice, OpenVAF, Yosys, OpenROAD, KiCad, the Xyce/Trilinos/Charon TCAD stack, and most recently CACE for analog characterization, plus the smaller glue tools around them. There's a metaport, eda-icall, that pulls the whole sky130 toolchain in one command.

It coexists with stock MacPorts instead of fighting it; where I need a pinned version that would collide, it installs into a private prefix. Every source tarball is checksummed and archived locally, because upstream URLs rot. And when a build fails, the ports point you at a GitHub issue on my repo instead of the MacPorts maintainers, since these aren't official ports.

Once the tree's path is registered in /opt/local/etc/macports/sources.conf (above the rsync line), the whole toolchain is one command:

  cd macportseda
  portindex
  sudo port install eda-icall

I'm a hardware person, not a software engineer, and I'm still bad at git. This tree is maintained for one user, me, so versions are pinned on purpose and some staleness is fine. But if it's useful to you, it's all there.

Sunday, May 17, 2026

Add .tex files and .afdesign files to SVN.

I forgot that macos doesn't have "xargs -d"
svn status \
| awk '/^\?/ && ($2 ~ /\.(tex|afdesign)$/) {print substr($0,9)}' \
| tr '\n' '\0' | xargs -0 svn add

Tuesday, September 30, 2025

gtkwave update

My previous version of getting gtkwave working was fine, but the window didn't always refresh correctly.
sudo port install gtk2 +quartz 
sudo port install gtk-quartz-engine +quartz
sudo port install gtkwave +quartz  

Sunday, April 27, 2025

When you need the last 1MiB of a file.

MacOS/BSD doens't have the "head -c -1M" construct to get the last 1MiB of my file
filesize=$(stat -f %z main.log) && dd if=main.log bs=1 \ 
skip=$((filesize - 1048576)) > ~/chunk.log

Sunday, December 8, 2024

package management when you don't have root.

Sometimes, you don't have root. The bsd-style ports tree let's you do this.

https://github.com/bpdegnan/redbash is a project that I have been using to install my bsd-style tools on commerical systems.

Friday, August 9, 2024

Primewave can execute a script before the command runs.

I just found that Primewave can execute a script before the simulator runs. In the Setup->Simulator panel, there's a "command prefix" field that will execute a script on the command line.