Added gnuplot to the EDA container; sims now wrdata their curves and plots.gp renders 5 PNGs in hardware/eda/sim/plots/ (open in any browser/viewer): - input_loading: instrument(1M) preserves the +16dB pickup resonance the line(25k) flattens - stage1_cmrr: common-mode leakage, 0.1% vs 1% resistor mismatch - stage2_recon: DAC reconstruction filter (flat to 20k, -3dB ~75k) - stage4_driver: balanced differential response (flat across audio) - stage1_phantom: +48V transient clamped at the op-amp input, decays to ~0 (.data intermediates git-ignored.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45 lines
1.8 KiB
Docker
45 lines
1.8 KiB
Docker
# Reproducible EDA toolchain for the PM_K-1 core board.
|
|
#
|
|
# Why this exists: the system KiCad is 7.0 (no CLI ERC). This pins a known,
|
|
# rebuildable environment so the design can be checked/simulated identically
|
|
# years from now — fitting for a device meant to outlive its tools.
|
|
#
|
|
# KiCad 9 -> schematic capture, CLI ERC/DRC, netlist/PDF/Gerber export
|
|
# ngspice -> SPICE simulation of the analog audio circuits
|
|
# python3 -> scripting / BOM / skidl-style helpers
|
|
#
|
|
# Build/run via ../eda/run.sh (or: podman build -t pmk1-eda:9.0 .)
|
|
FROM docker.io/library/ubuntu:24.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
software-properties-common ca-certificates gnupg && \
|
|
add-apt-repository -y ppa:kicad/kicad-9.0-releases && \
|
|
apt-get update && apt-get install -y --no-install-recommends \
|
|
kicad \
|
|
kicad-symbols \
|
|
kicad-footprints \
|
|
ngspice \
|
|
python3 python3-pip python3-venv \
|
|
git make && \
|
|
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
|
pip3 install --no-cache-dir --break-system-packages skidl
|
|
|
|
# netlistsvg: render the SKiDL netlist as a (browsable) schematic SVG
|
|
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm && \
|
|
npm install -g netlistsvg && \
|
|
npm cache clean --force && apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# gnuplot: render ngspice simulation results as PNG plots
|
|
RUN apt-get update && apt-get install -y --no-install-recommends gnuplot-nox && \
|
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Point SKiDL / KiCad CLI at the installed libraries (reproducible, not ad-hoc).
|
|
ENV KICAD9_SYMBOL_DIR=/usr/share/kicad/symbols \
|
|
KICAD9_FOOTPRINT_DIR=/usr/share/kicad/footprints \
|
|
KICAD_SYMBOL_DIR=/usr/share/kicad/symbols
|
|
|
|
WORKDIR /work
|
|
CMD ["bash"]
|