From 19920c17c8120b9b25364936fa28b99da1f6e4c6 Mon Sep 17 00:00:00 2001 From: Rishabh Jain <2r10j5@gmail.com> Date: Wed, 13 May 2026 11:25:16 +0530 Subject: [PATCH 1/8] Add files via upload --- docker-launcher/Dockerfile | 348 +++++ .../Examples/FullAdder/FullAdder-cache.lib | 116 ++ .../Examples/FullAdder/FullAdder-rescue.lib | 116 ++ .../Examples/FullAdder/FullAdder.cir | 23 + .../Examples/FullAdder/FullAdder.cir.out | 36 + .../Examples/FullAdder/FullAdder.kicad_pro | 316 ++++ .../Examples/FullAdder/FullAdder.kicad_sch | 849 +++++++++++ .../Examples/FullAdder/FullAdder.pro | 70 + .../Examples/FullAdder/FullAdder.proj | 1 + .../Examples/FullAdder/FullAdder.sch | 330 +++++ .../FullAdder/FullAdder_Previous_Values.xml | 1 + docker-launcher/Examples/FullAdder/analysis | 1 + .../Examples/FullAdder/full_adder-cache.lib | 61 + .../Examples/FullAdder/full_adder.cir | 12 + .../Examples/FullAdder/full_adder.cir.out | 19 + .../Examples/FullAdder/full_adder.pro | 44 + .../Examples/FullAdder/full_adder.sch | 180 +++ .../Examples/FullAdder/full_adder.sub | 13 + .../FullAdder/full_adder_Previous_Values.xml | 1 + .../Examples/FullAdder/half_adder-cache.lib | 63 + .../Examples/FullAdder/half_adder.cir | 11 + .../Examples/FullAdder/half_adder.cir.out | 20 + .../Examples/FullAdder/half_adder.pro | 69 + .../Examples/FullAdder/half_adder.sch | 152 ++ .../Examples/FullAdder/half_adder.sub | 14 + .../FullAdder/half_adder_Previous_Values.xml | 1 + .../Examples/FullAdder/plot_data_i.txt | 135 ++ .../Examples/FullAdder/plot_data_v.txt | 135 ++ .../Examples/Half_Adder/Half_Adder-cache.lib | 126 ++ .../Examples/Half_Adder/Half_Adder-rescue.lib | 21 + .../Examples/Half_Adder/Half_Adder.cir | 21 + .../Examples/Half_Adder/Half_Adder.cir.out | 33 + .../Examples/Half_Adder/Half_Adder.kicad_pro | 355 +++++ .../Examples/Half_Adder/Half_Adder.kicad_sch | 544 +++++++ .../Examples/Half_Adder/Half_Adder.pro | 71 + .../Examples/Half_Adder/Half_Adder.proj | 1 + .../Examples/Half_Adder/Half_Adder.sch | 311 ++++ .../Examples/Half_Adder/Half_Adder.sdc | 3 + .../Examples/Half_Adder/Half_Adder.v | 4 + .../Half_Adder/Half_Adder_Previous_Values.xml | 1 + docker-launcher/Examples/Half_Adder/analysis | 1 + docker-launcher/Examples/Half_Adder/config.mk | 4 + .../Examples/Half_Adder/half_adder.sub | 14 + .../Examples/Half_Adder/plot_data_i.txt | 135 ++ .../Examples/Half_Adder/plot_data_v.txt | 135 ++ .../Examples/counter/counter.cir.out | 0 docker-launcher/Examples/counter/counter.proj | 0 docker-launcher/README.md | 229 +++ .../eSim-symbols/eSim_Ngveri.kicad_sym | 41 + .../library/modelParamXML/Ngveri/counter.xml | 1 + .../modelParamXML/Ngveri/fulladder.xml | 1 + .../Ngveri/halfwave_rectifier.xml | 1 + .../install-nghdl-22.04.sh | 312 ++++ docker-launcher/scripts/launcher-esim.sh | 14 + docker-launcher/scripts/setup-esim.sh | 62 + docker-launcher/src/maker/Maker.py | 545 +++++++ docker-launcher/src/maker/ModelGeneration.py | 1270 +++++++++++++++++ docker-launcher/src/maker/NgVeri.py | 443 ++++++ docker-launcher/src/maker/OpenROAD.py | 63 + docker-launcher/src/maker/createkicad.py | 379 +++++ .../src/maker/netlist_to_verilog.py | 289 ++++ 61 files changed, 8567 insertions(+) create mode 100644 docker-launcher/Dockerfile create mode 100644 docker-launcher/Examples/FullAdder/FullAdder-cache.lib create mode 100644 docker-launcher/Examples/FullAdder/FullAdder-rescue.lib create mode 100644 docker-launcher/Examples/FullAdder/FullAdder.cir create mode 100644 docker-launcher/Examples/FullAdder/FullAdder.cir.out create mode 100644 docker-launcher/Examples/FullAdder/FullAdder.kicad_pro create mode 100644 docker-launcher/Examples/FullAdder/FullAdder.kicad_sch create mode 100644 docker-launcher/Examples/FullAdder/FullAdder.pro create mode 100644 docker-launcher/Examples/FullAdder/FullAdder.proj create mode 100644 docker-launcher/Examples/FullAdder/FullAdder.sch create mode 100644 docker-launcher/Examples/FullAdder/FullAdder_Previous_Values.xml create mode 100644 docker-launcher/Examples/FullAdder/analysis create mode 100644 docker-launcher/Examples/FullAdder/full_adder-cache.lib create mode 100644 docker-launcher/Examples/FullAdder/full_adder.cir create mode 100644 docker-launcher/Examples/FullAdder/full_adder.cir.out create mode 100644 docker-launcher/Examples/FullAdder/full_adder.pro create mode 100644 docker-launcher/Examples/FullAdder/full_adder.sch create mode 100644 docker-launcher/Examples/FullAdder/full_adder.sub create mode 100644 docker-launcher/Examples/FullAdder/full_adder_Previous_Values.xml create mode 100644 docker-launcher/Examples/FullAdder/half_adder-cache.lib create mode 100644 docker-launcher/Examples/FullAdder/half_adder.cir create mode 100644 docker-launcher/Examples/FullAdder/half_adder.cir.out create mode 100644 docker-launcher/Examples/FullAdder/half_adder.pro create mode 100644 docker-launcher/Examples/FullAdder/half_adder.sch create mode 100644 docker-launcher/Examples/FullAdder/half_adder.sub create mode 100644 docker-launcher/Examples/FullAdder/half_adder_Previous_Values.xml create mode 100644 docker-launcher/Examples/FullAdder/plot_data_i.txt create mode 100644 docker-launcher/Examples/FullAdder/plot_data_v.txt create mode 100644 docker-launcher/Examples/Half_Adder/Half_Adder-cache.lib create mode 100644 docker-launcher/Examples/Half_Adder/Half_Adder-rescue.lib create mode 100644 docker-launcher/Examples/Half_Adder/Half_Adder.cir create mode 100644 docker-launcher/Examples/Half_Adder/Half_Adder.cir.out create mode 100644 docker-launcher/Examples/Half_Adder/Half_Adder.kicad_pro create mode 100644 docker-launcher/Examples/Half_Adder/Half_Adder.kicad_sch create mode 100644 docker-launcher/Examples/Half_Adder/Half_Adder.pro create mode 100644 docker-launcher/Examples/Half_Adder/Half_Adder.proj create mode 100644 docker-launcher/Examples/Half_Adder/Half_Adder.sch create mode 100644 docker-launcher/Examples/Half_Adder/Half_Adder.sdc create mode 100644 docker-launcher/Examples/Half_Adder/Half_Adder.v create mode 100644 docker-launcher/Examples/Half_Adder/Half_Adder_Previous_Values.xml create mode 100644 docker-launcher/Examples/Half_Adder/analysis create mode 100644 docker-launcher/Examples/Half_Adder/config.mk create mode 100644 docker-launcher/Examples/Half_Adder/half_adder.sub create mode 100644 docker-launcher/Examples/Half_Adder/plot_data_i.txt create mode 100644 docker-launcher/Examples/Half_Adder/plot_data_v.txt create mode 100644 docker-launcher/Examples/counter/counter.cir.out create mode 100644 docker-launcher/Examples/counter/counter.proj create mode 100644 docker-launcher/README.md create mode 100644 docker-launcher/library/kicadLibrary/eSim-symbols/eSim_Ngveri.kicad_sym create mode 100644 docker-launcher/library/modelParamXML/Ngveri/counter.xml create mode 100644 docker-launcher/library/modelParamXML/Ngveri/fulladder.xml create mode 100644 docker-launcher/library/modelParamXML/Ngveri/halfwave_rectifier.xml create mode 100644 docker-launcher/nghdl/install-nghdl-scripts/install-nghdl-22.04.sh create mode 100644 docker-launcher/scripts/launcher-esim.sh create mode 100644 docker-launcher/scripts/setup-esim.sh create mode 100644 docker-launcher/src/maker/Maker.py create mode 100644 docker-launcher/src/maker/ModelGeneration.py create mode 100644 docker-launcher/src/maker/NgVeri.py create mode 100644 docker-launcher/src/maker/OpenROAD.py create mode 100644 docker-launcher/src/maker/createkicad.py create mode 100644 docker-launcher/src/maker/netlist_to_verilog.py diff --git a/docker-launcher/Dockerfile b/docker-launcher/Dockerfile new file mode 100644 index 0000000..3f8f97e --- /dev/null +++ b/docker-launcher/Dockerfile @@ -0,0 +1,348 @@ +# eSim Docker Container +# Multi-stage build to keep the image smaller (~3.5GB vs ~5GB) +# FOSSEE IIT Bombay + +# ============================================ +# Stage 1: Build dependencies +# ============================================ +FROM ubuntu:22.04 AS builder + +ENV DEBIAN_FRONTEND=noninteractive +ENV TZ=Asia/Kolkata + +# Install build tools +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential gcc g++ make cmake git \ + python3 python3-pip python3-dev python3-venv \ + autoconf automake libtool pkg-config bison flex gettext wget \ + libgtk-3-dev \ + && rm -rf /var/lib/apt/lists/* + + +# Setup Python venv with dependencies +# Note: setuptools<58 is needed for hdlparse which uses deprecated use_2to3 +RUN python3 -m venv /build/venv \ + && /build/venv/bin/pip install --no-cache-dir "setuptools<58.0.0" wheel \ + && /build/venv/bin/pip install --no-cache-dir \ + matplotlib==3.7.5 numpy==1.24.4 scipy==1.10.1 \ + pillow==10.4.0 hdlparse==1.0.4 watchdog==4.0.2 + +# Build GAW3 (analog waveform viewer) from source +# gtkwave is digital only, gaw3 is what eSim actually uses +RUN git clone --depth 1 https://github.com/StefanSchippers/xschem-gaw.git /build/gaw3 \ + && cd /build/gaw3 \ + && aclocal && autoheader \ + && automake --add-missing --foreign 2>/dev/null || true \ + && autoconf \ + && sed -i 's/GETTEXT_MACRO_VERSION = 0.18/GETTEXT_MACRO_VERSION = 0.20/' po/Makefile.in.in \ + && ./configure --prefix=/usr/local \ + && make -j$(nproc) \ + && make DESTDIR=/build/gaw3-install install + + +# ============================================ +# Stage 2: Runtime image +# ============================================ +FROM ubuntu:22.04 + +LABEL maintainer="FOSSEE IIT Bombay" +LABEL description="eSim EDA Tool with GUI support" + +ENV DEBIAN_FRONTEND=noninteractive +ENV TZ=Asia/Kolkata +ENV LANG=C.UTF-8 +ENV LC_ALL=C.UTF-8 +# Create user +ARG USERNAME=esim-user +ARG USER_UID=1000 +ARG USER_GID=1000 + +ENV USERNAME=${USERNAME} + + + +# VNC settings +ENV VNC_PORT=5901 +ENV NOVNC_PORT=6080 +ENV VNC_RESOLUTION=1920x1080 +ENV VNC_DEPTH=24 + +# Desktop and font rendering settings +ENV GTK_THEME=Adwaita +ENV UBUNTU_MENUPROXY=0 +ENV XDG_DATA_DIRS=/usr/share:/usr/local/share:/usr/share/icons +ENV QT_AUTO_SCREEN_SCALE_FACTOR=1 +ENV GDK_SCALE=1 +ENV FREETYPE_PROPERTIES="truetype:interpreter-version=40" + +# Install runtime packages +RUN apt-get update && apt-get install -y --no-install-recommends \ + kicad kicad-libraries gtkwave xterm \ + python3 python3-wxgtk4.0 python3-pyqt5\ + libx11-6 libxext6 libxrender1 libxfixes3 libxi6 libxrandr2 \ + libxcursor1 libxinerama1 libgl1 libgl1-mesa-glx libgl1-mesa-dri \ + libxcb1 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 \ + libxcb-render-util0 libxcb-shape0 libxcb-xfixes0 libxcb-xinerama0 \ + libxcb-xkb1 libxkbcommon0 libxkbcommon-x11-0 dbus-x11 \ + adwaita-icon-theme-full hicolor-icon-theme gnome-icon-theme \ + oxygen-icon-theme tango-icon-theme humanity-icon-theme \ + ca-certificates libgtk-3-0 libcanberra-gtk-module xdg-utils \ + libglib2.0-0 libfontconfig1 libfreetype6 \ + tigervnc-standalone-server tigervnc-common \ + xfce4 xfce4-terminal novnc websockify \ + xdotool wmctrl openbox tint2 \ + && rm -rf /var/lib/apt/lists/* && apt-get clean + +# Copy built artifacts from builder stage +COPY --from=builder /build/gaw3-install/usr/local /usr/local/ +# COPY --from=builder /build/esim ${ESIM_HOME} +COPY --from=builder /build/venv /opt/venv + +# Install dependencies +RUN apt-get update && apt-get install -y \ + build-essential \ + make \ + gnat \ + clang \ + llvm-11 \ + llvm-11-dev \ + llvm-11-runtime \ + llvm-11-tools \ + clang-11 \ + zlib1g-dev \ + autoconf \ + g++ \ + flex \ + bison \ + wget \ + unzip \ + xz-utils \ + libxaw7 \ + libxaw7-dev \ + libcanberra-gtk-module \ + libcanberra-gtk3-module \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /home/${USERNAME}/ + +# Download eSim source +RUN wget https://github.com/FOSSEE/eSim/archive/refs/tags/v2.5.zip + +# Unzip +RUN unzip v2.5.zip + +# Rename folder (optional) +RUN mv eSim-2.5 esim + +# eSim paths +ENV ESIM_HOME=/home/${USERNAME}/esim +ENV PYTHONPATH="${ESIM_HOME}/src:/opt/venv/lib/python3.10/site-packages" + +RUN groupadd --gid ${USER_GID} ${USERNAME} \ + && useradd --uid ${USER_UID} --gid ${USER_GID} -m ${USERNAME} \ + && mkdir -p /home/${USERNAME}/workspace \ + && chown -R ${USERNAME}:${USERNAME} /home/${USERNAME} \ + && chown -R ${USERNAME}:${USERNAME} ${ESIM_HOME} + + + +WORKDIR /opt + +######################################## +# Install GHDL +######################################## + +RUN wget https://github.com/FOSSEE/nghdl/raw/installers/Ubuntu/ghdl-4.1.0.tar.gz \ + && tar -xzf ghdl-4.1.0.tar.gz \ + && cd ghdl-4.1.0 \ + && chmod +x configure \ + && ./configure --with-llvm-config=/usr/bin/llvm-config-11 \ + && make -j$(nproc) \ + && make install \ + && cd /opt \ + && rm -rf ghdl-4.1.0 ghdl-4.1.0.tar.gz + + +######################################## +# Install Verilator +######################################## + +RUN wget https://github.com/verilator/verilator/archive/refs/tags/v4.210.tar.gz \ + && tar -xvf v4.210.tar.gz \ + && cd verilator-4.210 \ + && autoconf \ + && ./configure \ + && make -j$(nproc) \ + && make install \ + && cd /opt \ + && rm -rf verilator-4.210 v4.210.tar.gz + +######################################################### +# Install NGHDL simulator +######################################################### + + + +WORKDIR /tmp + +RUN apt-get update && apt-get install -y \ + make gnat clang \ + zlib1g-dev autoconf g++ flex bison \ + libxaw7 libxaw7-dev \ + libcanberra-gtk-module libcanberra-gtk3-module \ + wget xz-utils git \ + && rm -rf /var/lib/apt/lists/* + +# Clone NGHDL source +WORKDIR ${ESIM_HOME}/ + +RUN git clone --depth 1 https://github.com/FOSSEE/nghdl + +# Create NGHDL symlink for eSim +RUN chmod 755 /home/esim-user/esim/nghdl/src/ngspice_ghdl.py \ + && rm -f /usr/local/bin/nghdl \ + && ln -s /home/esim-user/esim/nghdl/src/ngspice_ghdl.py /usr/local/bin/nghdl + +# Download NGHDL simulator +WORKDIR /home/${USERNAME} +RUN wget https://github.com/FOSSEE/nghdl/raw/master/nghdl-simulator-source.tar.xz + +# Extract NGHDL +RUN tar -xJf nghdl-simulator-source.tar.xz \ + && mv nghdl-simulator-source /home/${USERNAME}/nghdl-simulator \ + && mkdir -p /home/${USERNAME}/nghdl-simulator/release \ + && mkdir -p /home/${USERNAME}/nghdl-simulator/install_dir + +RUN chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/nghdl-simulator \ + && chmod -R u+w /home/${USERNAME}/nghdl-simulator + +WORKDIR /home/${USERNAME}/nghdl-simulator/release + +# Ensure configure is executable +RUN chmod +x ../configure + +RUN ../configure \ + --enable-xspice \ + --disable-debug \ + --prefix=/home/${USERNAME}/nghdl-simulator/install_dir \ + --exec-prefix=/home/${USERNAME}/nghdl-simulator/install_dir + +RUN make -j$(nproc) +RUN make install + +# Link ngspice +RUN ln -sf /home/${USERNAME}/nghdl-simulator/install_dir/bin/ngspice /usr/bin/ngspice + +RUN chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/nghdl-simulator \ + && chmod -R u+w /home/${USERNAME}/nghdl-simulator + + +######################################################### + + + +WORKDIR ${ESIM_HOME}/src/frontEnd + +# Create eSim config +RUN mkdir -p /home/${USERNAME}/.esim \ + && printf '[DEFAULT]\n\ +eSim_HOME = /home/%s/esim\n\ +LICENSE = %%(eSim_HOME)s/LICENSE\n\ +KicadLib = %%(eSim_HOME)s/library/kicadLibrary.zip\n\ +IMAGES = %%(eSim_HOME)s/images\n\ +VERSION = %%(eSim_HOME)s/VERSION\n\ +MODELICA_MAP_JSON = %%(eSim_HOME)s/library/ngspicetoModelica/Mapping.json\n\ +\n[eSim]\n\ +workspace=/home/%s/eSim-Workspace\n\ +kicad=/usr/bin\n\ +ngspice=/usr/bin\n' \ +${USERNAME} ${USERNAME} > /home/${USERNAME}/.esim/config.ini \ + && chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.esim + +# Create NGHDL config +RUN mkdir -p /home/${USERNAME}/.nghdl \ + && printf "[NGHDL]\n\ +NGHDL_HOME = /home/esim-user/nghdl-simulator\n\ +DIGITAL_MODEL = %%(NGHDL_HOME)s/src/xspice/icm\n\ +RELEASE = %%(NGHDL_HOME)s/release\n\ +\n[SRC]\n\ +SRC_HOME = /home/esim-user/esim/nghdl\n\ +LICENSE = %%(SRC_HOME)s/LICENSE\n" \ +> /home/${USERNAME}/.nghdl/config.ini \ + && chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.nghdl + +# Setup KiCad symbol libraries +RUN mkdir -p /home/${USERNAME}/.config/kicad/6.0 \ + && KICAD_CONFIG=/home/${USERNAME}/.config/kicad/6.0 \ + && ESIM_SYMLIB=/home/${USERNAME}/esim/library/kicadLibrary/eSim-symbols \ + && KICAD_SYMLIB=/usr/share/kicad/symbols \ + && echo '(sym_lib_table' > ${KICAD_CONFIG}/sym-lib-table \ + && for lib in eSim_Devices eSim_Sources eSim_Analog eSim_Digital eSim_Hybrid eSim_Power eSim_Subckt eSim_Miscellaneous eSim_Plot eSim_Nghdl eSim_Ngveri eSim_SKY130 eSim_SKY130_Subckts eSim_User; do \ + echo " (lib (name \"$lib\")(type \"KiCad\")(uri \"${ESIM_SYMLIB}/${lib}.kicad_sym\")(options \"\")(descr \"\"))" >> ${KICAD_CONFIG}/sym-lib-table; \ + done \ + && for lib in Device power Simulation_SPICE Connector Analog Transistor_BJT Transistor_FET Diode Amplifier_Operational; do \ + echo " (lib (name \"$lib\")(type \"KiCad\")(uri \"${KICAD_SYMLIB}/${lib}.kicad_sym\")(options \"\")(descr \"\"))" >> ${KICAD_CONFIG}/sym-lib-table; \ + done \ + && echo ')' >> ${KICAD_CONFIG}/sym-lib-table \ + && echo '(fp_lib_table)' > ${KICAD_CONFIG}/fp-lib-table \ + && chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.config + +# Copy eSim symbol libraries into KiCad system symbols +RUN cp -r ${ESIM_HOME}/library/kicadLibrary/eSim-symbols/* /usr/share/kicad/symbols/ \ + && chmod -R 755 /usr/share/kicad/symbols \ + && chown -R ${USERNAME}:${USERNAME} /usr/share/kicad/symbols + +# Setup VNC with openbox + tint2 taskbar + +RUN mkdir -p /home/${USERNAME}/.vnc \ + && printf '#!/bin/bash\nunset SESSION_MANAGER\nunset DBUS_SESSION_BUS_ADDRESS\nexport XDG_RUNTIME_DIR=/tmp/runtime-esim-user\nmkdir -p $XDG_RUNTIME_DIR && chmod 700 $XDG_RUNTIME_DIR\ntint2 &\nexec openbox-session\n' \ + > /home/${USERNAME}/.vnc/xstartup \ + && chmod +x /home/${USERNAME}/.vnc/xstartup \ + && printf '\x9f\x87\x18\xb4\x8e\x8f\x8a\x57' > /home/${USERNAME}/.vnc/passwd \ + && chmod 600 /home/${USERNAME}/.vnc/passwd \ + && chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.vnc + +# XFCE config to fix window focus issues +RUN mkdir -p /home/${USERNAME}/.config/xfce4/xfconf/xfce-perchannel-xml \ + && printf '\n\n \n \n \n \n \n\n' \ + > /home/${USERNAME}/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml \ + && chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.config + +# Font rendering config for better VNC quality +RUN mkdir -p /home/${USERNAME}/.config/fontconfig \ + && printf '\n\n\n true\n true\n hintslight\n rgb\n\n' \ + > /home/${USERNAME}/.config/fontconfig/fonts.conf \ + && chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.config/fontconfig + +# Startup script +RUN printf '#!/bin/bash\nset -e\n\n# Ensure workspace exists\nmkdir -p /home/${USERNAME}/esim/eSim-Workspace\ncp -rn /home/${USERNAME}/esim/Examples/* /home/esim-user/eSim-Workspace/ 2>/dev/null || true\n\nif [ "$1" = "--vnc" ] || [ "$USE_VNC" = "1" ]; then\n echo "Starting eSim in VNC mode"\n vncserver -kill :1 2>/dev/null || true\n export XDG_RUNTIME_DIR=/tmp/runtime-esim-user\n mkdir -p $XDG_RUNTIME_DIR && chmod 700 $XDG_RUNTIME_DIR\n vncserver :1 -geometry ${VNC_RESOLUTION:-1920x1080} -depth ${VNC_DEPTH:-24} -SecurityTypes None\n sleep 3\n websockify --web=/usr/share/novnc/ ${NOVNC_PORT:-6080} localhost:5901 &\n echo "VNC ready at http://localhost:${NOVNC_PORT:-6080}/vnc.html"\n export DISPLAY=:1\n sleep 2\n cd /home/${USERNAME}/esim/src/frontEnd\n python3 Application.py\n tail -f /dev/null\nelse\n echo "Starting eSim in X11 mode"\n cd /home/${USERNAME}/esim/src/frontEnd\n exec python3 Application.py\nfi\n' \ + > /usr/local/bin/start-esim.sh \ + && chmod +x /usr/local/bin/start-esim.sh + +RUN chown -R ${USERNAME}:${USERNAME} /home/${USERNAME} \ + && chmod -R u+rwX /home/${USERNAME} +USER ${USERNAME} + +######################################## +# Install OpenROAD Flow Scripts +######################################## +USER root + +RUN apt-get update && apt-get install -y \ + cmake ninja-build tcl-dev libreadline-dev \ + libffi-dev libboost-all-dev swig \ + && rm -rf /var/lib/apt/lists/* + +RUN git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts.git /opt/openroad \ + && cd /opt/openroad \ + && ./build_openroad.sh --local + +ENV PATH="/opt/openroad/tools/install/OpenROAD/bin:${PATH}" +ENV OPENROAD_HOME=/opt/openroad + +RUN chown -R ${USERNAME}:${USERNAME} /opt/openroad + +USER ${USERNAME} + +ENTRYPOINT ["/usr/local/bin/start-esim.sh"] +CMD [] diff --git a/docker-launcher/Examples/FullAdder/FullAdder-cache.lib b/docker-launcher/Examples/FullAdder/FullAdder-cache.lib new file mode 100644 index 0000000..581e1c2 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/FullAdder-cache.lib @@ -0,0 +1,116 @@ +EESchema-LIBRARY Version 2.3 +#encoding utf-8 +# +# DC-RESCUE-FullAdder +# +DEF DC-RESCUE-FullAdder v 0 40 Y Y 1 F N +F0 "v" -200 100 60 H V C CNN +F1 "DC-RESCUE-FullAdder" -200 -50 60 H V C CNN +F2 "R1" -300 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +$FPLIST + 1_pin +$ENDFPLIST +DRAW +C 0 0 150 0 1 0 N +X + 1 0 450 300 D 50 50 1 1 P +X - 2 0 -450 300 U 50 50 1 1 P +ENDDRAW +ENDDEF +# +# GND +# +DEF GND #PWR 0 0 Y Y 1 F P +F0 "#PWR" 0 -250 50 H I C CNN +F1 "GND" 0 -150 50 H V C CNN +F2 "" 0 0 50 H I C CNN +F3 "" 0 0 50 H I C CNN +DRAW +P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N +X GND 1 0 0 0 D 50 50 1 1 W N +ENDDRAW +ENDDEF +# +# R +# +DEF R R 0 0 N Y 1 F N +F0 "R" 50 130 50 H V C CNN +F1 "R" 50 50 50 H V C CNN +F2 "" 50 -20 30 H V C CNN +F3 "" 50 50 30 V V C CNN +$FPLIST + R_* + Resistor_* +$ENDFPLIST +DRAW +S 150 10 -50 90 0 1 10 N +X ~ 1 -100 50 50 R 60 60 1 1 P +X ~ 2 200 50 50 L 60 60 1 1 P +ENDDRAW +ENDDEF +# +# adc_bridge_3 +# +DEF adc_bridge_3 U 0 40 Y Y 1 F N +F0 "U" 0 0 60 H V C CNN +F1 "adc_bridge_3" 0 150 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S -400 200 350 -200 0 1 0 N +X IN1 1 -600 50 200 R 50 50 1 1 I +X IN2 2 -600 -50 200 R 50 50 1 1 I +X IN3 3 -600 -150 200 R 50 50 1 1 I +X OUT1 4 550 50 200 L 50 50 1 1 O +X OUT2 5 550 -50 200 L 50 50 1 1 O +X OUT3 6 550 -150 200 L 50 50 1 1 O +ENDDRAW +ENDDEF +# +# dac_bridge_2 +# +DEF dac_bridge_2 U 0 40 Y Y 1 F N +F0 "U" 0 0 60 H V C CNN +F1 "dac_bridge_2" 50 150 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S -250 200 350 -100 0 1 0 N +X IN1 1 -450 50 200 R 50 50 1 1 I +X IN2 2 -450 -50 200 R 50 50 1 1 I +X OUT1 3 550 50 200 L 50 50 1 1 O +X OUT4 4 550 -50 200 L 50 50 1 1 O +ENDDRAW +ENDDEF +# +# full_adder +# +DEF full_adder X 0 40 Y Y 1 F N +F0 "X" 1400 700 60 H V C CNN +F1 "full_adder" 1400 600 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S 800 1150 1950 0 0 1 0 N +X IN1 1 600 950 200 R 50 50 1 1 I +X IN2 2 600 550 200 R 50 50 1 1 I +X CIN 3 600 150 200 R 50 50 1 1 I +X SUM 4 2150 950 200 L 50 50 1 1 O +X COUT 5 2150 150 200 L 50 50 1 1 O +ENDDRAW +ENDDEF +# +# plot_v1 +# +DEF plot_v1 U 0 40 Y Y 1 F N +F0 "U" 0 500 60 H V C CNN +F1 "plot_v1" 200 350 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +C 0 500 100 0 1 0 N +X ~ ~ 0 200 200 U 50 50 1 1 I +ENDDRAW +ENDDEF +# +#End Library diff --git a/docker-launcher/Examples/FullAdder/FullAdder-rescue.lib b/docker-launcher/Examples/FullAdder/FullAdder-rescue.lib new file mode 100644 index 0000000..ef938b9 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/FullAdder-rescue.lib @@ -0,0 +1,116 @@ +EESchema-LIBRARY Version 2.4 +#encoding utf-8 +# +# DC-RESCUE-FullAdder +# +DEF DC-RESCUE-FullAdder v 0 40 Y Y 1 F N +F0 "v" -200 100 60 H V C CNN +F1 "DC-RESCUE-FullAdder" -200 -50 60 H V C CNN +F2 "R1" -300 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +$FPLIST + 1_pin +$ENDFPLIST +DRAW +C 0 0 150 0 1 0 N +X + 1 0 450 300 D 50 50 1 1 P +X - 2 0 -450 300 U 50 50 1 1 P +ENDDRAW +ENDDEF +# +# GND +# +DEF GND #PWR 0 0 Y Y 1 F P +F0 "#PWR" 0 -250 50 H I C CNN +F1 "GND" 0 -150 50 H V C CNN +F2 "" 0 0 50 H I C CNN +F3 "" 0 0 50 H I C CNN +DRAW +P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N +X GND 1 0 0 0 D 50 50 1 1 W N +ENDDRAW +ENDDEF +# +# R +# +DEF R R 0 0 N Y 1 F N +F0 "R" 50 130 50 H V C CNN +F1 "R" 50 50 50 H V C CNN +F2 "" 50 -20 30 H V C CNN +F3 "" 50 50 30 V V C CNN +$FPLIST + R_* + Resistor_* +$ENDFPLIST +DRAW +S 150 10 -50 90 0 1 10 N +X ~ 1 -100 50 50 R 60 60 1 1 P +X ~ 2 200 50 50 L 60 60 1 1 P +ENDDRAW +ENDDEF +# +# adc_bridge_3 +# +DEF adc_bridge_3 U 0 40 Y Y 1 F N +F0 "U" 0 0 60 H V C CNN +F1 "adc_bridge_3" 0 150 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S -400 200 350 -200 0 1 0 N +X IN1 1 -600 50 200 R 50 50 1 1 I +X IN2 2 -600 -50 200 R 50 50 1 1 I +X IN3 3 -600 -150 200 R 50 50 1 1 I +X OUT1 4 550 50 200 L 50 50 1 1 O +X OUT2 5 550 -50 200 L 50 50 1 1 O +X OUT3 6 550 -150 200 L 50 50 1 1 O +ENDDRAW +ENDDEF +# +# dac_bridge_2 +# +DEF dac_bridge_2 U 0 40 Y Y 1 F N +F0 "U" 0 0 60 H V C CNN +F1 "dac_bridge_2" 50 150 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S -250 200 350 -100 0 1 0 N +X IN1 1 -450 50 200 R 50 50 1 1 I +X IN2 2 -450 -50 200 R 50 50 1 1 I +X OUT1 3 550 50 200 L 50 50 1 1 O +X OUT4 4 550 -50 200 L 50 50 1 1 O +ENDDRAW +ENDDEF +# +# full_adder +# +DEF full_adder X 0 40 Y Y 1 F N +F0 "X" 1400 700 60 H V C CNN +F1 "full_adder" 1400 600 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S 800 1150 1950 0 0 1 0 N +X IN1 1 600 950 200 R 50 50 1 1 I +X IN2 2 600 550 200 R 50 50 1 1 I +X CIN 3 600 150 200 R 50 50 1 1 I +X SUM 4 2150 950 200 L 50 50 1 1 O +X COUT 5 2150 150 200 L 50 50 1 1 O +ENDDRAW +ENDDEF +# +# plot_v1 +# +DEF plot_v1 U 0 40 Y Y 1 F N +F0 "U" 0 500 60 H V C CNN +F1 "plot_v1" 200 350 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +C 0 500 100 0 1 0 N +X ~ ~ 0 200 200 U 50 50 1 1 I +ENDDRAW +ENDDEF +# +#End Library diff --git a/docker-launcher/Examples/FullAdder/FullAdder.cir b/docker-launcher/Examples/FullAdder/FullAdder.cir new file mode 100644 index 0000000..c4eb27c --- /dev/null +++ b/docker-launcher/Examples/FullAdder/FullAdder.cir @@ -0,0 +1,23 @@ +* /home/fossee/eSim-Workspace/FullAdder/FullAdder.cir + +* EESchema Netlist Version 1.1 (Spice format) creation date: Tue Mar 1 18:16:27 2016 + +* To exclude a component from the Spice Netlist add [Spice_Netlist_Enabled] user FIELD set to: N +* To reorder the component spice node sequence add [Spice_Node_Sequence] user FIELD and define sequence: 2,1,0 + +* Sheet Name: / +X1 Net-_U6-Pad4_ Net-_U6-Pad5_ Net-_U6-Pad6_ Net-_U7-Pad1_ Net-_U7-Pad2_ full_adder +v1 in1 GND DC +v2 in2 GND DC +v3 cin GND DC +R1 sum GND 1k +R2 cout GND 1k +U2 in1 plot_v1 +U1 in2 plot_v1 +U3 cin plot_v1 +U4 sum plot_v1 +U5 cout plot_v1 +U6 in1 in2 cin Net-_U6-Pad4_ Net-_U6-Pad5_ Net-_U6-Pad6_ adc_bridge_3 +U7 Net-_U7-Pad1_ Net-_U7-Pad2_ sum cout dac_bridge_2 + +.end diff --git a/docker-launcher/Examples/FullAdder/FullAdder.cir.out b/docker-launcher/Examples/FullAdder/FullAdder.cir.out new file mode 100644 index 0000000..89cd256 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/FullAdder.cir.out @@ -0,0 +1,36 @@ +* /home/fossee/esim-workspace/fulladder/fulladder.cir + +.include full_adder.sub +x1 net-_u6-pad4_ net-_u6-pad5_ net-_u6-pad6_ net-_u7-pad1_ net-_u7-pad2_ full_adder +v1 in1 gnd dc 5 +v2 in2 gnd dc 0 +v3 cin gnd dc 5 +r1 sum gnd 1k +r2 cout gnd 1k +* u2 in1 plot_v1 +* u1 in2 plot_v1 +* u3 cin plot_v1 +* u4 sum plot_v1 +* u5 cout plot_v1 +* u6 in1 in2 cin net-_u6-pad4_ net-_u6-pad5_ net-_u6-pad6_ adc_bridge_3 +* u7 net-_u7-pad1_ net-_u7-pad2_ sum cout dac_bridge_2 +a1 [in1 in2 cin ] [net-_u6-pad4_ net-_u6-pad5_ net-_u6-pad6_ ] u6 +a2 [net-_u7-pad1_ net-_u7-pad2_ ] [sum cout ] u7 +* Schematic Name: adc_bridge_3, NgSpice Name: adc_bridge +.model u6 adc_bridge(fall_delay=1.0e-9 in_high=2.0 rise_delay=1.0e-9 in_low=1.0 ) +* Schematic Name: dac_bridge_2, NgSpice Name: dac_bridge +.model u7 dac_bridge(out_undef=0.5 out_low=0.0 out_high=5.0 t_rise=1.0e-9 t_fall=1.0e-9 input_load=1.0e-12 ) +.tran 10e-00 100e-00 0e-00 + +* Control Statements +.control +run +print allv > plot_data_v.txt +print alli > plot_data_i.txt +plot v(in1) +plot v(in2) +plot v(cin) +plot v(sum) +plot v(cout) +.endc +.end diff --git a/docker-launcher/Examples/FullAdder/FullAdder.kicad_pro b/docker-launcher/Examples/FullAdder/FullAdder.kicad_pro new file mode 100644 index 0000000..77e229f --- /dev/null +++ b/docker-launcher/Examples/FullAdder/FullAdder.kicad_pro @@ -0,0 +1,316 @@ +{ + "board": { + "design_settings": { + "defaults": { + "board_outline_line_width": 0.1, + "copper_line_width": 0.2, + "copper_text_size_h": 1.5, + "copper_text_size_v": 1.5, + "copper_text_thickness": 0.3, + "other_line_width": 0.15, + "silk_line_width": 0.15, + "silk_text_size_h": 1.0, + "silk_text_size_v": 1.0, + "silk_text_thickness": 0.15 + }, + "diff_pair_dimensions": [], + "drc_exclusions": [], + "rules": { + "solder_mask_clearance": 0.0, + "solder_mask_min_width": 0.0 + }, + "track_widths": [], + "via_dimensions": [] + }, + "layer_presets": [] + }, + "boards": [], + "cvpcb": { + "equivalence_files": [] + }, + "erc": { + "erc_exclusions": [], + "meta": { + "version": 0 + }, + "pin_map": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 0, + 1, + 0, + 0, + 1, + 0, + 2, + 2, + 2, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 2 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 2, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2 + ], + [ + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 2, + 0, + 0, + 1, + 0, + 2, + 2, + 2, + 2 + ], + [ + 0, + 2, + 0, + 1, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 1, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 2 + ], + [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ] + ], + "rule_severities": { + "bus_definition_conflict": "error", + "bus_entry_needed": "error", + "bus_label_syntax": "error", + "bus_to_bus_conflict": "error", + "bus_to_net_conflict": "error", + "different_unit_footprint": "error", + "different_unit_net": "error", + "duplicate_reference": "error", + "duplicate_sheet_names": "error", + "extra_units": "error", + "global_label_dangling": "warning", + "hier_label_mismatch": "error", + "label_dangling": "error", + "lib_symbol_issues": "warning", + "multiple_net_names": "warning", + "net_not_bus_member": "warning", + "no_connect_connected": "warning", + "no_connect_dangling": "warning", + "pin_not_connected": "error", + "pin_not_driven": "error", + "pin_to_pin": "warning", + "power_pin_not_driven": "error", + "similar_labels": "warning", + "unannotated": "error", + "unit_value_mismatch": "error", + "unresolved_variable": "error", + "wire_dangling": "error" + } + }, + "libraries": { + "pinned_footprint_libs": [], + "pinned_symbol_libs": [] + }, + "meta": { + "filename": "FullAdder.kicad_pro", + "version": 1 + }, + "net_settings": { + "classes": [ + { + "bus_width": 12.0, + "clearance": 0.2, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "Default", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.25, + "via_diameter": 0.8, + "via_drill": 0.4, + "wire_width": 6.0 + } + ], + "meta": { + "version": 2 + }, + "net_colors": null + }, + "pcbnew": { + "last_paths": { + "gencad": "", + "idf": "", + "netlist": "", + "specctra_dsn": "", + "step": "", + "vrml": "" + }, + "page_layout_descr_file": "" + }, + "schematic": { + "annotate_start_num": 0, + "drawing": { + "default_line_thickness": 6.0, + "default_text_size": 50.0, + "field_names": [], + "intersheets_ref_own_page": false, + "intersheets_ref_prefix": "", + "intersheets_ref_short": false, + "intersheets_ref_show": false, + "intersheets_ref_suffix": "", + "junction_size_choice": 3, + "label_size_ratio": 0.25, + "pin_symbol_size": 0.0, + "text_offset_ratio": 0.08 + }, + "legacy_lib_dir": "", + "legacy_lib_list": [], + "meta": { + "version": 1 + }, + "net_format_name": "", + "page_layout_descr_file": "", + "plot_directory": "", + "spice_adjust_passive_values": false, + "spice_external_command": "spice \"%I\"", + "subpart_first_id": 65, + "subpart_id_separator": 0 + }, + "sheets": [ + [ + "378af8b4-af3d-46e7-89ae-deff12ca9067", + "" + ] + ], + "text_variables": {} +} diff --git a/docker-launcher/Examples/FullAdder/FullAdder.kicad_sch b/docker-launcher/Examples/FullAdder/FullAdder.kicad_sch new file mode 100644 index 0000000..bec39b3 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/FullAdder.kicad_sch @@ -0,0 +1,849 @@ +(kicad_sch (version 20211123) (generator eeschema) + + (uuid 378af8b4-af3d-46e7-89ae-deff12ca9067) + + (paper "A4") + + (lib_symbols + (symbol "FullAdder-rescue:DC-RESCUE-FullAdder" (pin_names (offset 1.016)) (in_bom yes) (on_board yes) + (property "Reference" "v" (id 0) (at -5.08 2.54 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "DC-RESCUE-FullAdder" (id 1) (at -5.08 -1.27 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "R1" (id 2) (at -7.62 0 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 0 0 0) + (effects (font (size 1.524 1.524))) + ) + (property "ki_fp_filters" "1_pin" (id 4) (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "DC-RESCUE-FullAdder_0_1" + (circle (center 0 0) (radius 3.81) + (stroke (width 0) (type default) (color 0 0 0 0)) + (fill (type none)) + ) + ) + (symbol "DC-RESCUE-FullAdder_1_1" + (pin passive line (at 0 11.43 270) (length 7.62) + (name "+" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin passive line (at 0 -11.43 90) (length 7.62) + (name "-" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "FullAdder-rescue:GND" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes) + (property "Reference" "#PWR" (id 0) (at 0 -6.35 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (id 1) (at 0 -3.81 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (id 2) (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Datasheet" "" (id 3) (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "GND_0_1" + (polyline + (pts + (xy 0 0) + (xy 0 -1.27) + (xy 1.27 -1.27) + (xy 0 -2.54) + (xy -1.27 -1.27) + (xy 0 -1.27) + ) + (stroke (width 0) (type default) (color 0 0 0 0)) + (fill (type none)) + ) + ) + (symbol "GND_1_1" + (pin power_in line (at 0 0 270) (length 0) hide + (name "GND" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "FullAdder-rescue:R" (pin_numbers hide) (pin_names (offset 0)) (in_bom yes) (on_board yes) + (property "Reference" "R" (id 0) (at 1.27 3.302 0) + (effects (font (size 1.27 1.27))) + ) + (property "Value" "R" (id 1) (at 1.27 1.27 0) + (effects (font (size 1.27 1.27))) + ) + (property "Footprint" "" (id 2) (at 1.27 -0.508 0) + (effects (font (size 0.762 0.762))) + ) + (property "Datasheet" "" (id 3) (at 1.27 1.27 90) + (effects (font (size 0.762 0.762))) + ) + (property "ki_fp_filters" "R_* Resistor_*" (id 4) (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + (symbol "R_0_1" + (rectangle (start 3.81 0.254) (end -1.27 2.286) + (stroke (width 0.254) (type default) (color 0 0 0 0)) + (fill (type none)) + ) + ) + (symbol "R_1_1" + (pin passive line (at -2.54 1.27 0) (length 1.27) + (name "~" (effects (font (size 1.524 1.524)))) + (number "1" (effects (font (size 1.524 1.524)))) + ) + (pin passive line (at 5.08 1.27 180) (length 1.27) + (name "~" (effects (font (size 1.524 1.524)))) + (number "2" (effects (font (size 1.524 1.524)))) + ) + ) + ) + (symbol "FullAdder-rescue:adc_bridge_3" (pin_names (offset 1.016)) (in_bom yes) (on_board yes) + (property "Reference" "U" (id 0) (at 0 0 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "adc_bridge_3" (id 1) (at 0 3.81 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 0 0 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 0 0 0) + (effects (font (size 1.524 1.524))) + ) + (symbol "adc_bridge_3_0_1" + (rectangle (start -10.16 5.08) (end 8.89 -5.08) + (stroke (width 0) (type default) (color 0 0 0 0)) + (fill (type none)) + ) + ) + (symbol "adc_bridge_3_1_1" + (pin input line (at -15.24 1.27 0) (length 5.08) + (name "IN1" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at -15.24 -1.27 0) (length 5.08) + (name "IN2" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at -15.24 -3.81 0) (length 5.08) + (name "IN3" (effects (font (size 1.27 1.27)))) + (number "3" (effects (font (size 1.27 1.27)))) + ) + (pin output line (at 13.97 1.27 180) (length 5.08) + (name "OUT1" (effects (font (size 1.27 1.27)))) + (number "4" (effects (font (size 1.27 1.27)))) + ) + (pin output line (at 13.97 -1.27 180) (length 5.08) + (name "OUT2" (effects (font (size 1.27 1.27)))) + (number "5" (effects (font (size 1.27 1.27)))) + ) + (pin output line (at 13.97 -3.81 180) (length 5.08) + (name "OUT3" (effects (font (size 1.27 1.27)))) + (number "6" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "FullAdder-rescue:dac_bridge_2" (pin_names (offset 1.016)) (in_bom yes) (on_board yes) + (property "Reference" "U" (id 0) (at 0 0 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "dac_bridge_2" (id 1) (at 1.27 3.81 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 0 0 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 0 0 0) + (effects (font (size 1.524 1.524))) + ) + (symbol "dac_bridge_2_0_1" + (rectangle (start -6.35 5.08) (end 8.89 -2.54) + (stroke (width 0) (type default) (color 0 0 0 0)) + (fill (type none)) + ) + ) + (symbol "dac_bridge_2_1_1" + (pin input line (at -11.43 1.27 0) (length 5.08) + (name "IN1" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at -11.43 -1.27 0) (length 5.08) + (name "IN2" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + (pin output line (at 13.97 1.27 180) (length 5.08) + (name "OUT1" (effects (font (size 1.27 1.27)))) + (number "3" (effects (font (size 1.27 1.27)))) + ) + (pin output line (at 13.97 -1.27 180) (length 5.08) + (name "OUT4" (effects (font (size 1.27 1.27)))) + (number "4" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "FullAdder-rescue:full_adder" (pin_names (offset 1.016)) (in_bom yes) (on_board yes) + (property "Reference" "X" (id 0) (at 35.56 17.78 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "full_adder" (id 1) (at 35.56 15.24 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 0 0 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 0 0 0) + (effects (font (size 1.524 1.524))) + ) + (symbol "full_adder_0_1" + (rectangle (start 20.32 29.21) (end 49.53 0) + (stroke (width 0) (type default) (color 0 0 0 0)) + (fill (type none)) + ) + ) + (symbol "full_adder_1_1" + (pin input line (at 15.24 24.13 0) (length 5.08) + (name "IN1" (effects (font (size 1.27 1.27)))) + (number "1" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 15.24 13.97 0) (length 5.08) + (name "IN2" (effects (font (size 1.27 1.27)))) + (number "2" (effects (font (size 1.27 1.27)))) + ) + (pin input line (at 15.24 3.81 0) (length 5.08) + (name "CIN" (effects (font (size 1.27 1.27)))) + (number "3" (effects (font (size 1.27 1.27)))) + ) + (pin output line (at 54.61 24.13 180) (length 5.08) + (name "SUM" (effects (font (size 1.27 1.27)))) + (number "4" (effects (font (size 1.27 1.27)))) + ) + (pin output line (at 54.61 3.81 180) (length 5.08) + (name "COUT" (effects (font (size 1.27 1.27)))) + (number "5" (effects (font (size 1.27 1.27)))) + ) + ) + ) + (symbol "FullAdder-rescue:plot_v1" (pin_names (offset 1.016)) (in_bom yes) (on_board yes) + (property "Reference" "U" (id 0) (at 0 12.7 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "plot_v1" (id 1) (at 5.08 8.89 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 0 0 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 0 0 0) + (effects (font (size 1.524 1.524))) + ) + (symbol "plot_v1_0_1" + (circle (center 0 12.7) (radius 2.54) + (stroke (width 0) (type default) (color 0 0 0 0)) + (fill (type none)) + ) + ) + (symbol "plot_v1_1_1" + (pin input line (at 0 5.08 90) (length 5.08) + (name "~" (effects (font (size 1.27 1.27)))) + (number "~" (effects (font (size 1.27 1.27)))) + ) + ) + ) + ) + + (junction (at 68.58 88.9) (diameter 0) (color 0 0 0 0) + (uuid 097edb1b-8998-4e70-b670-bba125982348) + ) + (junction (at 72.39 99.06) (diameter 0) (color 0 0 0 0) + (uuid 15fe8f3d-6077-4e0e-81d0-8ec3f4538981) + ) + (junction (at 204.47 80.01) (diameter 0) (color 0 0 0 0) + (uuid 35a9f71f-ba35-47f6-814e-4106ac36c51e) + ) + (junction (at 71.12 78.74) (diameter 0) (color 0 0 0 0) + (uuid 477311b9-8f81-40c8-9c55-fd87e287247a) + ) + (junction (at 77.47 99.06) (diameter 0) (color 0 0 0 0) + (uuid 994b6220-4755-4d84-91b3-6122ac1c2c5e) + ) + (junction (at 204.47 100.33) (diameter 0) (color 0 0 0 0) + (uuid 9b3c58a7-a9b9-4498-abc0-f9f43e4f0292) + ) + (junction (at 200.66 80.01) (diameter 0) (color 0 0 0 0) + (uuid b0906e10-2fbc-4309-a8b4-6fc4cd1a5490) + ) + (junction (at 48.26 78.74) (diameter 0) (color 0 0 0 0) + (uuid e1535036-5d36-405f-bb86-3819621c4f23) + ) + (junction (at 54.61 88.9) (diameter 0) (color 0 0 0 0) + (uuid e65b62be-e01b-4688-a999-1d1be370c4ae) + ) + (junction (at 201.93 100.33) (diameter 0) (color 0 0 0 0) + (uuid f4eb0267-179f-46c9-b516-9bfb06bac1ba) + ) + + (wire (pts (xy 195.58 88.9) (xy 199.39 88.9)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 0ce8d3ab-2662-4158-8a2a-18b782908fc5) + ) + (wire (pts (xy 200.66 80.01) (xy 204.47 80.01)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 0d993e48-cea3-4104-9c5a-d8f97b64a3ac) + ) + (wire (pts (xy 200.66 78.74) (xy 200.66 80.01)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 0e8f7fc0-2ef2-4b90-9c15-8a3a601ee459) + ) + (wire (pts (xy 72.39 99.06) (xy 77.47 99.06)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 20901d7e-a300-4069-8967-a6a7e97a68bc) + ) + (wire (pts (xy 199.39 88.9) (xy 199.39 100.33)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 29195ea4-8218-44a1-b4bf-466bee0082e4) + ) + (wire (pts (xy 165.1 99.06) (xy 170.18 99.06)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 29e058a7-50a3-43e5-81c3-bfee53da08be) + ) + (wire (pts (xy 49.53 88.9) (xy 54.61 88.9)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 309b3bff-19c8-41ec-a84d-63399c649f46) + ) + (wire (pts (xy 48.26 78.74) (xy 71.12 78.74)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 35c09d1f-2914-4d1e-a002-df30af772f3b) + ) + (wire (pts (xy 199.39 86.36) (xy 199.39 80.01)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 382ca670-6ae8-4de6-90f9-f241d1337171) + ) + (wire (pts (xy 201.93 99.06) (xy 201.93 100.33)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 3a52f112-cb97-43db-aaeb-20afe27664d7) + ) + (wire (pts (xy 170.18 78.74) (xy 170.18 86.36)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 3fd54105-4b7e-4004-9801-76ec66108a22) + ) + (wire (pts (xy 71.12 78.74) (xy 83.82 78.74)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 422b10b9-e829-44a2-8808-05edd8cb3050) + ) + (wire (pts (xy 33.02 78.74) (xy 48.26 78.74)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 57c0c267-8bf9-4cc7-b734-d71a239ac313) + ) + (wire (pts (xy 204.47 81.28) (xy 204.47 80.01)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 5b34a16c-5a14-4291-8242-ea6d6ac54372) + ) + (wire (pts (xy 68.58 99.06) (xy 72.39 99.06)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 5ca4be1c-537e-4a4a-b344-d0c8ffde8546) + ) + (wire (pts (xy 170.18 99.06) (xy 170.18 88.9)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 5cf2db29-f7ab-499a-9907-cdeba64bf0f3) + ) + (wire (pts (xy 199.39 100.33) (xy 201.93 100.33)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 6284122b-79c3-4e04-925e-3d32cc3ec077) + ) + (wire (pts (xy 199.39 80.01) (xy 200.66 80.01)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 67763d19-f622-4e1e-81e5-5b24da7c3f99) + ) + (wire (pts (xy 165.1 78.74) (xy 170.18 78.74)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 6fd4442e-30b3-428b-9306-61418a63d311) + ) + (wire (pts (xy 54.61 87.63) (xy 54.61 88.9)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 814763c2-92e5-4a2c-941c-9bbd073f6e87) + ) + (wire (pts (xy 48.26 77.47) (xy 48.26 78.74)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 82be7aae-5d06-4178-8c3e-98760c41b054) + ) + (wire (pts (xy 71.12 77.47) (xy 71.12 78.74)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 84e5506c-143e-495f-9aa4-d3a71622f213) + ) + (wire (pts (xy 49.53 111.76) (xy 49.53 113.03)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 8c0807a7-765b-4fa5-baaa-e09a2b610e6b) + ) + (wire (pts (xy 201.93 100.33) (xy 204.47 100.33)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid b12e5309-5d01-40ef-a9c3-8453e00a555e) + ) + (wire (pts (xy 113.03 99.06) (xy 125.73 99.06)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid bd9595a1-04f3-4fda-8f1b-e65ad874edd3) + ) + (wire (pts (xy 113.03 91.44) (xy 113.03 99.06)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid be645d0f-8568-47a0-a152-e3ddd33563eb) + ) + (wire (pts (xy 204.47 80.01) (xy 205.74 80.01)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid be6b17f9-34f5-44e9-a4c7-725d2e274a9d) + ) + (wire (pts (xy 204.47 102.87) (xy 204.47 100.33)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid c094494a-f6f7-43fc-a007-4951484ddf3a) + ) + (wire (pts (xy 113.03 86.36) (xy 113.03 78.74)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid c9667181-b3c7-4b01-b8b4-baa29a9aea63) + ) + (wire (pts (xy 77.47 99.06) (xy 83.82 99.06)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid cf21dfe3-ab4f-4ad9-b7cf-dc892d833b13) + ) + (wire (pts (xy 83.82 78.74) (xy 83.82 86.36)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid cff34251-839c-4da9-a0ad-85d0fc4e32af) + ) + (wire (pts (xy 83.82 99.06) (xy 83.82 91.44)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid d0fb0864-e79b-4bdc-8e8e-eed0cabe6d56) + ) + (wire (pts (xy 113.03 88.9) (xy 125.73 88.9)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid d5b800ca-1ab6-4b66-b5f7-2dda5658b504) + ) + (wire (pts (xy 54.61 88.9) (xy 68.58 88.9)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid e2b24e25-1a0d-434a-876b-c595b47d80d2) + ) + (wire (pts (xy 72.39 97.79) (xy 72.39 99.06)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid e40e8cef-4fb0-4fc3-be09-3875b2cc8469) + ) + (wire (pts (xy 113.03 78.74) (xy 125.73 78.74)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid ebd06df3-d52b-4cff-99a2-a771df6d3733) + ) + (wire (pts (xy 204.47 100.33) (xy 205.74 100.33)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid f56d244f-1fa4-4475-ac1d-f41eed31a48b) + ) + (wire (pts (xy 68.58 88.9) (xy 83.82 88.9)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid fad4c712-0a2e-465d-a9f8-83d26bd66e37) + ) + (wire (pts (xy 195.58 86.36) (xy 199.39 86.36)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid feb26ecb-9193-46ea-a41b-d09305bf0a3e) + ) + + (global_label "sum" (shape input) (at 204.47 81.28 270) (fields_autoplaced) + (effects (font (size 1.524 1.524)) (justify right)) + (uuid 101ef598-601d-400e-9ef6-d655fbb1dbfa) + (property "Intersheet References" "${INTERSHEET_REFS}" (id 0) (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + ) + (global_label "in2" (shape input) (at 54.61 87.63 90) (fields_autoplaced) + (effects (font (size 1.524 1.524)) (justify left)) + (uuid 65134029-dbd2-409a-85a8-13c2a33ff019) + (property "Intersheet References" "${INTERSHEET_REFS}" (id 0) (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + ) + (global_label "cout" (shape input) (at 204.47 102.87 270) (fields_autoplaced) + (effects (font (size 1.524 1.524)) (justify right)) + (uuid 6781326c-6e0d-4753-8f28-0f5c687e01f9) + (property "Intersheet References" "${INTERSHEET_REFS}" (id 0) (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + ) + (global_label "in1" (shape input) (at 48.26 77.47 90) (fields_autoplaced) + (effects (font (size 1.524 1.524)) (justify left)) + (uuid 8087f566-a94d-4bbc-985b-e49ee7762296) + (property "Intersheet References" "${INTERSHEET_REFS}" (id 0) (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + ) + (global_label "cin" (shape input) (at 72.39 97.79 90) (fields_autoplaced) + (effects (font (size 1.524 1.524)) (justify left)) + (uuid a8447faf-e0a0-4c4a-ae53-4d4b28669151) + (property "Intersheet References" "${INTERSHEET_REFS}" (id 0) (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + ) + + (symbol (lib_id "FullAdder-rescue:full_adder") (at 110.49 102.87 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d58c2e) + (property "Reference" "X1" (id 0) (at 146.05 85.09 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "full_adder" (id 1) (at 146.05 87.63 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 110.49 102.87 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 110.49 102.87 0) + (effects (font (size 1.524 1.524))) + ) + (pin "1" (uuid c4cab9c5-d6e5-4660-b910-603a51b56783)) + (pin "2" (uuid 6ffdf05e-e119-49f9-85e9-13e4901df42a)) + (pin "3" (uuid 4c843bdb-6c9e-40dd-85e2-0567846e18ba)) + (pin "4" (uuid 72b36951-3ec7-4569-9c88-cf9b4afe1cae)) + (pin "5" (uuid eb8d02e9-145c-465d-b6a8-bae84d47a94b)) + ) + + (symbol (lib_id "FullAdder-rescue:DC-RESCUE-FullAdder") (at 33.02 90.17 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d58cb2) + (property "Reference" "v1" (id 0) (at 27.94 87.63 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "DC" (id 1) (at 27.94 91.44 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "R1" (id 2) (at 25.4 90.17 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 33.02 90.17 0) + (effects (font (size 1.524 1.524))) + ) + (pin "1" (uuid 9f782c92-a5e8-49db-bfda-752b35522ce4)) + (pin "2" (uuid ccc4cc25-ac17-45ef-825c-e079951ffb21)) + ) + + (symbol (lib_id "FullAdder-rescue:DC-RESCUE-FullAdder") (at 49.53 100.33 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d58d3d) + (property "Reference" "v2" (id 0) (at 44.45 97.79 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "DC" (id 1) (at 44.45 101.6 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "R1" (id 2) (at 41.91 100.33 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 49.53 100.33 0) + (effects (font (size 1.524 1.524))) + ) + (pin "1" (uuid 9390234f-bf3f-46cd-b6a0-8a438ec76e9f)) + (pin "2" (uuid 9e813ec2-d4ce-4e2e-b379-c6fedb4c45db)) + ) + + (symbol (lib_id "FullAdder-rescue:DC-RESCUE-FullAdder") (at 68.58 110.49 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d58d84) + (property "Reference" "v3" (id 0) (at 63.5 107.95 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "DC" (id 1) (at 63.5 111.76 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "R1" (id 2) (at 60.96 110.49 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 68.58 110.49 0) + (effects (font (size 1.524 1.524))) + ) + (pin "1" (uuid 501880c3-8633-456f-9add-0e8fa1932ba6)) + (pin "2" (uuid c454102f-dc92-4550-9492-797fc8e6b49c)) + ) + + (symbol (lib_id "FullAdder-rescue:R") (at 208.28 81.28 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d58f73) + (property "Reference" "R1" (id 0) (at 209.55 77.978 0)) + (property "Value" "1k" (id 1) (at 209.55 80.01 0)) + (property "Footprint" "" (id 2) (at 209.55 81.788 0) + (effects (font (size 0.762 0.762))) + ) + (property "Datasheet" "" (id 3) (at 209.55 80.01 90) + (effects (font (size 0.762 0.762))) + ) + (pin "1" (uuid 7a2f50f6-0c99-4e8d-9c2a-8f2f961d2e6d)) + (pin "2" (uuid ae0e6b31-27d7-4383-a4fc-7557b0a19382)) + ) + + (symbol (lib_id "FullAdder-rescue:R") (at 208.28 101.6 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d58fbb) + (property "Reference" "R2" (id 0) (at 209.55 98.298 0)) + (property "Value" "1k" (id 1) (at 209.55 100.33 0)) + (property "Footprint" "" (id 2) (at 209.55 102.108 0) + (effects (font (size 0.762 0.762))) + ) + (property "Datasheet" "" (id 3) (at 209.55 100.33 90) + (effects (font (size 0.762 0.762))) + ) + (pin "1" (uuid 5b0a5a46-7b51-4262-a80e-d33dd1806615)) + (pin "2" (uuid 30c33e3e-fb78-498d-bffe-76273d527004)) + ) + + (symbol (lib_id "FullAdder-rescue:GND") (at 213.36 80.01 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d59061) + (property "Reference" "#PWR01" (id 0) (at 213.36 86.36 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (id 1) (at 213.36 83.82 0)) + (property "Footprint" "" (id 2) (at 213.36 80.01 0)) + (property "Datasheet" "" (id 3) (at 213.36 80.01 0)) + (pin "1" (uuid 3b686d17-1000-4762-ba31-589d599a3edf)) + ) + + (symbol (lib_id "FullAdder-rescue:GND") (at 213.36 100.33 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d590a3) + (property "Reference" "#PWR02" (id 0) (at 213.36 106.68 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (id 1) (at 213.36 104.14 0)) + (property "Footprint" "" (id 2) (at 213.36 100.33 0)) + (property "Datasheet" "" (id 3) (at 213.36 100.33 0)) + (pin "1" (uuid 802c2dc3-ca9f-491e-9d66-7893e89ac34c)) + ) + + (symbol (lib_id "FullAdder-rescue:GND") (at 68.58 121.92 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d590f0) + (property "Reference" "#PWR03" (id 0) (at 68.58 128.27 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (id 1) (at 68.58 125.73 0)) + (property "Footprint" "" (id 2) (at 68.58 121.92 0)) + (property "Datasheet" "" (id 3) (at 68.58 121.92 0)) + (pin "1" (uuid f9b1563b-384a-447c-9f47-736504e995c8)) + ) + + (symbol (lib_id "FullAdder-rescue:GND") (at 49.53 113.03 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d59137) + (property "Reference" "#PWR04" (id 0) (at 49.53 119.38 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (id 1) (at 49.53 116.84 0)) + (property "Footprint" "" (id 2) (at 49.53 113.03 0)) + (property "Datasheet" "" (id 3) (at 49.53 113.03 0)) + (pin "1" (uuid 6afc19cf-38b4-47a3-bc2b-445b18724310)) + ) + + (symbol (lib_id "FullAdder-rescue:GND") (at 33.02 101.6 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d59154) + (property "Reference" "#PWR05" (id 0) (at 33.02 107.95 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "GND" (id 1) (at 33.02 105.41 0)) + (property "Footprint" "" (id 2) (at 33.02 101.6 0)) + (property "Datasheet" "" (id 3) (at 33.02 101.6 0)) + (pin "1" (uuid 7ce7415d-7c22-49f6-8215-488853ccc8c6)) + ) + + (symbol (lib_id "FullAdder-rescue:plot_v1") (at 71.12 82.55 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d59201) + (property "Reference" "U2" (id 0) (at 71.12 69.85 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "plot_v1" (id 1) (at 76.2 73.66 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 71.12 82.55 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 71.12 82.55 0) + (effects (font (size 1.524 1.524))) + ) + (pin "~" (uuid a7f25f41-0b4c-4430-b6cd-b2160b2db099)) + ) + + (symbol (lib_id "FullAdder-rescue:plot_v1") (at 68.58 93.98 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d59261) + (property "Reference" "U1" (id 0) (at 68.58 81.28 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "plot_v1" (id 1) (at 73.66 85.09 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 68.58 93.98 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 68.58 93.98 0) + (effects (font (size 1.524 1.524))) + ) + (pin "~" (uuid 0fafc6b9-fd35-4a55-9270-7a8e7ce3cb13)) + ) + + (symbol (lib_id "FullAdder-rescue:plot_v1") (at 77.47 104.14 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d592af) + (property "Reference" "U3" (id 0) (at 77.47 91.44 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "plot_v1" (id 1) (at 82.55 95.25 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 77.47 104.14 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 77.47 104.14 0) + (effects (font (size 1.524 1.524))) + ) + (pin "~" (uuid 6513181c-0a6a-4560-9a18-17450c36ae2a)) + ) + + (symbol (lib_id "FullAdder-rescue:plot_v1") (at 200.66 83.82 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d59437) + (property "Reference" "U4" (id 0) (at 200.66 71.12 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "plot_v1" (id 1) (at 205.74 74.93 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 200.66 83.82 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 200.66 83.82 0) + (effects (font (size 1.524 1.524))) + ) + (pin "~" (uuid a5be2cb8-c68d-4180-8412-69a6b4c5b1d4)) + ) + + (symbol (lib_id "FullAdder-rescue:plot_v1") (at 201.93 104.14 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d59491) + (property "Reference" "U5" (id 0) (at 201.93 91.44 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "plot_v1" (id 1) (at 207.01 95.25 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 201.93 104.14 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 201.93 104.14 0) + (effects (font (size 1.524 1.524))) + ) + (pin "~" (uuid 60aa0ce8-9d0e-48ca-bbf9-866403979e9b)) + ) + + (symbol (lib_id "FullAdder-rescue:adc_bridge_3") (at 99.06 87.63 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d59bd2) + (property "Reference" "U6" (id 0) (at 99.06 87.63 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "adc_bridge_3" (id 1) (at 99.06 83.82 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 99.06 87.63 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 99.06 87.63 0) + (effects (font (size 1.524 1.524))) + ) + (pin "1" (uuid 2878a73c-5447-4cd9-8194-14f52ab9459c)) + (pin "2" (uuid 955cc99e-a129-42cf-abc7-aa99813fdb5f)) + (pin "3" (uuid 04cf2f2c-74bf-400d-b4f6-201720df00ed)) + (pin "4" (uuid 1bdd5841-68b7-42e2-9447-cbdb608d8a08)) + (pin "5" (uuid aeb03be9-98f0-43f6-9432-1bb35aa04bab)) + (pin "6" (uuid 008da5b9-6f95-4113-b7d0-d93ac62efd33)) + ) + + (symbol (lib_id "FullAdder-rescue:dac_bridge_2") (at 181.61 87.63 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d5ad2f) + (property "Reference" "U7" (id 0) (at 181.61 87.63 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "dac_bridge_2" (id 1) (at 182.88 83.82 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 181.61 87.63 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 181.61 87.63 0) + (effects (font (size 1.524 1.524))) + ) + (pin "1" (uuid eab9c52c-3aa0-43a7-bc7f-7e234ff1e9f4)) + (pin "2" (uuid 3e915099-a18e-49f4-89bb-abe64c2dade5)) + (pin "3" (uuid 30317bf0-88bb-49e7-bf8b-9f3883982225)) + (pin "4" (uuid f959907b-1cef-4760-b043-4260a660a2ae)) + ) + + (sheet_instances + (path "/" (page "1")) + ) + + (symbol_instances + (path "/00000000-0000-0000-0000-000056d59061" + (reference "#PWR01") (unit 1) (value "GND") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d590a3" + (reference "#PWR02") (unit 1) (value "GND") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d590f0" + (reference "#PWR03") (unit 1) (value "GND") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d59137" + (reference "#PWR04") (unit 1) (value "GND") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d59154" + (reference "#PWR05") (unit 1) (value "GND") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d58f73" + (reference "R1") (unit 1) (value "1k") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d58fbb" + (reference "R2") (unit 1) (value "1k") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d59261" + (reference "U1") (unit 1) (value "plot_v1") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d59201" + (reference "U2") (unit 1) (value "plot_v1") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d592af" + (reference "U3") (unit 1) (value "plot_v1") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d59437" + (reference "U4") (unit 1) (value "plot_v1") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d59491" + (reference "U5") (unit 1) (value "plot_v1") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d59bd2" + (reference "U6") (unit 1) (value "adc_bridge_3") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d5ad2f" + (reference "U7") (unit 1) (value "dac_bridge_2") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d58c2e" + (reference "X1") (unit 1) (value "full_adder") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d58cb2" + (reference "v1") (unit 1) (value "DC") (footprint "R1") + ) + (path "/00000000-0000-0000-0000-000056d58d3d" + (reference "v2") (unit 1) (value "DC") (footprint "R1") + ) + (path "/00000000-0000-0000-0000-000056d58d84" + (reference "v3") (unit 1) (value "DC") (footprint "R1") + ) + ) +) diff --git a/docker-launcher/Examples/FullAdder/FullAdder.pro b/docker-launcher/Examples/FullAdder/FullAdder.pro new file mode 100644 index 0000000..9e65fa1 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/FullAdder.pro @@ -0,0 +1,70 @@ +update=Wed Mar 11 16:17:06 2020 +version=1 +last_client=eeschema +[general] +version=1 +RootSch= +BoardNm= +[pcbnew] +version=1 +LastNetListRead= +UseCmpFile=1 +PadDrill=0.600000000000 +PadDrillOvalY=0.600000000000 +PadSizeH=1.500000000000 +PadSizeV=1.500000000000 +PcbTextSizeV=1.500000000000 +PcbTextSizeH=1.500000000000 +PcbTextThickness=0.300000000000 +ModuleTextSizeV=1.000000000000 +ModuleTextSizeH=1.000000000000 +ModuleTextSizeThickness=0.150000000000 +SolderMaskClearance=0.000000000000 +SolderMaskMinWidth=0.000000000000 +DrawSegmentWidth=0.200000000000 +BoardOutlineThickness=0.100000000000 +ModuleOutlineThickness=0.150000000000 +[cvpcb] +version=1 +NetIExt=net +[eeschema] +version=1 +LibDir= +[eeschema/libraries] +LibName1=FullAdder-rescue +LibName2=eSim_Analog +LibName3=eSim_Devices +LibName4=eSim_Digital +LibName5=eSim_Hybrid +LibName6=eSim_Miscellaneous +LibName7=eSim_Power +LibName8=eSim_Sources +LibName9=eSim_Subckt +LibName10=eSim_User +LibName11=eSim_Plot +LibName12=adc-dac +LibName13=memory +LibName14=xilinx +LibName15=microcontrollers +LibName16=dsp +LibName17=microchip +LibName18=analog_switches +LibName19=motorola +LibName20=texas +LibName21=intel +LibName22=audio +LibName23=interface +LibName24=digital-audio +LibName25=philips +LibName26=display +LibName27=cypress +LibName28=siliconi +LibName29=opto +LibName30=atmel +LibName31=contrib +LibName32=power +LibName33=transistors +LibName34=conn +LibName35=regul +LibName36=74xx +LibName37=cmos4000 diff --git a/docker-launcher/Examples/FullAdder/FullAdder.proj b/docker-launcher/Examples/FullAdder/FullAdder.proj new file mode 100644 index 0000000..2a30e6b --- /dev/null +++ b/docker-launcher/Examples/FullAdder/FullAdder.proj @@ -0,0 +1 @@ +schematicFile FullAdder.sch diff --git a/docker-launcher/Examples/FullAdder/FullAdder.sch b/docker-launcher/Examples/FullAdder/FullAdder.sch new file mode 100644 index 0000000..10ab7c9 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/FullAdder.sch @@ -0,0 +1,330 @@ +EESchema Schematic File Version 2 +LIBS:FullAdder-rescue +LIBS:eSim_Analog +LIBS:eSim_Devices +LIBS:eSim_Digital +LIBS:eSim_Hybrid +LIBS:eSim_Miscellaneous +LIBS:eSim_Power +LIBS:eSim_Sources +LIBS:eSim_Subckt +LIBS:eSim_User +LIBS:eSim_Plot +LIBS:adc-dac +LIBS:memory +LIBS:xilinx +LIBS:microcontrollers +LIBS:dsp +LIBS:microchip +LIBS:analog_switches +LIBS:motorola +LIBS:texas +LIBS:intel +LIBS:audio +LIBS:interface +LIBS:digital-audio +LIBS:philips +LIBS:display +LIBS:cypress +LIBS:siliconi +LIBS:opto +LIBS:atmel +LIBS:contrib +LIBS:power +LIBS:transistors +LIBS:conn +LIBS:regul +LIBS:74xx +LIBS:cmos4000 +LIBS:FullAdder-cache +EELAYER 25 0 +EELAYER END +$Descr A4 11693 8268 +encoding utf-8 +Sheet 1 1 +Title "" +Date "" +Rev "" +Comp "" +Comment1 "" +Comment2 "" +Comment3 "" +Comment4 "" +$EndDescr +$Comp +L full_adder X1 +U 1 1 56D58C2E +P 4350 4050 +F 0 "X1" H 5750 4750 60 0000 C CNN +F 1 "full_adder" H 5750 4650 60 0000 C CNN +F 2 "" H 4350 4050 60 0000 C CNN +F 3 "" H 4350 4050 60 0000 C CNN + 1 4350 4050 + 1 0 0 -1 +$EndComp +$Comp +L DC-RESCUE-FullAdder v1 +U 1 1 56D58CB2 +P 1300 3550 +F 0 "v1" H 1100 3650 60 0000 C CNN +F 1 "DC" H 1100 3500 60 0000 C CNN +F 2 "R1" H 1000 3550 60 0000 C CNN +F 3 "" H 1300 3550 60 0000 C CNN + 1 1300 3550 + 1 0 0 -1 +$EndComp +$Comp +L DC-RESCUE-FullAdder v2 +U 1 1 56D58D3D +P 1950 3950 +F 0 "v2" H 1750 4050 60 0000 C CNN +F 1 "DC" H 1750 3900 60 0000 C CNN +F 2 "R1" H 1650 3950 60 0000 C CNN +F 3 "" H 1950 3950 60 0000 C CNN + 1 1950 3950 + 1 0 0 -1 +$EndComp +$Comp +L DC-RESCUE-FullAdder v3 +U 1 1 56D58D84 +P 2700 4350 +F 0 "v3" H 2500 4450 60 0000 C CNN +F 1 "DC" H 2500 4300 60 0000 C CNN +F 2 "R1" H 2400 4350 60 0000 C CNN +F 3 "" H 2700 4350 60 0000 C CNN + 1 2700 4350 + 1 0 0 -1 +$EndComp +$Comp +L R R1 +U 1 1 56D58F73 +P 8200 3200 +F 0 "R1" H 8250 3330 50 0000 C CNN +F 1 "1k" H 8250 3250 50 0000 C CNN +F 2 "" H 8250 3180 30 0000 C CNN +F 3 "" V 8250 3250 30 0000 C CNN + 1 8200 3200 + 1 0 0 -1 +$EndComp +$Comp +L R R2 +U 1 1 56D58FBB +P 8200 4000 +F 0 "R2" H 8250 4130 50 0000 C CNN +F 1 "1k" H 8250 4050 50 0000 C CNN +F 2 "" H 8250 3980 30 0000 C CNN +F 3 "" V 8250 4050 30 0000 C CNN + 1 8200 4000 + 1 0 0 -1 +$EndComp +$Comp +L GND #PWR01 +U 1 1 56D59061 +P 8400 3150 +F 0 "#PWR01" H 8400 2900 50 0001 C CNN +F 1 "GND" H 8400 3000 50 0000 C CNN +F 2 "" H 8400 3150 50 0000 C CNN +F 3 "" H 8400 3150 50 0000 C CNN + 1 8400 3150 + 1 0 0 -1 +$EndComp +$Comp +L GND #PWR02 +U 1 1 56D590A3 +P 8400 3950 +F 0 "#PWR02" H 8400 3700 50 0001 C CNN +F 1 "GND" H 8400 3800 50 0000 C CNN +F 2 "" H 8400 3950 50 0000 C CNN +F 3 "" H 8400 3950 50 0000 C CNN + 1 8400 3950 + 1 0 0 -1 +$EndComp +$Comp +L GND #PWR03 +U 1 1 56D590F0 +P 2700 4800 +F 0 "#PWR03" H 2700 4550 50 0001 C CNN +F 1 "GND" H 2700 4650 50 0000 C CNN +F 2 "" H 2700 4800 50 0000 C CNN +F 3 "" H 2700 4800 50 0000 C CNN + 1 2700 4800 + 1 0 0 -1 +$EndComp +$Comp +L GND #PWR04 +U 1 1 56D59137 +P 1950 4450 +F 0 "#PWR04" H 1950 4200 50 0001 C CNN +F 1 "GND" H 1950 4300 50 0000 C CNN +F 2 "" H 1950 4450 50 0000 C CNN +F 3 "" H 1950 4450 50 0000 C CNN + 1 1950 4450 + 1 0 0 -1 +$EndComp +$Comp +L GND #PWR05 +U 1 1 56D59154 +P 1300 4000 +F 0 "#PWR05" H 1300 3750 50 0001 C CNN +F 1 "GND" H 1300 3850 50 0000 C CNN +F 2 "" H 1300 4000 50 0000 C CNN +F 3 "" H 1300 4000 50 0000 C CNN + 1 1300 4000 + 1 0 0 -1 +$EndComp +Wire Wire Line + 1300 3100 3300 3100 +Wire Wire Line + 2700 3900 3300 3900 +$Comp +L plot_v1 U2 +U 1 1 56D59201 +P 2800 3250 +F 0 "U2" H 2800 3750 60 0000 C CNN +F 1 "plot_v1" H 3000 3600 60 0000 C CNN +F 2 "" H 2800 3250 60 0000 C CNN +F 3 "" H 2800 3250 60 0000 C CNN + 1 2800 3250 + 1 0 0 -1 +$EndComp +$Comp +L plot_v1 U1 +U 1 1 56D59261 +P 2700 3700 +F 0 "U1" H 2700 4200 60 0000 C CNN +F 1 "plot_v1" H 2900 4050 60 0000 C CNN +F 2 "" H 2700 3700 60 0000 C CNN +F 3 "" H 2700 3700 60 0000 C CNN + 1 2700 3700 + 1 0 0 -1 +$EndComp +$Comp +L plot_v1 U3 +U 1 1 56D592AF +P 3050 4100 +F 0 "U3" H 3050 4600 60 0000 C CNN +F 1 "plot_v1" H 3250 4450 60 0000 C CNN +F 2 "" H 3050 4100 60 0000 C CNN +F 3 "" H 3050 4100 60 0000 C CNN + 1 3050 4100 + 1 0 0 -1 +$EndComp +Wire Wire Line + 2800 3050 2800 3100 +Connection ~ 2800 3100 +Connection ~ 2700 3500 +Connection ~ 3050 3900 +Wire Wire Line + 7850 3150 8100 3150 +Wire Wire Line + 7850 3950 8100 3950 +$Comp +L plot_v1 U4 +U 1 1 56D59437 +P 7900 3300 +F 0 "U4" H 7900 3800 60 0000 C CNN +F 1 "plot_v1" H 8100 3650 60 0000 C CNN +F 2 "" H 7900 3300 60 0000 C CNN +F 3 "" H 7900 3300 60 0000 C CNN + 1 7900 3300 + 1 0 0 -1 +$EndComp +$Comp +L plot_v1 U5 +U 1 1 56D59491 +P 7950 4100 +F 0 "U5" H 7950 4600 60 0000 C CNN +F 1 "plot_v1" H 8150 4450 60 0000 C CNN +F 2 "" H 7950 4100 60 0000 C CNN +F 3 "" H 7950 4100 60 0000 C CNN + 1 7950 4100 + 1 0 0 -1 +$EndComp +Wire Wire Line + 7950 3900 7950 3950 +Connection ~ 7950 3950 +Text GLabel 1900 3050 1 60 Input ~ 0 +in1 +Text GLabel 2150 3450 1 60 Input ~ 0 +in2 +Text GLabel 2850 3850 1 60 Input ~ 0 +cin +Text GLabel 8050 3200 3 60 Input ~ 0 +sum +Text GLabel 8050 4050 3 60 Input ~ 0 +cout +Wire Wire Line + 8050 3200 8050 3150 +Connection ~ 8050 3150 +Wire Wire Line + 8050 4050 8050 3950 +Connection ~ 8050 3950 +Wire Wire Line + 2850 3850 2850 3900 +Connection ~ 2850 3900 +Wire Wire Line + 2150 3450 2150 3500 +Connection ~ 2150 3500 +Wire Wire Line + 1900 3050 1900 3100 +Connection ~ 1900 3100 +$Comp +L adc_bridge_3 U6 +U 1 1 56D59BD2 +P 3900 3450 +F 0 "U6" H 3900 3450 60 0000 C CNN +F 1 "adc_bridge_3" H 3900 3600 60 0000 C CNN +F 2 "" H 3900 3450 60 0000 C CNN +F 3 "" H 3900 3450 60 0000 C CNN + 1 3900 3450 + 1 0 0 -1 +$EndComp +$Comp +L dac_bridge_2 U7 +U 1 1 56D5AD2F +P 7150 3450 +F 0 "U7" H 7150 3450 60 0000 C CNN +F 1 "dac_bridge_2" H 7200 3600 60 0000 C CNN +F 2 "" H 7150 3450 60 0000 C CNN +F 3 "" H 7150 3450 60 0000 C CNN + 1 7150 3450 + 1 0 0 -1 +$EndComp +Wire Wire Line + 6500 3100 6700 3100 +Wire Wire Line + 6700 3100 6700 3400 +Wire Wire Line + 6500 3900 6700 3900 +Wire Wire Line + 6700 3900 6700 3500 +Wire Wire Line + 7700 3400 7850 3400 +Wire Wire Line + 7850 3400 7850 3150 +Wire Wire Line + 7900 3100 7900 3150 +Connection ~ 7900 3150 +Wire Wire Line + 7700 3500 7850 3500 +Wire Wire Line + 7850 3500 7850 3950 +Wire Wire Line + 3300 3900 3300 3600 +Wire Wire Line + 3300 3100 3300 3400 +Wire Wire Line + 4450 3500 4950 3500 +Wire Wire Line + 4450 3400 4450 3100 +Wire Wire Line + 4450 3100 4950 3100 +Wire Wire Line + 4450 3600 4450 3900 +Wire Wire Line + 4450 3900 4950 3900 +Wire Wire Line + 1950 3500 3300 3500 +Wire Wire Line + 1950 4400 1950 4450 +$EndSCHEMATC diff --git a/docker-launcher/Examples/FullAdder/FullAdder_Previous_Values.xml b/docker-launcher/Examples/FullAdder/FullAdder_Previous_Values.xml new file mode 100644 index 0000000..3265600 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/FullAdder_Previous_Values.xml @@ -0,0 +1 @@ +dc5dc0dc5adc_bridgedac_bridge/home/fossee/esim-clones/eSim/src/SubcircuitLibrary/full_addertruefalsefalseHzHz0Volts or AmperesVolts or AmperesVolts or AmperesVolts or AmperesVolts or AmperesVolts or Amperes010100SecSecSec \ No newline at end of file diff --git a/docker-launcher/Examples/FullAdder/analysis b/docker-launcher/Examples/FullAdder/analysis new file mode 100644 index 0000000..27cb823 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/analysis @@ -0,0 +1 @@ +.tran 10e-00 100e-00 0e-00 \ No newline at end of file diff --git a/docker-launcher/Examples/FullAdder/full_adder-cache.lib b/docker-launcher/Examples/FullAdder/full_adder-cache.lib new file mode 100644 index 0000000..623a7f4 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/full_adder-cache.lib @@ -0,0 +1,61 @@ +EESchema-LIBRARY Version 2.3 +#encoding utf-8 +# +# PORT +# +DEF PORT U 0 40 Y Y 8 F N +F0 "U" 50 100 30 H V C CNN +F1 "PORT" 0 0 30 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +A 325 225 285 -1421 -1278 0 1 0 N 100 50 150 0 +A 376 -275 356 1294 1408 0 1 0 N 150 0 100 -50 +S -100 50 100 -50 0 1 0 N +X ~ 1 250 0 100 L 30 30 1 1 B +X ~ 2 250 0 100 L 30 30 2 1 B +X ~ 3 250 0 100 L 30 30 3 1 B +X ~ 4 250 0 100 L 30 30 4 1 B +X ~ 5 250 0 100 L 30 30 5 1 B +X ~ 6 250 0 100 L 30 30 6 1 B +X ~ 7 250 0 100 L 30 30 7 1 B +X ~ 8 250 0 100 L 30 30 8 1 B +ENDDRAW +ENDDEF +# +# d_or +# +DEF d_or U 0 40 Y Y 1 F N +F0 "U" 0 0 60 H V C CNN +F1 "d_or" 0 100 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +A -450 50 224 266 -266 0 1 0 N -250 150 -250 -50 +A -25 -124 325 574 323 0 1 0 N 150 150 250 50 +A 74 125 191 -665 -231 0 1 0 N 150 -50 250 50 +P 2 0 1 0 -250 -50 150 -50 N +P 2 0 1 0 -250 150 150 150 N +X IN1 1 -450 100 215 R 50 50 1 1 I +X IN2 2 -450 0 215 R 50 50 1 1 I +X OUT 3 450 50 200 L 50 50 1 1 O +ENDDRAW +ENDDEF +# +# half_adder +# +DEF half_adder X 0 40 Y Y 1 F N +F0 "X" 900 500 60 H V C CNN +F1 "half_adder" 900 400 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S 500 800 1250 0 0 1 0 N +X IN1 1 300 700 200 R 50 50 1 1 I +X IN2 2 300 100 200 R 50 50 1 1 I +X SUM 3 1450 700 200 L 50 50 1 1 O +X COUT 4 1450 100 200 L 50 50 1 1 O +ENDDRAW +ENDDEF +# +#End Library diff --git a/docker-launcher/Examples/FullAdder/full_adder.cir b/docker-launcher/Examples/FullAdder/full_adder.cir new file mode 100644 index 0000000..6461b5b --- /dev/null +++ b/docker-launcher/Examples/FullAdder/full_adder.cir @@ -0,0 +1,12 @@ +* EESchema Netlist Version 1.1 (Spice format) creation date: Wed Jun 24 12:24:33 2015 + +* To exclude a component from the Spice Netlist add [Spice_Netlist_Enabled] user FIELD set to: N +* To reorder the component spice node sequence add [Spice_Node_Sequence] user FIELD and define sequence: 2,1,0 + +*Sheet Name:/ +X1 8 7 6 2 half_adder +X2 5 6 4 3 half_adder +U1 8 7 5 4 1 PORT +U2 3 2 1 d_or + +.end diff --git a/docker-launcher/Examples/FullAdder/full_adder.cir.out b/docker-launcher/Examples/FullAdder/full_adder.cir.out new file mode 100644 index 0000000..b90ce70 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/full_adder.cir.out @@ -0,0 +1,19 @@ +* eeschema netlist version 1.1 (spice format) creation date: wed jun 24 12:24:33 2015 + +.include half_adder.sub +x1 8 7 6 2 half_adder +x2 5 6 4 3 half_adder +* u1 8 7 5 4 1 port +* u2 3 2 1 d_or +a1 [3 2 ] 1 u2 +* Schematic Name: d_or, NgSpice Name: d_or +.model u2 d_or(fall_delay=1.0e-9 input_load=1.0e-12 rise_delay=1.0e-9 ) +.ac lin 0 0Hz 0Hz + +* Control Statements +.control +run +print allv > plot_data_v.txt +print alli > plot_data_i.txt +.endc +.end diff --git a/docker-launcher/Examples/FullAdder/full_adder.pro b/docker-launcher/Examples/FullAdder/full_adder.pro new file mode 100644 index 0000000..ad45a0b --- /dev/null +++ b/docker-launcher/Examples/FullAdder/full_adder.pro @@ -0,0 +1,44 @@ +update=Wed Jun 24 12:19:16 2015 +version=1 +last_client=eeschema +[general] +version=1 +RootSch= +BoardNm= +[pcbnew] +version=1 +LastNetListRead= +UseCmpFile=1 +PadDrill=0.600000000000 +PadDrillOvalY=0.600000000000 +PadSizeH=1.500000000000 +PadSizeV=1.500000000000 +PcbTextSizeV=1.500000000000 +PcbTextSizeH=1.500000000000 +PcbTextThickness=0.300000000000 +ModuleTextSizeV=1.000000000000 +ModuleTextSizeH=1.000000000000 +ModuleTextSizeThickness=0.150000000000 +SolderMaskClearance=0.000000000000 +SolderMaskMinWidth=0.000000000000 +DrawSegmentWidth=0.200000000000 +BoardOutlineThickness=0.100000000000 +ModuleOutlineThickness=0.150000000000 +[cvpcb] +version=1 +NetIExt=net +[eeschema] +version=1 +LibDir= +[eeschema/libraries] +LibName1=eSim_Analog +LibName2=eSim_Devices +LibName3=eSim_Digital +LibName4=eSim_Hybrid +LibName5=eSim_Miscellaneous +LibName6=eSim_Plot +LibName7=eSim_Power +LibName8=power +LibName9=eSim_Sources +LibName10=eSim_Subckt +LibName11=eSim_User diff --git a/docker-launcher/Examples/FullAdder/full_adder.sch b/docker-launcher/Examples/FullAdder/full_adder.sch new file mode 100644 index 0000000..8bd400f --- /dev/null +++ b/docker-launcher/Examples/FullAdder/full_adder.sch @@ -0,0 +1,180 @@ +EESchema Schematic File Version 2 +LIBS:power +LIBS:device +LIBS:transistors +LIBS:conn +LIBS:linear +LIBS:regul +LIBS:74xx +LIBS:cmos4000 +LIBS:adc-dac +LIBS:memory +LIBS:xilinx +LIBS:special +LIBS:microcontrollers +LIBS:dsp +LIBS:microchip +LIBS:analog_switches +LIBS:motorola +LIBS:texas +LIBS:intel +LIBS:audio +LIBS:interface +LIBS:digital-audio +LIBS:philips +LIBS:display +LIBS:cypress +LIBS:siliconi +LIBS:opto +LIBS:atmel +LIBS:contrib +LIBS:valves +LIBS:eSim_Analog +LIBS:eSim_Devices +LIBS:eSim_Digital +LIBS:eSim_Hybrid +LIBS:eSim_Sources +LIBS:eSim_Subckt +EELAYER 25 0 +EELAYER END +$Descr A4 11693 8268 +encoding utf-8 +Sheet 1 1 +Title "" +Date "" +Rev "" +Comp "" +Comment1 "" +Comment2 "" +Comment3 "" +Comment4 "" +$EndDescr +$Comp +L half_adder X1 +U 1 1 558AA064 +P 3800 3350 +F 0 "X1" H 4700 3850 60 0000 C CNN +F 1 "half_adder" H 4700 3750 60 0000 C CNN +F 2 "" H 3800 3350 60 0000 C CNN +F 3 "" H 3800 3350 60 0000 C CNN + 1 3800 3350 + 1 0 0 -1 +$EndComp +$Comp +L half_adder X2 +U 1 1 558AA0C1 +P 5700 3350 +F 0 "X2" H 6600 3850 60 0000 C CNN +F 1 "half_adder" H 6600 3750 60 0000 C CNN +F 2 "" H 5700 3350 60 0000 C CNN +F 3 "" H 5700 3350 60 0000 C CNN + 1 5700 3350 + 1 0 0 -1 +$EndComp +$Comp +L PORT U1 +U 1 1 558AA277 +P 3450 2650 +F 0 "U1" H 3500 2750 30 0000 C CNN +F 1 "PORT" H 3450 2650 30 0000 C CNN +F 2 "" H 3450 2650 60 0000 C CNN +F 3 "" H 3450 2650 60 0000 C CNN + 1 3450 2650 + 1 0 0 -1 +$EndComp +$Comp +L PORT U1 +U 2 1 558AA29E +P 3450 3250 +F 0 "U1" H 3500 3350 30 0000 C CNN +F 1 "PORT" H 3450 3250 30 0000 C CNN +F 2 "" H 3450 3250 60 0000 C CNN +F 3 "" H 3450 3250 60 0000 C CNN + 2 3450 3250 + 1 0 0 -1 +$EndComp +$Comp +L PORT U1 +U 3 1 558AA2D8 +P 5650 2300 +F 0 "U1" H 5700 2400 30 0000 C CNN +F 1 "PORT" H 5650 2300 30 0000 C CNN +F 2 "" H 5650 2300 60 0000 C CNN +F 3 "" H 5650 2300 60 0000 C CNN + 3 5650 2300 + 1 0 0 -1 +$EndComp +$Comp +L PORT U1 +U 4 1 558AA378 +P 7900 2650 +F 0 "U1" H 7950 2750 30 0000 C CNN +F 1 "PORT" H 7900 2650 30 0000 C CNN +F 2 "" H 7900 2650 60 0000 C CNN +F 3 "" H 7900 2650 60 0000 C CNN + 4 7900 2650 + -1 0 0 1 +$EndComp +$Comp +L PORT U1 +U 5 1 558AA3E0 +P 8700 3400 +F 0 "U1" H 8750 3500 30 0000 C CNN +F 1 "PORT" H 8700 3400 30 0000 C CNN +F 2 "" H 8700 3400 60 0000 C CNN +F 3 "" H 8700 3400 60 0000 C CNN + 5 8700 3400 + -1 0 0 1 +$EndComp +$Comp +L d_or U2 +U 1 1 558AA43B +P 7900 3450 +F 0 "U2" H 7900 3450 60 0000 C CNN +F 1 "d_or" H 7900 3550 60 0000 C CNN +F 2 "" H 7900 3450 60 0000 C CNN +F 3 "" H 7900 3450 60 0000 C CNN + 1 7900 3450 + 1 0 0 -1 +$EndComp +Wire Wire Line + 3700 2650 4100 2650 +Wire Wire Line + 3700 3250 4100 3250 +Wire Wire Line + 5250 2650 5650 2650 +Wire Wire Line + 5650 2650 5650 3250 +Wire Wire Line + 5650 3250 6000 3250 +Wire Wire Line + 5900 2300 5900 2650 +Wire Wire Line + 5900 2650 6000 2650 +Wire Wire Line + 7150 2650 7650 2650 +Wire Wire Line + 7150 3250 7350 3250 +Wire Wire Line + 7350 3250 7350 3350 +Wire Wire Line + 7350 3350 7450 3350 +Wire Wire Line + 5250 3250 5400 3250 +Wire Wire Line + 5400 3250 5400 3450 +Wire Wire Line + 5400 3450 7450 3450 +Wire Wire Line + 8350 3400 8450 3400 +Text Notes 3850 2500 0 60 ~ 0 +IN1 +Text Notes 3850 3150 0 60 ~ 0 +IN2 +Text Notes 6000 2350 0 60 ~ 0 +CIN +Text Notes 7350 2550 0 60 ~ 0 +SUM +Text Notes 8300 3200 0 60 ~ 0 +COUT +$EndSCHEMATC diff --git a/docker-launcher/Examples/FullAdder/full_adder.sub b/docker-launcher/Examples/FullAdder/full_adder.sub new file mode 100644 index 0000000..5f261f7 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/full_adder.sub @@ -0,0 +1,13 @@ +* Subcircuit full_adder +.subckt full_adder 8 7 5 4 1 +* eeschema netlist version 1.1 (spice format) creation date: wed jun 24 12:24:33 2015 +.include half_adder.sub +x1 8 7 6 2 half_adder +x2 5 6 4 3 half_adder +* u2 3 2 1 d_or +a1 [3 2 ] 1 u2 +* Schematic Name: d_or, NgSpice Name: d_or +.model u2 d_or(fall_delay=1.0e-9 input_load=1.0e-12 rise_delay=1.0e-9 ) +* Control Statements + +.ends full_adder \ No newline at end of file diff --git a/docker-launcher/Examples/FullAdder/full_adder_Previous_Values.xml b/docker-launcher/Examples/FullAdder/full_adder_Previous_Values.xml new file mode 100644 index 0000000..b63184d --- /dev/null +++ b/docker-launcher/Examples/FullAdder/full_adder_Previous_Values.xml @@ -0,0 +1 @@ +truefalsefalseHzHzFalseVolts or AmperesVolts or AmperesVolts or AmperesSecSecSecd_or \ No newline at end of file diff --git a/docker-launcher/Examples/FullAdder/half_adder-cache.lib b/docker-launcher/Examples/FullAdder/half_adder-cache.lib new file mode 100644 index 0000000..6878522 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/half_adder-cache.lib @@ -0,0 +1,63 @@ +EESchema-LIBRARY Version 2.3 +#encoding utf-8 +# +# PORT +# +DEF PORT U 0 40 Y Y 8 F N +F0 "U" 50 100 30 H V C CNN +F1 "PORT" 0 0 30 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +A 325 225 285 -1421 -1278 0 1 0 N 100 50 150 0 +A 376 -275 356 1294 1408 0 1 0 N 150 0 100 -50 +S -100 50 100 -50 0 1 0 N +X ~ 1 250 0 100 L 30 30 1 1 B +X ~ 2 250 0 100 L 30 30 2 1 B +X ~ 3 250 0 100 L 30 30 3 1 B +X ~ 4 250 0 100 L 30 30 4 1 B +X ~ 5 250 0 100 L 30 30 5 1 B +X ~ 6 250 0 100 L 30 30 6 1 B +X ~ 7 250 0 100 L 30 30 7 1 B +X ~ 8 250 0 100 L 30 30 8 1 B +ENDDRAW +ENDDEF +# +# d_and +# +DEF d_and U 0 40 Y Y 1 F N +F0 "U" 0 0 60 H V C CNN +F1 "d_and" 50 100 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +A 149 50 100 -894 0 0 1 0 N 150 -50 250 50 +A 150 49 100 6 900 0 1 0 N 250 50 150 150 +P 4 0 1 0 150 -50 -250 -50 -250 150 150 150 N +X IN1 1 -450 100 200 R 50 50 1 1 I +X IN2 2 -450 0 200 R 50 50 1 1 I +X OUT 3 450 50 200 L 50 50 1 1 O +ENDDRAW +ENDDEF +# +# d_xor +# +DEF d_xor U 0 40 Y Y 1 F N +F0 "U" 0 0 60 H V C CNN +F1 "d_xor" 50 100 47 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +A -450 50 224 266 -266 0 1 0 N -250 150 -250 -50 +A -350 50 180 -337 337 0 1 0 N -200 -50 -200 150 +A -25 -124 325 574 323 0 1 0 N 150 150 250 50 +A 74 125 191 -665 -231 0 1 0 N 150 -50 250 50 +P 2 0 1 0 150 -50 -200 -50 N +P 2 0 1 0 150 150 -200 150 N +X IN1 1 -450 100 215 R 50 43 1 1 I +X IN2 2 -450 0 215 R 50 43 1 1 I +X OUT 3 450 50 200 L 50 39 1 1 O +ENDDRAW +ENDDEF +# +#End Library diff --git a/docker-launcher/Examples/FullAdder/half_adder.cir b/docker-launcher/Examples/FullAdder/half_adder.cir new file mode 100644 index 0000000..8b2e7e0 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/half_adder.cir @@ -0,0 +1,11 @@ +* EESchema Netlist Version 1.1 (Spice format) creation date: Wed Jun 24 11:31:48 2015 + +* To exclude a component from the Spice Netlist add [Spice_Netlist_Enabled] user FIELD set to: N +* To reorder the component spice node sequence add [Spice_Node_Sequence] user FIELD and define sequence: 2,1,0 + +*Sheet Name:/ +U2 1 4 3 d_xor +U3 1 4 2 d_and +U1 1 4 3 2 PORT + +.end diff --git a/docker-launcher/Examples/FullAdder/half_adder.cir.out b/docker-launcher/Examples/FullAdder/half_adder.cir.out new file mode 100644 index 0000000..b1b6b1e --- /dev/null +++ b/docker-launcher/Examples/FullAdder/half_adder.cir.out @@ -0,0 +1,20 @@ +* eeschema netlist version 1.1 (spice format) creation date: wed jun 24 11:31:48 2015 + +* u2 1 4 3 d_xor +* u3 1 4 2 d_and +* u1 1 4 3 2 port +a1 [1 4 ] 3 u2 +a2 [1 4 ] 2 u3 +* Schematic Name: d_xor, NgSpice Name: d_xor +.model u2 d_xor(fall_delay=1.0e-9 input_load=1.0e-12 rise_delay=1.0e-9 ) +* Schematic Name: d_and, NgSpice Name: d_and +.model u3 d_and(fall_delay=1.0e-9 input_load=1.0e-12 rise_delay=1.0e-9 ) +.ac lin 0 0Hz 0Hz + +* Control Statements +.control +run +print allv > plot_data_v.txt +print alli > plot_data_i.txt +.endc +.end diff --git a/docker-launcher/Examples/FullAdder/half_adder.pro b/docker-launcher/Examples/FullAdder/half_adder.pro new file mode 100644 index 0000000..582cec8 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/half_adder.pro @@ -0,0 +1,69 @@ +update=Wed Mar 18 20:13:43 2020 +version=1 +last_client=eeschema +[general] +version=1 +RootSch= +BoardNm= +[pcbnew] +version=1 +LastNetListRead= +UseCmpFile=1 +PadDrill=0.600000000000 +PadDrillOvalY=0.600000000000 +PadSizeH=1.500000000000 +PadSizeV=1.500000000000 +PcbTextSizeV=1.500000000000 +PcbTextSizeH=1.500000000000 +PcbTextThickness=0.300000000000 +ModuleTextSizeV=1.000000000000 +ModuleTextSizeH=1.000000000000 +ModuleTextSizeThickness=0.150000000000 +SolderMaskClearance=0.000000000000 +SolderMaskMinWidth=0.000000000000 +DrawSegmentWidth=0.200000000000 +BoardOutlineThickness=0.100000000000 +ModuleOutlineThickness=0.150000000000 +[cvpcb] +version=1 +NetIExt=net +[eeschema] +version=1 +LibDir= +[eeschema/libraries] +LibName1=power +LibName2=transistors +LibName3=conn +LibName4=74xx +LibName5=cmos4000 +LibName6=adc-dac +LibName7=memory +LibName8=xilinx +LibName9=microcontrollers +LibName10=dsp +LibName11=microchip +LibName12=analog_switches +LibName13=motorola +LibName14=texas +LibName15=intel +LibName16=audio +LibName17=interface +LibName18=digital-audio +LibName19=philips +LibName20=display +LibName21=cypress +LibName22=siliconi +LibName23=opto +LibName24=atmel +LibName25=contrib +LibName26=valves +LibName27=eSim_Analog +LibName28=eSim_Devices +LibName29=eSim_Digital +LibName30=eSim_Hybrid +LibName31=eSim_Miscellaneous +LibName32=eSim_Plot +LibName33=eSim_Power +LibName34=eSim_Sources +LibName35=eSim_Subckt +LibName36=eSim_User diff --git a/docker-launcher/Examples/FullAdder/half_adder.sch b/docker-launcher/Examples/FullAdder/half_adder.sch new file mode 100644 index 0000000..bf9bcbf --- /dev/null +++ b/docker-launcher/Examples/FullAdder/half_adder.sch @@ -0,0 +1,152 @@ +EESchema Schematic File Version 2 +LIBS:power +LIBS:device +LIBS:transistors +LIBS:conn +LIBS:linear +LIBS:regul +LIBS:74xx +LIBS:cmos4000 +LIBS:adc-dac +LIBS:memory +LIBS:xilinx +LIBS:special +LIBS:microcontrollers +LIBS:dsp +LIBS:microchip +LIBS:analog_switches +LIBS:motorola +LIBS:texas +LIBS:intel +LIBS:audio +LIBS:interface +LIBS:digital-audio +LIBS:philips +LIBS:display +LIBS:cypress +LIBS:siliconi +LIBS:opto +LIBS:atmel +LIBS:contrib +LIBS:valves +LIBS:eSim_Analog +LIBS:eSim_Devices +LIBS:eSim_Digital +LIBS:eSim_Hybrid +LIBS:eSim_Sources +LIBS:eSim_Subckt +EELAYER 25 0 +EELAYER END +$Descr A4 11693 8268 +encoding utf-8 +Sheet 1 1 +Title "" +Date "" +Rev "" +Comp "" +Comment1 "" +Comment2 "" +Comment3 "" +Comment4 "" +$EndDescr +$Comp +L d_xor U2 +U 1 1 558A946A +P 5650 3050 +F 0 "U2" H 5650 3050 60 0000 C CNN +F 1 "d_xor" H 5700 3150 47 0000 C CNN +F 2 "" H 5650 3050 60 0000 C CNN +F 3 "" H 5650 3050 60 0000 C CNN + 1 5650 3050 + 1 0 0 -1 +$EndComp +$Comp +L d_and U3 +U 1 1 558A94D5 +P 5700 3800 +F 0 "U3" H 5700 3800 60 0000 C CNN +F 1 "d_and" H 5750 3900 60 0000 C CNN +F 2 "" H 5700 3800 60 0000 C CNN +F 3 "" H 5700 3800 60 0000 C CNN + 1 5700 3800 + 1 0 0 -1 +$EndComp +$Comp +L PORT U1 +U 1 1 558A94F6 +P 4150 3000 +F 0 "U1" H 4200 3100 30 0000 C CNN +F 1 "PORT" H 4150 3000 30 0000 C CNN +F 2 "" H 4150 3000 60 0000 C CNN +F 3 "" H 4150 3000 60 0000 C CNN + 1 4150 3000 + 1 0 0 -1 +$EndComp +$Comp +L PORT U1 +U 2 1 558A9543 +P 4150 3450 +F 0 "U1" H 4200 3550 30 0000 C CNN +F 1 "PORT" H 4150 3450 30 0000 C CNN +F 2 "" H 4150 3450 60 0000 C CNN +F 3 "" H 4150 3450 60 0000 C CNN + 2 4150 3450 + 1 0 0 -1 +$EndComp +$Comp +L PORT U1 +U 3 1 558A9573 +P 6650 3000 +F 0 "U1" H 6700 3100 30 0000 C CNN +F 1 "PORT" H 6650 3000 30 0000 C CNN +F 2 "" H 6650 3000 60 0000 C CNN +F 3 "" H 6650 3000 60 0000 C CNN + 3 6650 3000 + -1 0 0 1 +$EndComp +$Comp +L PORT U1 +U 4 1 558A9606 +P 6700 3750 +F 0 "U1" H 6750 3850 30 0000 C CNN +F 1 "PORT" H 6700 3750 30 0000 C CNN +F 2 "" H 6700 3750 60 0000 C CNN +F 3 "" H 6700 3750 60 0000 C CNN + 4 6700 3750 + -1 0 0 1 +$EndComp +Wire Wire Line + 5200 2950 4450 2950 +Wire Wire Line + 4450 2950 4450 3000 +Wire Wire Line + 4450 3000 4400 3000 +Wire Wire Line + 4400 3450 4550 3450 +Wire Wire Line + 4550 3450 4550 3050 +Wire Wire Line + 4550 3050 5200 3050 +Wire Wire Line + 5250 3700 5000 3700 +Wire Wire Line + 5000 3700 5000 2950 +Connection ~ 5000 2950 +Wire Wire Line + 5250 3800 4850 3800 +Wire Wire Line + 4850 3800 4850 3050 +Connection ~ 4850 3050 +Wire Wire Line + 6100 3000 6400 3000 +Wire Wire Line + 6150 3750 6450 3750 +Text Notes 4550 2950 0 60 ~ 0 +IN1\n\n +Text Notes 4600 3150 0 60 ~ 0 +IN2 +Text Notes 6200 2950 0 60 ~ 0 +SUM\n +Text Notes 6200 3650 0 60 ~ 0 +COUT\n +$EndSCHEMATC diff --git a/docker-launcher/Examples/FullAdder/half_adder.sub b/docker-launcher/Examples/FullAdder/half_adder.sub new file mode 100644 index 0000000..e9f9222 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/half_adder.sub @@ -0,0 +1,14 @@ +* Subcircuit half_adder +.subckt half_adder 1 4 3 2 +* eeschema netlist version 1.1 (spice format) creation date: wed jun 24 11:31:48 2015 +* u2 1 4 3 d_xor +* u3 1 4 2 d_and +a1 [1 4 ] 3 u2 +a2 [1 4 ] 2 u3 +* Schematic Name: d_xor, NgSpice Name: d_xor +.model u2 d_xor(fall_delay=1.0e-9 input_load=1.0e-12 rise_delay=1.0e-9 ) +* Schematic Name: d_and, NgSpice Name: d_and +.model u3 d_and(fall_delay=1.0e-9 input_load=1.0e-12 rise_delay=1.0e-9 ) +* Control Statements + +.ends half_adder \ No newline at end of file diff --git a/docker-launcher/Examples/FullAdder/half_adder_Previous_Values.xml b/docker-launcher/Examples/FullAdder/half_adder_Previous_Values.xml new file mode 100644 index 0000000..b915f0d --- /dev/null +++ b/docker-launcher/Examples/FullAdder/half_adder_Previous_Values.xml @@ -0,0 +1 @@ +truefalsefalseHzHzFalseVolts or AmperesVolts or AmperesVolts or AmperesSecSecSecd_xord_and \ No newline at end of file diff --git a/docker-launcher/Examples/FullAdder/plot_data_i.txt b/docker-launcher/Examples/FullAdder/plot_data_i.txt new file mode 100644 index 0000000..e3019d6 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/plot_data_i.txt @@ -0,0 +1,135 @@ + * /home/fossee/esim-workspace/fulladder/fulladder.cir + Transient Analysis Wed Apr 8 07:15:54 2026 +-------------------------------------------------------------------------------- +Index time a2#branch_1_0 a2#branch_1_1 v1#branch +-------------------------------------------------------------------------------- +0 0.000000e+00 0.000000e+00 -5.00000e-03 0.000000e+00 +1 1.000000e-02 0.000000e+00 -5.00000e-03 0.000000e+00 +2 2.000000e-02 0.000000e+00 -5.00000e-03 0.000000e+00 +3 4.000000e-02 0.000000e+00 -5.00000e-03 0.000000e+00 +4 8.000000e-02 0.000000e+00 -5.00000e-03 0.000000e+00 +5 1.600000e-01 0.000000e+00 -5.00000e-03 0.000000e+00 +6 3.200000e-01 0.000000e+00 -5.00000e-03 0.000000e+00 +7 6.400000e-01 0.000000e+00 -5.00000e-03 0.000000e+00 +8 1.280000e+00 0.000000e+00 -5.00000e-03 0.000000e+00 +9 2.560000e+00 0.000000e+00 -5.00000e-03 0.000000e+00 +10 4.560000e+00 0.000000e+00 -5.00000e-03 0.000000e+00 +11 6.560000e+00 0.000000e+00 -5.00000e-03 0.000000e+00 +12 8.560000e+00 0.000000e+00 -5.00000e-03 0.000000e+00 +13 1.056000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +14 1.256000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +15 1.456000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +16 1.656000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +17 1.856000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +18 2.056000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +19 2.256000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +20 2.456000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +21 2.656000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +22 2.856000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +23 3.056000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +24 3.256000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +25 3.456000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +26 3.656000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +27 3.856000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +28 4.056000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +29 4.256000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +30 4.456000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +31 4.656000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +32 4.856000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +33 5.056000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +34 5.256000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +35 5.456000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +36 5.656000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +37 5.856000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +38 6.056000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +39 6.256000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +40 6.456000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +41 6.656000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +42 6.856000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +43 7.056000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +44 7.256000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +45 7.456000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +46 7.656000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +47 7.856000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +48 8.056000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +49 8.256000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +50 8.456000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +51 8.656000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +52 8.856000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +53 9.056000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +54 9.256000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 + +Index time a2#branch_1_0 a2#branch_1_1 v1#branch +-------------------------------------------------------------------------------- +55 9.456000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +56 9.656000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +57 9.856000e+01 0.000000e+00 -5.00000e-03 0.000000e+00 +58 1.000000e+02 0.000000e+00 -5.00000e-03 0.000000e+00 + + * /home/fossee/esim-workspace/fulladder/fulladder.cir + Transient Analysis Wed Apr 8 07:15:54 2026 +-------------------------------------------------------------------------------- +Index time v2#branch v3#branch +-------------------------------------------------------------------------------- +0 0.000000e+00 0.000000e+00 0.000000e+00 +1 1.000000e-02 0.000000e+00 0.000000e+00 +2 2.000000e-02 0.000000e+00 0.000000e+00 +3 4.000000e-02 0.000000e+00 0.000000e+00 +4 8.000000e-02 0.000000e+00 0.000000e+00 +5 1.600000e-01 0.000000e+00 0.000000e+00 +6 3.200000e-01 0.000000e+00 0.000000e+00 +7 6.400000e-01 0.000000e+00 0.000000e+00 +8 1.280000e+00 0.000000e+00 0.000000e+00 +9 2.560000e+00 0.000000e+00 0.000000e+00 +10 4.560000e+00 0.000000e+00 0.000000e+00 +11 6.560000e+00 0.000000e+00 0.000000e+00 +12 8.560000e+00 0.000000e+00 0.000000e+00 +13 1.056000e+01 0.000000e+00 0.000000e+00 +14 1.256000e+01 0.000000e+00 0.000000e+00 +15 1.456000e+01 0.000000e+00 0.000000e+00 +16 1.656000e+01 0.000000e+00 0.000000e+00 +17 1.856000e+01 0.000000e+00 0.000000e+00 +18 2.056000e+01 0.000000e+00 0.000000e+00 +19 2.256000e+01 0.000000e+00 0.000000e+00 +20 2.456000e+01 0.000000e+00 0.000000e+00 +21 2.656000e+01 0.000000e+00 0.000000e+00 +22 2.856000e+01 0.000000e+00 0.000000e+00 +23 3.056000e+01 0.000000e+00 0.000000e+00 +24 3.256000e+01 0.000000e+00 0.000000e+00 +25 3.456000e+01 0.000000e+00 0.000000e+00 +26 3.656000e+01 0.000000e+00 0.000000e+00 +27 3.856000e+01 0.000000e+00 0.000000e+00 +28 4.056000e+01 0.000000e+00 0.000000e+00 +29 4.256000e+01 0.000000e+00 0.000000e+00 +30 4.456000e+01 0.000000e+00 0.000000e+00 +31 4.656000e+01 0.000000e+00 0.000000e+00 +32 4.856000e+01 0.000000e+00 0.000000e+00 +33 5.056000e+01 0.000000e+00 0.000000e+00 +34 5.256000e+01 0.000000e+00 0.000000e+00 +35 5.456000e+01 0.000000e+00 0.000000e+00 +36 5.656000e+01 0.000000e+00 0.000000e+00 +37 5.856000e+01 0.000000e+00 0.000000e+00 +38 6.056000e+01 0.000000e+00 0.000000e+00 +39 6.256000e+01 0.000000e+00 0.000000e+00 +40 6.456000e+01 0.000000e+00 0.000000e+00 +41 6.656000e+01 0.000000e+00 0.000000e+00 +42 6.856000e+01 0.000000e+00 0.000000e+00 +43 7.056000e+01 0.000000e+00 0.000000e+00 +44 7.256000e+01 0.000000e+00 0.000000e+00 +45 7.456000e+01 0.000000e+00 0.000000e+00 +46 7.656000e+01 0.000000e+00 0.000000e+00 +47 7.856000e+01 0.000000e+00 0.000000e+00 +48 8.056000e+01 0.000000e+00 0.000000e+00 +49 8.256000e+01 0.000000e+00 0.000000e+00 +50 8.456000e+01 0.000000e+00 0.000000e+00 +51 8.656000e+01 0.000000e+00 0.000000e+00 +52 8.856000e+01 0.000000e+00 0.000000e+00 +53 9.056000e+01 0.000000e+00 0.000000e+00 +54 9.256000e+01 0.000000e+00 0.000000e+00 + +Index time v2#branch v3#branch +-------------------------------------------------------------------------------- +55 9.456000e+01 0.000000e+00 0.000000e+00 +56 9.656000e+01 0.000000e+00 0.000000e+00 +57 9.856000e+01 0.000000e+00 0.000000e+00 +58 1.000000e+02 0.000000e+00 0.000000e+00 diff --git a/docker-launcher/Examples/FullAdder/plot_data_v.txt b/docker-launcher/Examples/FullAdder/plot_data_v.txt new file mode 100644 index 0000000..76fcd41 --- /dev/null +++ b/docker-launcher/Examples/FullAdder/plot_data_v.txt @@ -0,0 +1,135 @@ + * /home/fossee/esim-workspace/fulladder/fulladder.cir + Transient Analysis Wed Apr 8 07:15:54 2026 +-------------------------------------------------------------------------------- +Index time cin cout in1 +-------------------------------------------------------------------------------- +0 0.000000e+00 5.000000e+00 5.000000e+00 5.000000e+00 +1 1.000000e-02 5.000000e+00 5.000000e+00 5.000000e+00 +2 2.000000e-02 5.000000e+00 5.000000e+00 5.000000e+00 +3 4.000000e-02 5.000000e+00 5.000000e+00 5.000000e+00 +4 8.000000e-02 5.000000e+00 5.000000e+00 5.000000e+00 +5 1.600000e-01 5.000000e+00 5.000000e+00 5.000000e+00 +6 3.200000e-01 5.000000e+00 5.000000e+00 5.000000e+00 +7 6.400000e-01 5.000000e+00 5.000000e+00 5.000000e+00 +8 1.280000e+00 5.000000e+00 5.000000e+00 5.000000e+00 +9 2.560000e+00 5.000000e+00 5.000000e+00 5.000000e+00 +10 4.560000e+00 5.000000e+00 5.000000e+00 5.000000e+00 +11 6.560000e+00 5.000000e+00 5.000000e+00 5.000000e+00 +12 8.560000e+00 5.000000e+00 5.000000e+00 5.000000e+00 +13 1.056000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +14 1.256000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +15 1.456000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +16 1.656000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +17 1.856000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +18 2.056000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +19 2.256000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +20 2.456000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +21 2.656000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +22 2.856000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +23 3.056000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +24 3.256000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +25 3.456000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +26 3.656000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +27 3.856000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +28 4.056000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +29 4.256000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +30 4.456000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +31 4.656000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +32 4.856000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +33 5.056000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +34 5.256000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +35 5.456000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +36 5.656000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +37 5.856000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +38 6.056000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +39 6.256000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +40 6.456000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +41 6.656000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +42 6.856000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +43 7.056000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +44 7.256000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +45 7.456000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +46 7.656000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +47 7.856000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +48 8.056000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +49 8.256000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +50 8.456000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +51 8.656000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +52 8.856000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +53 9.056000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +54 9.256000e+01 5.000000e+00 5.000000e+00 5.000000e+00 + +Index time cin cout in1 +-------------------------------------------------------------------------------- +55 9.456000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +56 9.656000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +57 9.856000e+01 5.000000e+00 5.000000e+00 5.000000e+00 +58 1.000000e+02 5.000000e+00 5.000000e+00 5.000000e+00 + + * /home/fossee/esim-workspace/fulladder/fulladder.cir + Transient Analysis Wed Apr 8 07:15:54 2026 +-------------------------------------------------------------------------------- +Index time in2 sum +-------------------------------------------------------------------------------- +0 0.000000e+00 0.000000e+00 0.000000e+00 +1 1.000000e-02 0.000000e+00 0.000000e+00 +2 2.000000e-02 0.000000e+00 0.000000e+00 +3 4.000000e-02 0.000000e+00 0.000000e+00 +4 8.000000e-02 0.000000e+00 0.000000e+00 +5 1.600000e-01 0.000000e+00 0.000000e+00 +6 3.200000e-01 0.000000e+00 0.000000e+00 +7 6.400000e-01 0.000000e+00 0.000000e+00 +8 1.280000e+00 0.000000e+00 0.000000e+00 +9 2.560000e+00 0.000000e+00 0.000000e+00 +10 4.560000e+00 0.000000e+00 0.000000e+00 +11 6.560000e+00 0.000000e+00 0.000000e+00 +12 8.560000e+00 0.000000e+00 0.000000e+00 +13 1.056000e+01 0.000000e+00 0.000000e+00 +14 1.256000e+01 0.000000e+00 0.000000e+00 +15 1.456000e+01 0.000000e+00 0.000000e+00 +16 1.656000e+01 0.000000e+00 0.000000e+00 +17 1.856000e+01 0.000000e+00 0.000000e+00 +18 2.056000e+01 0.000000e+00 0.000000e+00 +19 2.256000e+01 0.000000e+00 0.000000e+00 +20 2.456000e+01 0.000000e+00 0.000000e+00 +21 2.656000e+01 0.000000e+00 0.000000e+00 +22 2.856000e+01 0.000000e+00 0.000000e+00 +23 3.056000e+01 0.000000e+00 0.000000e+00 +24 3.256000e+01 0.000000e+00 0.000000e+00 +25 3.456000e+01 0.000000e+00 0.000000e+00 +26 3.656000e+01 0.000000e+00 0.000000e+00 +27 3.856000e+01 0.000000e+00 0.000000e+00 +28 4.056000e+01 0.000000e+00 0.000000e+00 +29 4.256000e+01 0.000000e+00 0.000000e+00 +30 4.456000e+01 0.000000e+00 0.000000e+00 +31 4.656000e+01 0.000000e+00 0.000000e+00 +32 4.856000e+01 0.000000e+00 0.000000e+00 +33 5.056000e+01 0.000000e+00 0.000000e+00 +34 5.256000e+01 0.000000e+00 0.000000e+00 +35 5.456000e+01 0.000000e+00 0.000000e+00 +36 5.656000e+01 0.000000e+00 0.000000e+00 +37 5.856000e+01 0.000000e+00 0.000000e+00 +38 6.056000e+01 0.000000e+00 0.000000e+00 +39 6.256000e+01 0.000000e+00 0.000000e+00 +40 6.456000e+01 0.000000e+00 0.000000e+00 +41 6.656000e+01 0.000000e+00 0.000000e+00 +42 6.856000e+01 0.000000e+00 0.000000e+00 +43 7.056000e+01 0.000000e+00 0.000000e+00 +44 7.256000e+01 0.000000e+00 0.000000e+00 +45 7.456000e+01 0.000000e+00 0.000000e+00 +46 7.656000e+01 0.000000e+00 0.000000e+00 +47 7.856000e+01 0.000000e+00 0.000000e+00 +48 8.056000e+01 0.000000e+00 0.000000e+00 +49 8.256000e+01 0.000000e+00 0.000000e+00 +50 8.456000e+01 0.000000e+00 0.000000e+00 +51 8.656000e+01 0.000000e+00 0.000000e+00 +52 8.856000e+01 0.000000e+00 0.000000e+00 +53 9.056000e+01 0.000000e+00 0.000000e+00 +54 9.256000e+01 0.000000e+00 0.000000e+00 + +Index time in2 sum +-------------------------------------------------------------------------------- +55 9.456000e+01 0.000000e+00 0.000000e+00 +56 9.656000e+01 0.000000e+00 0.000000e+00 +57 9.856000e+01 0.000000e+00 0.000000e+00 +58 1.000000e+02 0.000000e+00 0.000000e+00 diff --git a/docker-launcher/Examples/Half_Adder/Half_Adder-cache.lib b/docker-launcher/Examples/Half_Adder/Half_Adder-cache.lib new file mode 100644 index 0000000..19869ff --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/Half_Adder-cache.lib @@ -0,0 +1,126 @@ +EESchema-LIBRARY Version 2.3 +#encoding utf-8 +# +# DC-RESCUE-Half_Adder +# +DEF DC-RESCUE-Half_Adder v 0 40 Y Y 1 F N +F0 "v" -200 100 60 H V C CNN +F1 "DC-RESCUE-Half_Adder" -200 -50 60 H V C CNN +F2 "R1" -300 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +$FPLIST + 1_pin +$ENDFPLIST +DRAW +C 0 0 150 0 1 0 N +X + 1 0 450 300 D 50 50 1 1 P +X - 2 0 -450 300 U 50 50 1 1 P +ENDDRAW +ENDDEF +# +# GND-RESCUE-Half_Adder +# +DEF ~GND-RESCUE-Half_Adder #PWR 0 0 Y Y 1 F P +F0 "#PWR" 0 0 30 H I C CNN +F1 "GND-RESCUE-Half_Adder" 0 -70 30 H I C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N +X GND 1 0 0 0 U 30 30 1 1 W N +ENDDRAW +ENDDEF +# +# PWR_FLAG +# +DEF PWR_FLAG #FLG 0 0 N N 1 F P +F0 "#FLG" 0 75 50 H I C CNN +F1 "PWR_FLAG" 0 150 50 H V C CNN +F2 "" 0 0 50 H I C CNN +F3 "" 0 0 50 H I C CNN +DRAW +X pwr 1 0 0 0 U 50 50 0 0 w +P 6 0 1 0 0 0 0 50 -40 75 0 100 40 75 0 50 N +ENDDRAW +ENDDEF +# +# R-RESCUE-Half_Adder +# +DEF R-RESCUE-Half_Adder R 0 0 N Y 1 F N +F0 "R" 50 130 50 H V C CNN +F1 "R-RESCUE-Half_Adder" 50 50 50 H V C CNN +F2 "" 50 -20 30 H V C CNN +F3 "" 50 50 30 V V C CNN +$FPLIST + R_* + Resistor_* +$ENDFPLIST +DRAW +S 150 10 -50 90 0 1 10 N +X ~ 1 -100 50 50 R 60 60 1 1 P +X ~ 2 200 50 50 L 60 60 1 1 P +ENDDRAW +ENDDEF +# +# adc_bridge_2 +# +DEF adc_bridge_2 U 0 40 Y Y 1 F N +F0 "U" 0 0 60 H V C CNN +F1 "adc_bridge_2" 0 150 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S -400 200 350 -100 0 1 0 N +X IN1 1 -600 50 200 R 50 50 1 1 I +X IN2 2 -600 -50 200 R 50 50 1 1 I +X OUT1 3 550 50 200 L 50 50 1 1 O +X OUT2 4 550 -50 200 L 50 50 1 1 O +ENDDRAW +ENDDEF +# +# dac_bridge_2 +# +DEF dac_bridge_2 U 0 40 Y Y 1 F N +F0 "U" 0 0 60 H V C CNN +F1 "dac_bridge_2" 50 150 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S -250 200 350 -100 0 1 0 N +X IN1 1 -450 50 200 R 50 50 1 1 I +X IN2 2 -450 -50 200 R 50 50 1 1 I +X OUT1 3 550 50 200 L 50 50 1 1 O +X OUT4 4 550 -50 200 L 50 50 1 1 O +ENDDRAW +ENDDEF +# +# half_adder +# +DEF half_adder X 0 40 Y Y 1 F N +F0 "X" 900 500 60 H V C CNN +F1 "half_adder" 900 400 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +S 500 800 1250 0 0 1 0 N +X IN1 1 300 700 200 R 50 50 1 1 I +X IN2 2 300 100 200 R 50 50 1 1 I +X SUM 3 1450 700 200 L 50 50 1 1 O +X COUT 4 1450 100 200 L 50 50 1 1 O +ENDDRAW +ENDDEF +# +# plot_v1 +# +DEF plot_v1 U 0 40 Y Y 1 F N +F0 "U" 0 500 60 H V C CNN +F1 "plot_v1" 200 350 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +DRAW +C 0 500 100 0 1 0 N +X ~ ~ 0 200 200 U 50 50 1 1 I +ENDDRAW +ENDDEF +# +#End Library diff --git a/docker-launcher/Examples/Half_Adder/Half_Adder-rescue.lib b/docker-launcher/Examples/Half_Adder/Half_Adder-rescue.lib new file mode 100644 index 0000000..ac06182 --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/Half_Adder-rescue.lib @@ -0,0 +1,21 @@ +EESchema-LIBRARY Version 2.3 +#encoding utf-8 +# +# DC-RESCUE-Half_Adder +# +DEF DC-RESCUE-Half_Adder v 0 40 Y Y 1 F N +F0 "v" -200 100 60 H V C CNN +F1 "DC-RESCUE-Half_Adder" -200 -50 60 H V C CNN +F2 "R1" -300 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN +$FPLIST + 1_pin +$ENDFPLIST +DRAW +C 0 0 150 0 1 0 N +X + 1 0 450 300 D 50 50 1 1 P +X - 2 0 -450 300 U 50 50 1 1 P +ENDDRAW +ENDDEF +# +#End Library diff --git a/docker-launcher/Examples/Half_Adder/Half_Adder.cir b/docker-launcher/Examples/Half_Adder/Half_Adder.cir new file mode 100644 index 0000000..4658c5c --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/Half_Adder.cir @@ -0,0 +1,21 @@ +* /home/fossee/UpdatedExamples/Half_Adder/Half_Adder.cir + +* EESchema Netlist Version 1.1 (Spice format) creation date: Thu Mar 3 21:35:33 2016 + +* To exclude a component from the Spice Netlist add [Spice_Netlist_Enabled] user FIELD set to: N +* To reorder the component spice node sequence add [Spice_Node_Sequence] user FIELD and define sequence: 2,1,0 + +* Sheet Name: / +X1 Net-_U1-Pad3_ Net-_U1-Pad4_ Net-_U2-Pad1_ Net-_U2-Pad2_ half_adder +U1 IN1 IN2 Net-_U1-Pad3_ Net-_U1-Pad4_ adc_bridge_2 +U2 Net-_U2-Pad1_ Net-_U2-Pad2_ sum cout dac_bridge_2 +v1 IN1 GND DC +v2 IN2 GND DC +R1 sum GND 1k +R2 cout GND 1k +U3 IN1 plot_v1 +U4 IN2 plot_v1 +U5 sum plot_v1 +U6 cout plot_v1 + +.end diff --git a/docker-launcher/Examples/Half_Adder/Half_Adder.cir.out b/docker-launcher/Examples/Half_Adder/Half_Adder.cir.out new file mode 100644 index 0000000..96066ff --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/Half_Adder.cir.out @@ -0,0 +1,33 @@ +* /home/fossee/updatedexamples/half_adder/half_adder.cir + +.include half_adder.sub +x1 net-_u1-pad3_ net-_u1-pad4_ net-_u2-pad1_ net-_u2-pad2_ half_adder +* u1 in1 in2 net-_u1-pad3_ net-_u1-pad4_ adc_bridge_2 +* u2 net-_u2-pad1_ net-_u2-pad2_ sum cout dac_bridge_2 +v1 in1 gnd dc 5 +v2 in2 gnd dc 0 +r1 sum gnd 1k +r2 cout gnd 1k +* u3 in1 plot_v1 +* u4 in2 plot_v1 +* u5 sum plot_v1 +* u6 cout plot_v1 +a1 [in1 in2 ] [net-_u1-pad3_ net-_u1-pad4_ ] u1 +a2 [net-_u2-pad1_ net-_u2-pad2_ ] [sum cout ] u2 +* Schematic Name: adc_bridge_2, NgSpice Name: adc_bridge +.model u1 adc_bridge(fall_delay=1.0e-9 in_high=2.0 rise_delay=1.0e-9 in_low=1.0 ) +* Schematic Name: dac_bridge_2, NgSpice Name: dac_bridge +.model u2 dac_bridge(out_undef=0.5 out_low=0.0 out_high=5.0 t_rise=1.0e-9 t_fall=1.0e-9 input_load=1.0e-12 ) +.tran 10e-03 100e-03 0e-03 + +* Control Statements +.control +run +print allv > plot_data_v.txt +print alli > plot_data_i.txt +plot v(in1) +plot v(in2) +plot v(sum) +plot v(cout) +.endc +.end diff --git a/docker-launcher/Examples/Half_Adder/Half_Adder.kicad_pro b/docker-launcher/Examples/Half_Adder/Half_Adder.kicad_pro new file mode 100644 index 0000000..ab67818 --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/Half_Adder.kicad_pro @@ -0,0 +1,355 @@ +{ + "board": { + "design_settings": { + "defaults": { + "board_outline_line_width": 0.1, + "copper_line_width": 0.2, + "copper_text_size_h": 1.5, + "copper_text_size_v": 1.5, + "copper_text_thickness": 0.3, + "other_line_width": 0.15, + "silk_line_width": 0.15, + "silk_text_size_h": 1.0, + "silk_text_size_v": 1.0, + "silk_text_thickness": 0.15 + }, + "diff_pair_dimensions": [], + "drc_exclusions": [], + "rules": { + "solder_mask_clearance": 0.0, + "solder_mask_min_width": 0.0 + }, + "track_widths": [], + "via_dimensions": [] + }, + "layer_presets": [] + }, + "boards": [], + "cvpcb": { + "equivalence_files": [] + }, + "erc": { + "erc_exclusions": [], + "meta": { + "version": 0 + }, + "pin_map": [ + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 0, + 1, + 0, + 0, + 1, + 0, + 2, + 2, + 2, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 2 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 2, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 2 + ], + [ + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 2 + ], + [ + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 2, + 0, + 0, + 1, + 0, + 2, + 2, + 2, + 2 + ], + [ + 0, + 2, + 0, + 1, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 2 + ], + [ + 0, + 2, + 1, + 1, + 0, + 0, + 1, + 0, + 2, + 0, + 0, + 2 + ], + [ + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2 + ] + ], + "rule_severities": { + "bus_definition_conflict": "error", + "bus_entry_needed": "error", + "bus_label_syntax": "error", + "bus_to_bus_conflict": "error", + "bus_to_net_conflict": "error", + "different_unit_footprint": "error", + "different_unit_net": "error", + "duplicate_reference": "error", + "duplicate_sheet_names": "error", + "extra_units": "error", + "global_label_dangling": "warning", + "hier_label_mismatch": "error", + "label_dangling": "error", + "lib_symbol_issues": "warning", + "multiple_net_names": "warning", + "net_not_bus_member": "warning", + "no_connect_connected": "warning", + "no_connect_dangling": "warning", + "pin_not_connected": "error", + "pin_not_driven": "error", + "pin_to_pin": "warning", + "power_pin_not_driven": "error", + "similar_labels": "warning", + "unannotated": "error", + "unit_value_mismatch": "error", + "unresolved_variable": "error", + "wire_dangling": "error" + } + }, + "libraries": { + "pinned_footprint_libs": [], + "pinned_symbol_libs": [] + }, + "meta": { + "filename": "Half_Adder.kicad_pro", + "version": 1 + }, + "net_settings": { + "classes": [ + { + "bus_width": 12.0, + "clearance": 0.2, + "diff_pair_gap": 0.25, + "diff_pair_via_gap": 0.25, + "diff_pair_width": 0.2, + "line_style": 0, + "microvia_diameter": 0.3, + "microvia_drill": 0.1, + "name": "Default", + "pcb_color": "rgba(0, 0, 0, 0.000)", + "schematic_color": "rgba(0, 0, 0, 0.000)", + "track_width": 0.25, + "via_diameter": 0.8, + "via_drill": 0.4, + "wire_width": 6.0 + } + ], + "meta": { + "version": 2 + }, + "net_colors": null + }, + "pcbnew": { + "last_paths": { + "gencad": "", + "idf": "", + "netlist": "", + "specctra_dsn": "", + "step": "", + "vrml": "" + }, + "page_layout_descr_file": "" + }, + "schematic": { + "annotate_start_num": 0, + "drawing": { + "default_line_thickness": 6.0, + "default_text_size": 50.0, + "field_names": [], + "intersheets_ref_own_page": false, + "intersheets_ref_prefix": "", + "intersheets_ref_short": false, + "intersheets_ref_show": false, + "intersheets_ref_suffix": "", + "junction_size_choice": 3, + "label_size_ratio": 0.25, + "pin_symbol_size": 0.0, + "text_offset_ratio": 0.08 + }, + "legacy_lib_dir": "", + "legacy_lib_list": [ + "Half_Adder-rescue", + "eSim_Analog", + "eSim_Devices", + "eSim_Digital", + "eSim_Hybrid", + "eSim_Miscellaneous", + "eSim_Plot", + "eSim_Sources", + "eSim_Subckt", + "eSim_User", + "power", + "transistors", + "conn", + "regul", + "74xx", + "cmos4000", + "adc-dac", + "memory", + "xilinx", + "microcontrollers", + "dsp", + "microchip", + "analog_switches", + "motorola", + "texas", + "intel", + "audio", + "interface", + "digital-audio", + "philips", + "display", + "cypress", + "siliconi", + "opto", + "atmel", + "contrib", + "valves", + "eSim_Power" + ], + "meta": { + "version": 1 + }, + "net_format_name": "", + "page_layout_descr_file": "", + "plot_directory": "", + "spice_adjust_passive_values": false, + "spice_external_command": "spice \"%I\"", + "subpart_first_id": 65, + "subpart_id_separator": 0 + }, + "sheets": [ + [ + "911bdcbe-493f-4e21-a506-7cbc636e2c17", + "" + ] + ], + "text_variables": {} +} diff --git a/docker-launcher/Examples/Half_Adder/Half_Adder.kicad_sch b/docker-launcher/Examples/Half_Adder/Half_Adder.kicad_sch new file mode 100644 index 0000000..39e2f1a --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/Half_Adder.kicad_sch @@ -0,0 +1,544 @@ +(kicad_sch (version 20211123) (generator eeschema) + + (uuid 911bdcbe-493f-4e21-a506-7cbc636e2c17) + + (paper "A4") + + (lib_symbols + ) + + (junction (at 194.31 80.01) (diameter 0) (color 0 0 0 0) + (uuid 382ca670-6ae8-4de6-90f9-f241d1337171) + ) + (junction (at 194.31 83.82) (diameter 0) (color 0 0 0 0) + (uuid 5cf2db29-f7ab-499a-9907-cdeba64bf0f3) + ) + (junction (at 212.09 90.17) (diameter 0) (color 0 0 0 0) + (uuid 6e68f0cd-800e-4167-9553-71fc59da1eeb) + ) + (junction (at 194.31 90.17) (diameter 0) (color 0 0 0 0) + (uuid 6fd4442e-30b3-428b-9306-61418a63d311) + ) + (junction (at 100.33 82.55) (diameter 0) (color 0 0 0 0) + (uuid 7e0a03ae-d054-4f76-a131-5c09b8dc1636) + ) + (junction (at 100.33 95.25) (diameter 0) (color 0 0 0 0) + (uuid 9193c41e-d425-447d-b95c-6986d66ea01c) + ) + (junction (at 74.93 99.06) (diameter 0) (color 0 0 0 0) + (uuid a9b3f6e4-7a6d-4ae8-ad28-3d8458e0ca1a) + ) + (junction (at 100.33 80.01) (diameter 0) (color 0 0 0 0) + (uuid b0906e10-2fbc-4309-a8b4-6fc4cd1a5490) + ) + (junction (at 194.31 95.25) (diameter 0) (color 0 0 0 0) + (uuid feb26ecb-9193-46ea-a41b-d09305bf0a3e) + ) + + (wire (pts (xy 100.33 82.55) (xy 100.33 87.63)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 0325ec43-0390-4ae2-b055-b1ec6ce17b1c) + ) + (wire (pts (xy 74.93 99.06) (xy 74.93 101.6)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 057af6bb-cf6f-4bfb-b0c0-2e92a2c09a47) + ) + (wire (pts (xy 99.06 100.33) (xy 99.06 96.52)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 0ce8d3ab-2662-4158-8a2a-18b782908fc5) + ) + (wire (pts (xy 100.33 78.74) (xy 99.06 78.74)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 0e8f7fc0-2ef2-4b90-9c15-8a3a601ee459) + ) + (wire (pts (xy 163.83 86.36) (xy 165.1 86.36)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 101ef598-601d-400e-9ef6-d655fbb1dbfa) + ) + (wire (pts (xy 203.2 83.82) (xy 212.09 83.82)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 15fe8f3d-6077-4e0e-81d0-8ec3f4538981) + ) + (wire (pts (xy 76.2 96.52) (xy 74.93 96.52)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 1e518c2a-4cb7-4599-a1fa-5b9f847da7d3) + ) + (wire (pts (xy 102.87 82.55) (xy 100.33 82.55)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 20c315f4-1e4f-49aa-8d61-778a7389df7e) + ) + (wire (pts (xy 194.31 95.25) (xy 194.31 97.79)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 262f1ea9-0133-4b43-be36-456207ea857c) + ) + (wire (pts (xy 193.04 95.25) (xy 194.31 95.25)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 27d56953-c620-4d5b-9c1c-e48bc3d9684a) + ) + (wire (pts (xy 194.31 77.47) (xy 194.31 80.01)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 29e058a7-50a3-43e5-81c3-bfee53da08be) + ) + (wire (pts (xy 193.04 83.82) (xy 194.31 83.82)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 35a9f71f-ba35-47f6-814e-4106ac36c51e) + ) + (wire (pts (xy 100.33 96.52) (xy 100.33 95.25)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 3a52f112-cb97-43db-aaeb-20afe27664d7) + ) + (wire (pts (xy 193.04 80.01) (xy 194.31 80.01)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 3fd54105-4b7e-4004-9801-76ec66108a22) + ) + (wire (pts (xy 99.06 96.52) (xy 100.33 96.52)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 41acfe41-fac7-432a-a7a3-946566e2d504) + ) + (wire (pts (xy 194.31 80.01) (xy 194.31 83.82)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 576c6616-e95d-4f1e-8ead-dea30fcdc8c2) + ) + (wire (pts (xy 193.04 86.36) (xy 193.04 83.82)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 5b34a16c-5a14-4291-8242-ea6d6ac54372) + ) + (wire (pts (xy 74.93 96.52) (xy 74.93 99.06)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 644ae9fc-3c8e-4089-866e-a12bf371c3e9) + ) + (wire (pts (xy 134.62 87.63) (xy 134.62 81.28)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 65134029-dbd2-409a-85a8-13c2a33ff019) + ) + (wire (pts (xy 212.09 90.17) (xy 212.09 92.71)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 658dad07-97fd-466c-8b49-21892ac96ea4) + ) + (wire (pts (xy 163.83 88.9) (xy 163.83 96.52)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 6781326c-6e0d-4753-8f28-0f5c687e01f9) + ) + (wire (pts (xy 102.87 80.01) (xy 102.87 82.55)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 7a4ce4b3-518a-4819-b8b2-5127b3347c64) + ) + (wire (pts (xy 100.33 95.25) (xy 100.33 90.17)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 7b044939-8c4d-444f-b9e0-a15fcdeb5a86) + ) + (wire (pts (xy 129.54 90.17) (xy 134.62 90.17)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 7f2301df-e4bc-479e-a681-cc59c9a2dbbb) + ) + (wire (pts (xy 163.83 81.28) (xy 163.83 86.36)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 7f52d787-caa3-4a92-b1b2-19d554dc29a4) + ) + (wire (pts (xy 100.33 80.01) (xy 99.06 80.01)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 8087f566-a94d-4bbc-985b-e49ee7762296) + ) + (wire (pts (xy 194.31 83.82) (xy 195.58 83.82)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 89e83c2e-e90a-4a50-b278-880bac0cfb49) + ) + (wire (pts (xy 194.31 90.17) (xy 194.31 95.25)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 8d0c1d66-35ef-4a53-a28f-436a11b54f42) + ) + (wire (pts (xy 100.33 80.01) (xy 100.33 82.55)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 935f462d-8b1e-4005-9f1e-17f537ab1756) + ) + (wire (pts (xy 129.54 87.63) (xy 134.62 87.63)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 98c78427-acd5-4f90-9ad6-9f61c4809aec) + ) + (wire (pts (xy 193.04 88.9) (xy 193.04 90.17)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid 9b3c58a7-a9b9-4498-abc0-f9f43e4f0292) + ) + (wire (pts (xy 194.31 90.17) (xy 195.58 90.17)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid a5e521b9-814e-4853-a5ac-f158785c6269) + ) + (wire (pts (xy 72.39 99.06) (xy 74.93 99.06)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid a6b7df29-bcf8-46a9-b623-7eaac47f5110) + ) + (wire (pts (xy 134.62 90.17) (xy 134.62 96.52)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid a8447faf-e0a0-4c4a-ae53-4d4b28669151) + ) + (wire (pts (xy 190.5 88.9) (xy 193.04 88.9)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid c094494a-f6f7-43fc-a007-4951484ddf3a) + ) + (wire (pts (xy 212.09 83.82) (xy 212.09 90.17)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid c1c799a0-3c93-493a-9ad7-8a0561bc69ee) + ) + (wire (pts (xy 190.5 86.36) (xy 193.04 86.36)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid c701ee8e-1214-4781-a973-17bef7b6e3eb) + ) + (wire (pts (xy 165.1 88.9) (xy 163.83 88.9)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid c8029a4c-945d-42ca-871a-dd73ff50a1a3) + ) + (wire (pts (xy 76.2 80.01) (xy 74.93 80.01)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid d0d2eee9-31f6-44fa-8149-ebb4dc2dc0dc) + ) + (wire (pts (xy 104.14 95.25) (xy 100.33 95.25)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid d6fb27cf-362d-4568-967c-a5bf49d5931b) + ) + (wire (pts (xy 72.39 97.79) (xy 72.39 99.06)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid d9c6d5d2-0b49-49ba-a970-cd2c32f74c54) + ) + (wire (pts (xy 193.04 90.17) (xy 194.31 90.17)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid e40e8cef-4fb0-4fc3-be09-3875b2cc8469) + ) + (wire (pts (xy 203.2 90.17) (xy 212.09 90.17)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid e65b62be-e01b-4688-a999-1d1be370c4ae) + ) + (wire (pts (xy 74.93 80.01) (xy 74.93 82.55)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid ee41cb8e-512d-41d2-81e1-3c50fff32aeb) + ) + (wire (pts (xy 100.33 78.74) (xy 100.33 80.01)) + (stroke (width 0) (type default) (color 0 0 0 0)) + (uuid f4eb0267-179f-46c9-b516-9bfb06bac1ba) + ) + + (global_label "IN1" (shape input) (at 102.87 80.01 0) (fields_autoplaced) + (effects (font (size 1.524 1.524)) (justify left)) + (uuid 19c56563-5fe3-442a-885b-418dbc2421eb) + (property "Intersheet References" "${INTERSHEET_REFS}" (id 0) (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + ) + (global_label "sum" (shape input) (at 193.04 80.01 180) (fields_autoplaced) + (effects (font (size 1.524 1.524)) (justify right)) + (uuid bd065eaf-e495-4837-bdb3-129934de1fc7) + (property "Intersheet References" "${INTERSHEET_REFS}" (id 0) (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + ) + (global_label "IN2" (shape input) (at 104.14 95.25 0) (fields_autoplaced) + (effects (font (size 1.524 1.524)) (justify left)) + (uuid c7e7067c-5f5e-48d8-ab59-df26f9b35863) + (property "Intersheet References" "${INTERSHEET_REFS}" (id 0) (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + ) + (global_label "cout" (shape input) (at 193.04 95.25 180) (fields_autoplaced) + (effects (font (size 1.524 1.524)) (justify right)) + (uuid e43dbe34-ed17-4e35-a5c7-2f1679b3c415) + (property "Intersheet References" "${INTERSHEET_REFS}" (id 0) (at 0 0 0) + (effects (font (size 1.27 1.27)) hide) + ) + ) + + (symbol (lib_id "half_adder") (at 127 99.06 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-0000558a91c8) + (property "Reference" "X1" (id 0) (at 149.86 86.36 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "half_adder" (id 1) (at 149.86 88.9 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 127 99.06 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 127 99.06 0) + (effects (font (size 1.524 1.524))) + ) + ) + + (symbol (lib_id "adc_bridge_2") (at 115.57 88.9 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-0000558a92c9) + (property "Reference" "U1" (id 0) (at 115.57 88.9 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "adc_bridge_2" (id 1) (at 115.57 85.09 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 115.57 88.9 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 115.57 88.9 0) + (effects (font (size 1.524 1.524))) + ) + ) + + (symbol (lib_id "dac_bridge_2") (at 176.53 87.63 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-0000558a9300) + (property "Reference" "U2" (id 0) (at 176.53 87.63 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "dac_bridge_2" (id 1) (at 177.8 83.82 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 176.53 87.63 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 176.53 87.63 0) + (effects (font (size 1.524 1.524))) + ) + ) + + (symbol (lib_id "DC-RESCUE-Half_Adder") (at 87.63 80.01 270) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-0000558a9345) + (property "Reference" "v1" (id 0) (at 90.17 74.93 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "DC" (id 1) (at 86.36 74.93 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "R1" (id 2) (at 87.63 72.39 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 87.63 80.01 0) + (effects (font (size 1.524 1.524))) + ) + ) + + (symbol (lib_id "DC-RESCUE-Half_Adder") (at 87.63 96.52 270) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-0000558a937c) + (property "Reference" "v2" (id 0) (at 90.17 91.44 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "DC" (id 1) (at 86.36 91.44 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "R1" (id 2) (at 87.63 88.9 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 87.63 96.52 0) + (effects (font (size 1.524 1.524))) + ) + ) + + (symbol (lib_id "GND-RESCUE-Half_Adder") (at 74.93 101.6 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-0000558a93bb) + (property "Reference" "#PWR01" (id 0) (at 74.93 101.6 0) + (effects (font (size 0.762 0.762)) hide) + ) + (property "Value" "GND" (id 1) (at 74.93 103.378 0) + (effects (font (size 0.762 0.762)) hide) + ) + (property "Footprint" "" (id 2) (at 74.93 101.6 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 74.93 101.6 0) + (effects (font (size 1.524 1.524))) + ) + ) + + (symbol (lib_id "GND-RESCUE-Half_Adder") (at 74.93 82.55 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-0000558a93d7) + (property "Reference" "#PWR02" (id 0) (at 74.93 82.55 0) + (effects (font (size 0.762 0.762)) hide) + ) + (property "Value" "GND" (id 1) (at 74.93 84.328 0) + (effects (font (size 0.762 0.762)) hide) + ) + (property "Footprint" "" (id 2) (at 74.93 82.55 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 74.93 82.55 0) + (effects (font (size 1.524 1.524))) + ) + ) + + (symbol (lib_id "GND-RESCUE-Half_Adder") (at 212.09 92.71 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-0000558a9480) + (property "Reference" "#PWR03" (id 0) (at 212.09 92.71 0) + (effects (font (size 0.762 0.762)) hide) + ) + (property "Value" "GND" (id 1) (at 212.09 94.488 0) + (effects (font (size 0.762 0.762)) hide) + ) + (property "Footprint" "" (id 2) (at 212.09 92.71 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 212.09 92.71 0) + (effects (font (size 1.524 1.524))) + ) + ) + + (symbol (lib_id "PWR_FLAG") (at 72.39 97.79 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-0000558a96d4) + (property "Reference" "#FLG04" (id 0) (at 72.39 95.377 0) + (effects (font (size 1.27 1.27)) hide) + ) + (property "Value" "PWR_FLAG" (id 1) (at 72.39 93.218 0)) + (property "Footprint" "" (id 2) (at 72.39 97.79 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 72.39 97.79 0) + (effects (font (size 1.524 1.524))) + ) + ) + + (symbol (lib_id "R-RESCUE-Half_Adder") (at 198.12 85.09 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000055d44b20) + (property "Reference" "R1" (id 0) (at 199.39 81.788 0)) + (property "Value" "1k" (id 1) (at 199.39 83.82 0)) + (property "Footprint" "" (id 2) (at 199.39 85.598 0) + (effects (font (size 0.762 0.762))) + ) + (property "Datasheet" "" (id 3) (at 199.39 83.82 90) + (effects (font (size 0.762 0.762))) + ) + ) + + (symbol (lib_id "R-RESCUE-Half_Adder") (at 198.12 91.44 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000055d44b67) + (property "Reference" "R2" (id 0) (at 199.39 88.138 0)) + (property "Value" "1k" (id 1) (at 199.39 90.17 0)) + (property "Footprint" "" (id 2) (at 199.39 91.948 0) + (effects (font (size 0.762 0.762))) + ) + (property "Datasheet" "" (id 3) (at 199.39 90.17 90) + (effects (font (size 0.762 0.762))) + ) + ) + + (symbol (lib_id "plot_v1") (at 99.06 83.82 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d860cb) + (property "Reference" "U3" (id 0) (at 99.06 71.12 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "plot_v1" (id 1) (at 104.14 74.93 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 99.06 83.82 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 99.06 83.82 0) + (effects (font (size 1.524 1.524))) + ) + ) + + (symbol (lib_id "plot_v1") (at 99.06 95.25 180) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d8619c) + (property "Reference" "U4" (id 0) (at 99.06 107.95 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "plot_v1" (id 1) (at 93.98 104.14 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 99.06 95.25 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 99.06 95.25 0) + (effects (font (size 1.524 1.524))) + ) + ) + + (symbol (lib_id "plot_v1") (at 194.31 82.55 0) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d8629d) + (property "Reference" "U5" (id 0) (at 194.31 69.85 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "plot_v1" (id 1) (at 199.39 73.66 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 194.31 82.55 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 194.31 82.55 0) + (effects (font (size 1.524 1.524))) + ) + ) + + (symbol (lib_id "plot_v1") (at 194.31 92.71 180) (unit 1) + (in_bom yes) (on_board yes) + (uuid 00000000-0000-0000-0000-000056d86375) + (property "Reference" "U6" (id 0) (at 194.31 105.41 0) + (effects (font (size 1.524 1.524))) + ) + (property "Value" "plot_v1" (id 1) (at 189.23 101.6 0) + (effects (font (size 1.524 1.524))) + ) + (property "Footprint" "" (id 2) (at 194.31 92.71 0) + (effects (font (size 1.524 1.524))) + ) + (property "Datasheet" "" (id 3) (at 194.31 92.71 0) + (effects (font (size 1.524 1.524))) + ) + ) + + (sheet_instances + (path "/" (page "1")) + ) + + (symbol_instances + (path "/00000000-0000-0000-0000-0000558a96d4" + (reference "#FLG04") (unit 1) (value "PWR_FLAG") (footprint "") + ) + (path "/00000000-0000-0000-0000-0000558a93bb" + (reference "#PWR01") (unit 1) (value "GND") (footprint "") + ) + (path "/00000000-0000-0000-0000-0000558a93d7" + (reference "#PWR02") (unit 1) (value "GND") (footprint "") + ) + (path "/00000000-0000-0000-0000-0000558a9480" + (reference "#PWR03") (unit 1) (value "GND") (footprint "") + ) + (path "/00000000-0000-0000-0000-000055d44b20" + (reference "R1") (unit 1) (value "1k") (footprint "") + ) + (path "/00000000-0000-0000-0000-000055d44b67" + (reference "R2") (unit 1) (value "1k") (footprint "") + ) + (path "/00000000-0000-0000-0000-0000558a92c9" + (reference "U1") (unit 1) (value "adc_bridge_2") (footprint "") + ) + (path "/00000000-0000-0000-0000-0000558a9300" + (reference "U2") (unit 1) (value "dac_bridge_2") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d860cb" + (reference "U3") (unit 1) (value "plot_v1") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d8619c" + (reference "U4") (unit 1) (value "plot_v1") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d8629d" + (reference "U5") (unit 1) (value "plot_v1") (footprint "") + ) + (path "/00000000-0000-0000-0000-000056d86375" + (reference "U6") (unit 1) (value "plot_v1") (footprint "") + ) + (path "/00000000-0000-0000-0000-0000558a91c8" + (reference "X1") (unit 1) (value "half_adder") (footprint "") + ) + (path "/00000000-0000-0000-0000-0000558a9345" + (reference "v1") (unit 1) (value "DC") (footprint "R1") + ) + (path "/00000000-0000-0000-0000-0000558a937c" + (reference "v2") (unit 1) (value "DC") (footprint "R1") + ) + ) +) diff --git a/docker-launcher/Examples/Half_Adder/Half_Adder.pro b/docker-launcher/Examples/Half_Adder/Half_Adder.pro new file mode 100644 index 0000000..ef46bd0 --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/Half_Adder.pro @@ -0,0 +1,71 @@ +update=Wed Mar 11 16:20:37 2020 +version=1 +last_client=eeschema +[general] +version=1 +RootSch= +BoardNm= +[pcbnew] +version=1 +LastNetListRead= +UseCmpFile=1 +PadDrill=0.600000000000 +PadDrillOvalY=0.600000000000 +PadSizeH=1.500000000000 +PadSizeV=1.500000000000 +PcbTextSizeV=1.500000000000 +PcbTextSizeH=1.500000000000 +PcbTextThickness=0.300000000000 +ModuleTextSizeV=1.000000000000 +ModuleTextSizeH=1.000000000000 +ModuleTextSizeThickness=0.150000000000 +SolderMaskClearance=0.000000000000 +SolderMaskMinWidth=0.000000000000 +DrawSegmentWidth=0.200000000000 +BoardOutlineThickness=0.100000000000 +ModuleOutlineThickness=0.150000000000 +[cvpcb] +version=1 +NetIExt=net +[eeschema] +version=1 +LibDir= +[eeschema/libraries] +LibName1=Half_Adder-rescue +LibName2=eSim_Analog +LibName3=eSim_Devices +LibName4=eSim_Digital +LibName5=eSim_Hybrid +LibName6=eSim_Miscellaneous +LibName7=eSim_Plot +LibName8=eSim_Sources +LibName9=eSim_Subckt +LibName10=eSim_User +LibName11=power +LibName12=transistors +LibName13=conn +LibName14=regul +LibName15=74xx +LibName16=cmos4000 +LibName17=adc-dac +LibName18=memory +LibName19=xilinx +LibName20=microcontrollers +LibName21=dsp +LibName22=microchip +LibName23=analog_switches +LibName24=motorola +LibName25=texas +LibName26=intel +LibName27=audio +LibName28=interface +LibName29=digital-audio +LibName30=philips +LibName31=display +LibName32=cypress +LibName33=siliconi +LibName34=opto +LibName35=atmel +LibName36=contrib +LibName37=valves +LibName38=eSim_Power diff --git a/docker-launcher/Examples/Half_Adder/Half_Adder.proj b/docker-launcher/Examples/Half_Adder/Half_Adder.proj new file mode 100644 index 0000000..cc4f1c3 --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/Half_Adder.proj @@ -0,0 +1 @@ +schematicFile Half_Adder.sch diff --git a/docker-launcher/Examples/Half_Adder/Half_Adder.sch b/docker-launcher/Examples/Half_Adder/Half_Adder.sch new file mode 100644 index 0000000..99fc514 --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/Half_Adder.sch @@ -0,0 +1,311 @@ +EESchema Schematic File Version 2 +LIBS:Half_Adder-rescue +LIBS:eSim_Analog +LIBS:eSim_Devices +LIBS:eSim_Digital +LIBS:eSim_Hybrid +LIBS:eSim_Miscellaneous +LIBS:eSim_Plot +LIBS:eSim_Sources +LIBS:eSim_Subckt +LIBS:eSim_User +LIBS:power +LIBS:transistors +LIBS:conn +LIBS:regul +LIBS:74xx +LIBS:cmos4000 +LIBS:adc-dac +LIBS:memory +LIBS:xilinx +LIBS:microcontrollers +LIBS:dsp +LIBS:microchip +LIBS:analog_switches +LIBS:motorola +LIBS:texas +LIBS:intel +LIBS:audio +LIBS:interface +LIBS:digital-audio +LIBS:philips +LIBS:display +LIBS:cypress +LIBS:siliconi +LIBS:opto +LIBS:atmel +LIBS:contrib +LIBS:valves +LIBS:eSim_Power +LIBS:Half_Adder-cache +EELAYER 25 0 +EELAYER END +$Descr A4 11693 8268 +encoding utf-8 +Sheet 1 1 +Title "" +Date "" +Rev "" +Comp "" +Comment1 "" +Comment2 "" +Comment3 "" +Comment4 "" +$EndDescr +$Comp +L half_adder X1 +U 1 1 558A91C8 +P 5000 3900 +F 0 "X1" H 5900 4400 60 0000 C CNN +F 1 "half_adder" H 5900 4300 60 0000 C CNN +F 2 "" H 5000 3900 60 0000 C CNN +F 3 "" H 5000 3900 60 0000 C CNN + 1 5000 3900 + 1 0 0 -1 +$EndComp +$Comp +L adc_bridge_2 U1 +U 1 1 558A92C9 +P 4550 3500 +F 0 "U1" H 4550 3500 60 0000 C CNN +F 1 "adc_bridge_2" H 4550 3650 60 0000 C CNN +F 2 "" H 4550 3500 60 0000 C CNN +F 3 "" H 4550 3500 60 0000 C CNN + 1 4550 3500 + 1 0 0 -1 +$EndComp +$Comp +L dac_bridge_2 U2 +U 1 1 558A9300 +P 6950 3450 +F 0 "U2" H 6950 3450 60 0000 C CNN +F 1 "dac_bridge_2" H 7000 3600 60 0000 C CNN +F 2 "" H 6950 3450 60 0000 C CNN +F 3 "" H 6950 3450 60 0000 C CNN + 1 6950 3450 + 1 0 0 -1 +$EndComp +$Comp +L GND-RESCUE-Half_Adder #PWR01 +U 1 1 558A93BB +P 2950 4000 +F 0 "#PWR01" H 2950 4000 30 0001 C CNN +F 1 "GND" H 2950 3930 30 0001 C CNN +F 2 "" H 2950 4000 60 0000 C CNN +F 3 "" H 2950 4000 60 0000 C CNN + 1 2950 4000 + 1 0 0 -1 +$EndComp +$Comp +L GND-RESCUE-Half_Adder #PWR02 +U 1 1 558A93D7 +P 2950 3250 +F 0 "#PWR02" H 2950 3250 30 0001 C CNN +F 1 "GND" H 2950 3180 30 0001 C CNN +F 2 "" H 2950 3250 60 0000 C CNN +F 3 "" H 2950 3250 60 0000 C CNN + 1 2950 3250 + 1 0 0 -1 +$EndComp +$Comp +L GND-RESCUE-Half_Adder #PWR03 +U 1 1 558A9480 +P 8350 3650 +F 0 "#PWR03" H 8350 3650 30 0001 C CNN +F 1 "GND" H 8350 3580 30 0001 C CNN +F 2 "" H 8350 3650 60 0000 C CNN +F 3 "" H 8350 3650 60 0000 C CNN + 1 8350 3650 + 1 0 0 -1 +$EndComp +$Comp +L PWR_FLAG #FLG04 +U 1 1 558A96D4 +P 2850 3850 +F 0 "#FLG04" H 2850 3945 50 0001 C CNN +F 1 "PWR_FLAG" H 2850 4030 50 0000 C CNN +F 2 "" H 2850 3850 60 0000 C CNN +F 3 "" H 2850 3850 60 0000 C CNN + 1 2850 3850 + 1 0 0 -1 +$EndComp +Text GLabel 7600 3150 0 60 Input ~ 0 +sum +Text GLabel 7600 3750 0 60 Input ~ 0 +cout +Text GLabel 4050 3150 2 60 Input ~ 0 +IN1 +Text GLabel 4100 3750 2 60 Input ~ 0 +IN2 +$Comp +L R-RESCUE-Half_Adder R1 +U 1 1 55D44B20 +P 7800 3350 +F 0 "R1" H 7850 3480 50 0000 C CNN +F 1 "1k" H 7850 3400 50 0000 C CNN +F 2 "" H 7850 3330 30 0000 C CNN +F 3 "" V 7850 3400 30 0000 C CNN + 1 7800 3350 + 1 0 0 -1 +$EndComp +$Comp +L R-RESCUE-Half_Adder R2 +U 1 1 55D44B67 +P 7800 3600 +F 0 "R2" H 7850 3730 50 0000 C CNN +F 1 "1k" H 7850 3650 50 0000 C CNN +F 2 "" H 7850 3580 30 0000 C CNN +F 3 "" V 7850 3650 30 0000 C CNN + 1 7800 3600 + 1 0 0 -1 +$EndComp +$Comp +L plot_v1 U3 +U 1 1 56D860CB +P 3900 3300 +F 0 "U3" H 3900 3800 60 0000 C CNN +F 1 "plot_v1" H 4100 3650 60 0000 C CNN +F 2 "" H 3900 3300 60 0000 C CNN +F 3 "" H 3900 3300 60 0000 C CNN + 1 3900 3300 + 1 0 0 -1 +$EndComp +$Comp +L plot_v1 U4 +U 1 1 56D8619C +P 3900 3750 +F 0 "U4" H 3900 4250 60 0000 C CNN +F 1 "plot_v1" H 4100 4100 60 0000 C CNN +F 2 "" H 3900 3750 60 0000 C CNN +F 3 "" H 3900 3750 60 0000 C CNN + 1 3900 3750 + -1 0 0 1 +$EndComp +$Comp +L plot_v1 U5 +U 1 1 56D8629D +P 7650 3250 +F 0 "U5" H 7650 3750 60 0000 C CNN +F 1 "plot_v1" H 7850 3600 60 0000 C CNN +F 2 "" H 7650 3250 60 0000 C CNN +F 3 "" H 7650 3250 60 0000 C CNN + 1 7650 3250 + 1 0 0 -1 +$EndComp +$Comp +L plot_v1 U6 +U 1 1 56D86375 +P 7650 3650 +F 0 "U6" H 7650 4150 60 0000 C CNN +F 1 "plot_v1" H 7850 4000 60 0000 C CNN +F 2 "" H 7650 3650 60 0000 C CNN +F 3 "" H 7650 3650 60 0000 C CNN + 1 7650 3650 + -1 0 0 1 +$EndComp +Wire Wire Line + 3000 3150 2950 3150 +Wire Wire Line + 2950 3150 2950 3250 +Wire Wire Line + 3000 3800 2950 3800 +Wire Wire Line + 2950 3800 2950 4000 +Wire Wire Line + 3900 3800 3950 3800 +Wire Wire Line + 3950 3800 3950 3550 +Wire Wire Line + 3950 3100 3950 3450 +Wire Wire Line + 3950 3150 3900 3150 +Wire Wire Line + 5100 3450 5300 3450 +Wire Wire Line + 5300 3450 5300 3200 +Wire Wire Line + 5100 3550 5300 3550 +Wire Wire Line + 5300 3550 5300 3800 +Wire Wire Line + 6450 3200 6450 3400 +Wire Wire Line + 6450 3400 6500 3400 +Wire Wire Line + 6500 3500 6450 3500 +Wire Wire Line + 6450 3500 6450 3800 +Wire Wire Line + 7500 3400 7600 3400 +Wire Wire Line + 7600 3400 7600 3300 +Wire Wire Line + 7600 3300 7700 3300 +Wire Wire Line + 7500 3500 7600 3500 +Wire Wire Line + 7600 3500 7600 3550 +Wire Wire Line + 7600 3550 7700 3550 +Wire Wire Line + 8000 3300 8350 3300 +Wire Wire Line + 8350 3300 8350 3650 +Wire Wire Line + 8000 3550 8350 3550 +Wire Wire Line + 8350 3550 8350 3500 +Connection ~ 8350 3500 +Wire Wire Line + 2850 3850 2850 3900 +Wire Wire Line + 2850 3900 2950 3900 +Connection ~ 2950 3900 +Wire Wire Line + 4050 3150 4050 3250 +Wire Wire Line + 4050 3250 3950 3250 +Connection ~ 3950 3250 +Wire Wire Line + 4100 3750 3950 3750 +Connection ~ 3950 3750 +Wire Wire Line + 7600 3750 7650 3750 +Wire Wire Line + 7650 3550 7650 3850 +Connection ~ 7650 3550 +Wire Wire Line + 7600 3150 7650 3150 +Wire Wire Line + 7650 3050 7650 3300 +Connection ~ 7650 3300 +Connection ~ 7650 3750 +Connection ~ 7650 3150 +Wire Wire Line + 3950 3100 3900 3100 +Connection ~ 3950 3150 +Wire Wire Line + 3900 3950 3900 3800 +$Comp +L DC-RESCUE-Half_Adder v2 +U 1 1 558A937C +P 3450 3800 +F 0 "v2" H 3250 3900 60 0000 C CNN +F 1 "DC" H 3250 3750 60 0000 C CNN +F 2 "R1" H 3150 3800 60 0000 C CNN +F 3 "" H 3450 3800 60 0000 C CNN + 1 3450 3800 + 0 1 1 0 +$EndComp +$Comp +L DC-RESCUE-Half_Adder v1 +U 1 1 558A9345 +P 3450 3150 +F 0 "v1" H 3250 3250 60 0000 C CNN +F 1 "DC" H 3250 3100 60 0000 C CNN +F 2 "R1" H 3150 3150 60 0000 C CNN +F 3 "" H 3450 3150 60 0000 C CNN + 1 3450 3150 + 0 1 1 0 +$EndComp +$EndSCHEMATC diff --git a/docker-launcher/Examples/Half_Adder/Half_Adder.sdc b/docker-launcher/Examples/Half_Adder/Half_Adder.sdc new file mode 100644 index 0000000..296d4cc --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/Half_Adder.sdc @@ -0,0 +1,3 @@ +create_clock -name clk -period 10.0 +set_input_delay 2.0 -clock clk [all_inputs] +set_output_delay 2.0 -clock clk [all_outputs] diff --git a/docker-launcher/Examples/Half_Adder/Half_Adder.v b/docker-launcher/Examples/Half_Adder/Half_Adder.v new file mode 100644 index 0000000..75db547 --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/Half_Adder.v @@ -0,0 +1,4 @@ +module Half_Adder (input a, input b, output sum, output cout); + assign sum = a ^ b; + assign cout = a & b; +endmodule diff --git a/docker-launcher/Examples/Half_Adder/Half_Adder_Previous_Values.xml b/docker-launcher/Examples/Half_Adder/Half_Adder_Previous_Values.xml new file mode 100644 index 0000000..ca48266 --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/Half_Adder_Previous_Values.xml @@ -0,0 +1 @@ +dc5dc0adc_bridgedac_bridge/home/fossee/esim-updated/eSim/src/SubcircuitLibrary/half_addertruefalsefalseHzHz0Volts or AmperesVolts or AmperesVolts or AmperesVolts or AmperesVolts or AmperesVolts or Amperes010100msmsms \ No newline at end of file diff --git a/docker-launcher/Examples/Half_Adder/analysis b/docker-launcher/Examples/Half_Adder/analysis new file mode 100644 index 0000000..660a46c --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/analysis @@ -0,0 +1 @@ +.tran 10e-03 100e-03 0e-03 \ No newline at end of file diff --git a/docker-launcher/Examples/Half_Adder/config.mk b/docker-launcher/Examples/Half_Adder/config.mk new file mode 100644 index 0000000..afd0598 --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/config.mk @@ -0,0 +1,4 @@ +export DESIGN_NAME = Half_Adder +export PLATFORM = sky130hd +export VERILOG_FILES = /OpenROAD-flow-scripts/flow/designs/esim/Examples/Half_Adder/Half_Adder.v +export CLOCK_PERIOD = 10.0 diff --git a/docker-launcher/Examples/Half_Adder/half_adder.sub b/docker-launcher/Examples/Half_Adder/half_adder.sub new file mode 100644 index 0000000..e9f9222 --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/half_adder.sub @@ -0,0 +1,14 @@ +* Subcircuit half_adder +.subckt half_adder 1 4 3 2 +* eeschema netlist version 1.1 (spice format) creation date: wed jun 24 11:31:48 2015 +* u2 1 4 3 d_xor +* u3 1 4 2 d_and +a1 [1 4 ] 3 u2 +a2 [1 4 ] 2 u3 +* Schematic Name: d_xor, NgSpice Name: d_xor +.model u2 d_xor(fall_delay=1.0e-9 input_load=1.0e-12 rise_delay=1.0e-9 ) +* Schematic Name: d_and, NgSpice Name: d_and +.model u3 d_and(fall_delay=1.0e-9 input_load=1.0e-12 rise_delay=1.0e-9 ) +* Control Statements + +.ends half_adder \ No newline at end of file diff --git a/docker-launcher/Examples/Half_Adder/plot_data_i.txt b/docker-launcher/Examples/Half_Adder/plot_data_i.txt new file mode 100644 index 0000000..6235bba --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/plot_data_i.txt @@ -0,0 +1,135 @@ + * /home/fossee/updatedexamples/half_adder/half_adder.cir + Transient Analysis Fri Apr 3 04:13:24 2026 +-------------------------------------------------------------------------------- +Index time a2#branch_1_0 a2#branch_1_1 v1#branch +-------------------------------------------------------------------------------- +0 0.000000e+00 -5.00000e-03 0.000000e+00 0.000000e+00 +1 1.000000e-05 -5.00000e-03 0.000000e+00 0.000000e+00 +2 2.000000e-05 -5.00000e-03 0.000000e+00 0.000000e+00 +3 4.000000e-05 -5.00000e-03 0.000000e+00 0.000000e+00 +4 8.000000e-05 -5.00000e-03 0.000000e+00 0.000000e+00 +5 1.600000e-04 -5.00000e-03 0.000000e+00 0.000000e+00 +6 3.200000e-04 -5.00000e-03 0.000000e+00 0.000000e+00 +7 6.400000e-04 -5.00000e-03 0.000000e+00 0.000000e+00 +8 1.280000e-03 -5.00000e-03 0.000000e+00 0.000000e+00 +9 2.560000e-03 -5.00000e-03 0.000000e+00 0.000000e+00 +10 4.560000e-03 -5.00000e-03 0.000000e+00 0.000000e+00 +11 6.560000e-03 -5.00000e-03 0.000000e+00 0.000000e+00 +12 8.560000e-03 -5.00000e-03 0.000000e+00 0.000000e+00 +13 1.056000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +14 1.256000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +15 1.456000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +16 1.656000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +17 1.856000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +18 2.056000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +19 2.256000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +20 2.456000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +21 2.656000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +22 2.856000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +23 3.056000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +24 3.256000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +25 3.456000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +26 3.656000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +27 3.856000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +28 4.056000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +29 4.256000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +30 4.456000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +31 4.656000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +32 4.856000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +33 5.056000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +34 5.256000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +35 5.456000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +36 5.656000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +37 5.856000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +38 6.056000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +39 6.256000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +40 6.456000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +41 6.656000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +42 6.856000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +43 7.056000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +44 7.256000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +45 7.456000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +46 7.656000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +47 7.856000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +48 8.056000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +49 8.256000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +50 8.456000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +51 8.656000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +52 8.856000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +53 9.056000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +54 9.256000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 + +Index time a2#branch_1_0 a2#branch_1_1 v1#branch +-------------------------------------------------------------------------------- +55 9.456000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +56 9.656000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +57 9.856000e-02 -5.00000e-03 0.000000e+00 0.000000e+00 +58 1.000000e-01 -5.00000e-03 0.000000e+00 0.000000e+00 + + * /home/fossee/updatedexamples/half_adder/half_adder.cir + Transient Analysis Fri Apr 3 04:13:24 2026 +-------------------------------------------------------------------------------- +Index time v2#branch +-------------------------------------------------------------------------------- +0 0.000000e+00 0.000000e+00 +1 1.000000e-05 0.000000e+00 +2 2.000000e-05 0.000000e+00 +3 4.000000e-05 0.000000e+00 +4 8.000000e-05 0.000000e+00 +5 1.600000e-04 0.000000e+00 +6 3.200000e-04 0.000000e+00 +7 6.400000e-04 0.000000e+00 +8 1.280000e-03 0.000000e+00 +9 2.560000e-03 0.000000e+00 +10 4.560000e-03 0.000000e+00 +11 6.560000e-03 0.000000e+00 +12 8.560000e-03 0.000000e+00 +13 1.056000e-02 0.000000e+00 +14 1.256000e-02 0.000000e+00 +15 1.456000e-02 0.000000e+00 +16 1.656000e-02 0.000000e+00 +17 1.856000e-02 0.000000e+00 +18 2.056000e-02 0.000000e+00 +19 2.256000e-02 0.000000e+00 +20 2.456000e-02 0.000000e+00 +21 2.656000e-02 0.000000e+00 +22 2.856000e-02 0.000000e+00 +23 3.056000e-02 0.000000e+00 +24 3.256000e-02 0.000000e+00 +25 3.456000e-02 0.000000e+00 +26 3.656000e-02 0.000000e+00 +27 3.856000e-02 0.000000e+00 +28 4.056000e-02 0.000000e+00 +29 4.256000e-02 0.000000e+00 +30 4.456000e-02 0.000000e+00 +31 4.656000e-02 0.000000e+00 +32 4.856000e-02 0.000000e+00 +33 5.056000e-02 0.000000e+00 +34 5.256000e-02 0.000000e+00 +35 5.456000e-02 0.000000e+00 +36 5.656000e-02 0.000000e+00 +37 5.856000e-02 0.000000e+00 +38 6.056000e-02 0.000000e+00 +39 6.256000e-02 0.000000e+00 +40 6.456000e-02 0.000000e+00 +41 6.656000e-02 0.000000e+00 +42 6.856000e-02 0.000000e+00 +43 7.056000e-02 0.000000e+00 +44 7.256000e-02 0.000000e+00 +45 7.456000e-02 0.000000e+00 +46 7.656000e-02 0.000000e+00 +47 7.856000e-02 0.000000e+00 +48 8.056000e-02 0.000000e+00 +49 8.256000e-02 0.000000e+00 +50 8.456000e-02 0.000000e+00 +51 8.656000e-02 0.000000e+00 +52 8.856000e-02 0.000000e+00 +53 9.056000e-02 0.000000e+00 +54 9.256000e-02 0.000000e+00 + +Index time v2#branch +-------------------------------------------------------------------------------- +55 9.456000e-02 0.000000e+00 +56 9.656000e-02 0.000000e+00 +57 9.856000e-02 0.000000e+00 +58 1.000000e-01 0.000000e+00 diff --git a/docker-launcher/Examples/Half_Adder/plot_data_v.txt b/docker-launcher/Examples/Half_Adder/plot_data_v.txt new file mode 100644 index 0000000..7a83a05 --- /dev/null +++ b/docker-launcher/Examples/Half_Adder/plot_data_v.txt @@ -0,0 +1,135 @@ + * /home/fossee/updatedexamples/half_adder/half_adder.cir + Transient Analysis Fri Apr 3 04:13:24 2026 +-------------------------------------------------------------------------------- +Index time cout in1 in2 +-------------------------------------------------------------------------------- +0 0.000000e+00 0.000000e+00 5.000000e+00 0.000000e+00 +1 1.000000e-05 0.000000e+00 5.000000e+00 0.000000e+00 +2 2.000000e-05 0.000000e+00 5.000000e+00 0.000000e+00 +3 4.000000e-05 0.000000e+00 5.000000e+00 0.000000e+00 +4 8.000000e-05 0.000000e+00 5.000000e+00 0.000000e+00 +5 1.600000e-04 0.000000e+00 5.000000e+00 0.000000e+00 +6 3.200000e-04 0.000000e+00 5.000000e+00 0.000000e+00 +7 6.400000e-04 0.000000e+00 5.000000e+00 0.000000e+00 +8 1.280000e-03 0.000000e+00 5.000000e+00 0.000000e+00 +9 2.560000e-03 0.000000e+00 5.000000e+00 0.000000e+00 +10 4.560000e-03 0.000000e+00 5.000000e+00 0.000000e+00 +11 6.560000e-03 0.000000e+00 5.000000e+00 0.000000e+00 +12 8.560000e-03 0.000000e+00 5.000000e+00 0.000000e+00 +13 1.056000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +14 1.256000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +15 1.456000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +16 1.656000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +17 1.856000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +18 2.056000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +19 2.256000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +20 2.456000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +21 2.656000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +22 2.856000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +23 3.056000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +24 3.256000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +25 3.456000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +26 3.656000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +27 3.856000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +28 4.056000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +29 4.256000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +30 4.456000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +31 4.656000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +32 4.856000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +33 5.056000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +34 5.256000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +35 5.456000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +36 5.656000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +37 5.856000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +38 6.056000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +39 6.256000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +40 6.456000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +41 6.656000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +42 6.856000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +43 7.056000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +44 7.256000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +45 7.456000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +46 7.656000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +47 7.856000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +48 8.056000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +49 8.256000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +50 8.456000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +51 8.656000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +52 8.856000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +53 9.056000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +54 9.256000e-02 0.000000e+00 5.000000e+00 0.000000e+00 + +Index time cout in1 in2 +-------------------------------------------------------------------------------- +55 9.456000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +56 9.656000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +57 9.856000e-02 0.000000e+00 5.000000e+00 0.000000e+00 +58 1.000000e-01 0.000000e+00 5.000000e+00 0.000000e+00 + + * /home/fossee/updatedexamples/half_adder/half_adder.cir + Transient Analysis Fri Apr 3 04:13:24 2026 +-------------------------------------------------------------------------------- +Index time sum +-------------------------------------------------------------------------------- +0 0.000000e+00 5.000000e+00 +1 1.000000e-05 5.000000e+00 +2 2.000000e-05 5.000000e+00 +3 4.000000e-05 5.000000e+00 +4 8.000000e-05 5.000000e+00 +5 1.600000e-04 5.000000e+00 +6 3.200000e-04 5.000000e+00 +7 6.400000e-04 5.000000e+00 +8 1.280000e-03 5.000000e+00 +9 2.560000e-03 5.000000e+00 +10 4.560000e-03 5.000000e+00 +11 6.560000e-03 5.000000e+00 +12 8.560000e-03 5.000000e+00 +13 1.056000e-02 5.000000e+00 +14 1.256000e-02 5.000000e+00 +15 1.456000e-02 5.000000e+00 +16 1.656000e-02 5.000000e+00 +17 1.856000e-02 5.000000e+00 +18 2.056000e-02 5.000000e+00 +19 2.256000e-02 5.000000e+00 +20 2.456000e-02 5.000000e+00 +21 2.656000e-02 5.000000e+00 +22 2.856000e-02 5.000000e+00 +23 3.056000e-02 5.000000e+00 +24 3.256000e-02 5.000000e+00 +25 3.456000e-02 5.000000e+00 +26 3.656000e-02 5.000000e+00 +27 3.856000e-02 5.000000e+00 +28 4.056000e-02 5.000000e+00 +29 4.256000e-02 5.000000e+00 +30 4.456000e-02 5.000000e+00 +31 4.656000e-02 5.000000e+00 +32 4.856000e-02 5.000000e+00 +33 5.056000e-02 5.000000e+00 +34 5.256000e-02 5.000000e+00 +35 5.456000e-02 5.000000e+00 +36 5.656000e-02 5.000000e+00 +37 5.856000e-02 5.000000e+00 +38 6.056000e-02 5.000000e+00 +39 6.256000e-02 5.000000e+00 +40 6.456000e-02 5.000000e+00 +41 6.656000e-02 5.000000e+00 +42 6.856000e-02 5.000000e+00 +43 7.056000e-02 5.000000e+00 +44 7.256000e-02 5.000000e+00 +45 7.456000e-02 5.000000e+00 +46 7.656000e-02 5.000000e+00 +47 7.856000e-02 5.000000e+00 +48 8.056000e-02 5.000000e+00 +49 8.256000e-02 5.000000e+00 +50 8.456000e-02 5.000000e+00 +51 8.656000e-02 5.000000e+00 +52 8.856000e-02 5.000000e+00 +53 9.056000e-02 5.000000e+00 +54 9.256000e-02 5.000000e+00 + +Index time sum +-------------------------------------------------------------------------------- +55 9.456000e-02 5.000000e+00 +56 9.656000e-02 5.000000e+00 +57 9.856000e-02 5.000000e+00 +58 1.000000e-01 5.000000e+00 diff --git a/docker-launcher/Examples/counter/counter.cir.out b/docker-launcher/Examples/counter/counter.cir.out new file mode 100644 index 0000000..e69de29 diff --git a/docker-launcher/Examples/counter/counter.proj b/docker-launcher/Examples/counter/counter.proj new file mode 100644 index 0000000..e69de29 diff --git a/docker-launcher/README.md b/docker-launcher/README.md new file mode 100644 index 0000000..20715be --- /dev/null +++ b/docker-launcher/README.md @@ -0,0 +1,229 @@ +# eSim-to-OpenROAD Design Flow Plugin + +> A complete integration bridge that connects **eSim** (schematic capture + mixed-signal simulation) with **OpenROAD** (RTL-to-GDSII physical design), enabling an end-to-end open-source EDA flow — from schematic to silicon layout. + +--- + +## Prerequisites + +| Tool | Version | Install Guide | +|------|---------|--------------| +| **Docker** | Latest | https://docs.docker.com/get-docker/ | +| **Git** | Any | `sudo apt install git` | +| **Ubuntu** | 22.04 | Recommended OS | + +--- + +## Setup Instructions + +### Step 1: Install Docker +```bash +sudo apt-get update +sudo apt-get install -y docker.io +sudo systemctl start docker +sudo systemctl enable docker +sudo usermod -aG docker $USER +``` +> ⚠️ Log out and log back in after adding yourself to the docker group. + +### Step 2: Pull eSim Source +```bash +git clone https://github.com/FOSSEE/eSim.git +cd eSim +``` + +### Step 3: Switch to PR #473 +```bash +git fetch origin pull/473/head:openroad-bridge +git checkout openroad-bridge +``` +> PR #473: https://github.com/FOSSEE/eSim/pull/473 + +### Step 4: Pull OpenROAD Flow Scripts +```bash +git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts.git +cd OpenROAD-flow-scripts +./build_openroad.sh --local +``` +> Full tutorial: https://openroad-flow-scripts.readthedocs.io/en/latest/tutorials/FlowTutorial.html + +### Step 5: Launch eSim +```bash +cd ~/eSim +bash scripts/launcher-esim.sh +``` + +### Step 6: Build Docker Image +```bash +cd docker-launcher +docker build -t esim-openroad:latest . +docker run -it esim-openroad:latest +``` + +--- + +## What Was Modified + +### Source Files (src/maker/) +| File | Change | +|------|--------| +| Maker.py | Added OpenROAD flow trigger logic | +| ModelGeneration.py | Extended model generation for digital cells | +| NgVeri.py | Improved NgVeri to Verilog conversion | +| createkicad.py | Updated KiCad integration | +| netlist_to_verilog.py | Core script: converts SPICE netlist to OpenROAD Verilog | +| OpenROAD.py | OpenROAD bridge module | + +### Scripts +| File | Change | +|------|--------| +| scripts/launcher-esim.sh | Updated launcher with OpenROAD environment setup | +| scripts/setup-esim.sh | Added OpenROAD dependency checks | +| nghdl/install-nghdl-scripts/install-nghdl-22.04.sh | Updated for Ubuntu 22.04 | + +### Library Files +| File | Change | +|------|--------| +| library/kicadLibrary/eSim-symbols/eSim_Ngveri.kicad_sym | Added new symbols for digital flow | +| library/modelParamXML/Ngveri/counter.xml | New counter model | +| library/modelParamXML/Ngveri/fulladder.xml | New full adder model | +| library/modelParamXML/Ngveri/halfwave_rectifier.xml | New halfwave rectifier model | + +### Docker +| File | Change | +|------|--------| +| Dockerfile | Added OpenROAD installation stage | + +### Examples +| Folder | Description | +|--------|-------------| +| Examples/FullAdder/ | Full adder schematic + KiCad project with OpenROAD flow | +| Examples/Half_Adder/ | Half adder with .sdc, .v, config.mk for OpenROAD | +| Examples/counter/ | Counter circuit example | + +--- + +## How the Flow Workscat > ~/eSim-to-OpenROAD_Design_Flow_Plugin/docker-launcher/README.md << 'EOF' +# eSim-to-OpenROAD Design Flow Plugin + +> A complete integration bridge that connects **eSim** (schematic capture + mixed-signal simulation) with **OpenROAD** (RTL-to-GDSII physical design), enabling an end-to-end open-source EDA flow — from schematic to silicon layout. + +--- + +## Prerequisites + +| Tool | Version | Install Guide | +|------|---------|--------------| +| **Docker** | Latest | https://docs.docker.com/get-docker/ | +| **Git** | Any | `sudo apt install git` | +| **Ubuntu** | 22.04 | Recommended OS | + +--- + +## Setup Instructions + +### Step 1: Install Docker +```bash +sudo apt-get update +sudo apt-get install -y docker.io +sudo systemctl start docker +sudo systemctl enable docker +sudo usermod -aG docker $USER +``` +> ⚠️ Log out and log back in after adding yourself to the docker group. + +### Step 2: Pull eSim Source +```bash +git clone https://github.com/FOSSEE/eSim.git +cd eSim +``` + +### Step 3: Switch to PR #473 +```bash +git fetch origin pull/473/head:openroad-bridge +git checkout openroad-bridge +``` +> PR #473: https://github.com/FOSSEE/eSim/pull/473 + +### Step 4: Pull OpenROAD Flow Scripts +```bash +git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts.git +cd OpenROAD-flow-scripts +./build_openroad.sh --local +``` +> Full tutorial: https://openroad-flow-scripts.readthedocs.io/en/latest/tutorials/FlowTutorial.html + +### Step 5: Launch eSim +```bash +cd ~/eSim +bash scripts/launcher-esim.sh +``` + +### Step 6: Build Docker Image +```bash +cd docker-launcher +docker build -t esim-openroad:latest . +docker run -it esim-openroad:latest +``` + +--- + +## What Was Modified + +### Source Files (src/maker/) +| File | Change | +|------|--------| +| Maker.py | Added OpenROAD flow trigger logic | +| ModelGeneration.py | Extended model generation for digital cells | +| NgVeri.py | Improved NgVeri to Verilog conversion | +| createkicad.py | Updated KiCad integration | +| netlist_to_verilog.py | Core script: converts SPICE netlist to OpenROAD Verilog | +| OpenROAD.py | OpenROAD bridge module | + +### Scripts +| File | Change | +|------|--------| +| scripts/launcher-esim.sh | Updated launcher with OpenROAD environment setup | +| scripts/setup-esim.sh | Added OpenROAD dependency checks | +| nghdl/install-nghdl-scripts/install-nghdl-22.04.sh | Updated for Ubuntu 22.04 | + +### Library Files +| File | Change | +|------|--------| +| library/kicadLibrary/eSim-symbols/eSim_Ngveri.kicad_sym | Added new symbols for digital flow | +| library/modelParamXML/Ngveri/counter.xml | New counter model | +| library/modelParamXML/Ngveri/fulladder.xml | New full adder model | +| library/modelParamXML/Ngveri/halfwave_rectifier.xml | New halfwave rectifier model | + +### Docker +| File | Change | +|------|--------| +| Dockerfile | Added OpenROAD installation stage | + +### Examples +| Folder | Description | +|--------|-------------| +| Examples/FullAdder/ | Full adder schematic + KiCad project with OpenROAD flow | +| Examples/Half_Adder/ | Half adder with .sdc, .v, config.mk for OpenROAD | +| Examples/counter/ | Counter circuit example | + +--- + +## How the Flow Works--- + +## Contributors + +| Name | Role | +|------|------| +| Adarsh Raj | Docker Setup, OpenROAD Integration, NgVeri modifications | +| Divinesoumyadip | OpenROAD bridge and GUI integration (PR #473) | +| FOSSEE Team, IIT Bombay | eSim core development | + +--- + +## Links + +- eSim Repository: https://github.com/FOSSEE/eSim +- PR #473: https://github.com/FOSSEE/eSim/pull/473 +- OpenROAD Flow Tutorial: https://openroad-flow-scripts.readthedocs.io/en/latest/tutorials/FlowTutorial.html +- Plugin Repository: https://github.com/FOSSEE/eSim-to-OpenROAD_Design_Flow_Plugin diff --git a/docker-launcher/library/kicadLibrary/eSim-symbols/eSim_Ngveri.kicad_sym b/docker-launcher/library/kicadLibrary/eSim-symbols/eSim_Ngveri.kicad_sym new file mode 100644 index 0000000..0831314 --- /dev/null +++ b/docker-launcher/library/kicadLibrary/eSim-symbols/eSim_Ngveri.kicad_sym @@ -0,0 +1,41 @@ +(kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor(symbol "fulladder" (pin_names (offset 1.016)) (in_bom yes) (on_board yes) +(property "Reference" "U" (id 0) (at 12 15 0)(effects (font (size 1.524 1.524)))) +(property "Value" "fulladder" (id 1) (at 12 18 0)(effects (font (size 1.524 1.524)))) +(property "Footprint" "" (id 2) (at 72.39 49.53 0)(effects (font (size 1.524 1.524)))) +(property "Datasheet" "" (id 3) (at 72.39 49.53 0)(effects (font (size 1.524 1.524)))) +(symbol "fulladder_0_1"(rectangle (start 0 0 ) (end 25.40 11.430 )(stroke (width 0) (type default) (color 0 0 0 0))(fill (type none)))) +(symbol "fulladder_1_1" +(pin input line(at -5.080 8.890 0 )(length 5.08 )(name "a0" (effects(font(size 1.27 1.27))))(number "1" (effects (font (size 1.27 1.27))))) +(pin input line(at -5.080 6.350 0 )(length 5.08 )(name "b0" (effects(font(size 1.27 1.27))))(number "2" (effects (font (size 1.27 1.27))))) +(pin input line(at -5.080 3.810 0 )(length 5.08 )(name "cin0" (effects(font(size 1.27 1.27))))(number "3" (effects (font (size 1.27 1.27))))) +(pin output line(at 30.480 8.890 180 )(length 5.08 )(name "sum0" (effects(font(size 1.27 1.27))))(number "4" (effects (font (size 1.27 1.27))))) +(pin output line(at 30.480 6.350 180 )(length 5.08 )(name "cout0" (effects(font(size 1.27 1.27))))(number "5" (effects (font (size 1.27 1.27))))) +)) +(symbol "halfwave_rectifier" (pin_names (offset 1.016)) (in_bom yes) (on_board yes) +(property "Reference" "U" (id 0) (at 12 15 0)(effects (font (size 1.524 1.524)))) +(property "Value" "halfwave_rectifier" (id 1) (at 12 18 0)(effects (font (size 1.524 1.524)))) +(property "Footprint" "" (id 2) (at 72.39 49.53 0)(effects (font (size 1.524 1.524)))) +(property "Datasheet" "" (id 3) (at 72.39 49.53 0)(effects (font (size 1.524 1.524)))) +(symbol "halfwave_rectifier_0_1"(rectangle (start 0 0 ) (end 25.40 6.350 )(stroke (width 0) (type default) (color 0 0 0 0))(fill (type none)))) +(symbol "halfwave_rectifier_1_1" +(pin input line(at -5.080 3.810 0 )(length 5.08 )(name "in0" (effects(font(size 1.27 1.27))))(number "1" (effects (font (size 1.27 1.27))))) +(pin output line(at 30.480 3.810 180 )(length 5.08 )(name "out0" (effects(font(size 1.27 1.27))))(number "2" (effects (font (size 1.27 1.27))))) +)) + +(symbol "counter" (pin_names (offset 1.016)) (in_bom yes) (on_board yes) +(property "Reference" "U" (id 0) (at 12 15 0)(effects (font (size 1.524 1.524)))) +(property "Value" "counter" (id 1) (at 12 18 0)(effects (font (size 1.524 1.524)))) +(property "Footprint" "" (id 2) (at 72.39 49.53 0)(effects (font (size 1.524 1.524)))) +(property "Datasheet" "" (id 3) (at 72.39 49.53 0)(effects (font (size 1.524 1.524)))) +(symbol "counter_0_1"(rectangle (start 0 0 ) (end 25.40 13.970 )(stroke (width 0) (type default) (color 0 0 0 0))(fill (type none)))) +(symbol "counter_1_1" +(pin input line(at -5.080 11.430 0 )(length 5.08 )(name "clk0" (effects(font(size 1.27 1.27))))(number "1" (effects (font (size 1.27 1.27))))) +(pin input line(at -5.080 8.890 0 )(length 5.08 )(name "reset0" (effects(font(size 1.27 1.27))))(number "2" (effects (font (size 1.27 1.27))))) +(pin output line(at 30.480 11.430 180 )(length 5.08 )(name "count3" (effects(font(size 1.27 1.27))))(number "3" (effects (font (size 1.27 1.27))))) +(pin output line(at 30.480 8.890 180 )(length 5.08 )(name "count2" (effects(font(size 1.27 1.27))))(number "4" (effects (font (size 1.27 1.27))))) +(pin output line(at 30.480 6.350 180 )(length 5.08 )(name "count1" (effects(font(size 1.27 1.27))))(number "5" (effects (font (size 1.27 1.27))))) +(pin output line(at 30.480 3.810 180 )(length 5.08 )(name "count0" (effects(font(size 1.27 1.27))))(number "6" (effects (font (size 1.27 1.27))))) +)) + + +) \ No newline at end of file diff --git a/docker-launcher/library/modelParamXML/Ngveri/counter.xml b/docker-launcher/library/modelParamXML/Ngveri/counter.xml new file mode 100644 index 0000000..b2e93c3 --- /dev/null +++ b/docker-launcher/library/modelParamXML/Ngveri/counter.xml @@ -0,0 +1 @@ +counterNgveri3Add parameters for counter1-V:1-V:4-VEnter Rise Delay (default=1.0e-9)Enter Fall Delay (default=1.0e-9)Enter Input Load (default=1.0e-12)Enter Instance ID (Between 0-99) \ No newline at end of file diff --git a/docker-launcher/library/modelParamXML/Ngveri/fulladder.xml b/docker-launcher/library/modelParamXML/Ngveri/fulladder.xml new file mode 100644 index 0000000..2afd667 --- /dev/null +++ b/docker-launcher/library/modelParamXML/Ngveri/fulladder.xml @@ -0,0 +1 @@ +fulladderNgveri5Add parameters for fulladder1-V:1-V:1-V:1-V:1-VEnter Rise Delay (default=1.0e-9)Enter Fall Delay (default=1.0e-9)Enter Input Load (default=1.0e-12)Enter Instance ID (Between 0-99) \ No newline at end of file diff --git a/docker-launcher/library/modelParamXML/Ngveri/halfwave_rectifier.xml b/docker-launcher/library/modelParamXML/Ngveri/halfwave_rectifier.xml new file mode 100644 index 0000000..36ac8af --- /dev/null +++ b/docker-launcher/library/modelParamXML/Ngveri/halfwave_rectifier.xml @@ -0,0 +1 @@ +halfwave_rectifierNgveri2Add parameters for halfwave_rectifier1-V:1-VEnter Rise Delay (default=1.0e-9)Enter Fall Delay (default=1.0e-9)Enter Input Load (default=1.0e-12)Enter Instance ID (Between 0-99) \ No newline at end of file diff --git a/docker-launcher/nghdl/install-nghdl-scripts/install-nghdl-22.04.sh b/docker-launcher/nghdl/install-nghdl-scripts/install-nghdl-22.04.sh new file mode 100644 index 0000000..80e93e8 --- /dev/null +++ b/docker-launcher/nghdl/install-nghdl-scripts/install-nghdl-22.04.sh @@ -0,0 +1,312 @@ +#!/bin/bash +#========================================================== +# FILE: install-nghdl.sh +# +# USAGE: ./install-nghdl.sh --install +# OR +# ./install-nghdl.sh --uninstall +# +# DESCRIPTION: Installation script for Ngspice, GHDL +# and Verilator simulators (NGHDL) +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: Fahim Khan, Rahul Paknikar, Sumanto Kar, +# Shiva Krishna Sangati, Jayanth Tatineni, Anshul Verma +# ORGANIZATION: eSim, FOSSEE group at IIT Bombay +# CREATED: Tuesday 02 December 2014 17:01 +# REVISION: Monday 23 June 2025 15:20 +#========================================================== + +nghdl="nghdl-simulator" +ghdl="ghdl-4.1.0" +verilator="verilator-4.210" +config_dir="$HOME/.nghdl" +config_file="config.ini" +src_dir=`pwd` + +# Will be used to take backup of any file +sysdate="$(date)" +timestamp=`echo $sysdate|awk '{print $3"_"$2"_"$6"_"$4 }'` + + +# All functions goes here + +error_exit() { + echo -e "\n\nError! Kindly resolve above error(s) and try again." + echo -e "\nAborting Installation...\n" +} + + +function installDependency +{ + + echo "Installing dependencies for $ghdl LLVM................" + + echo "Installing Make..........................................." + sudo apt install -y make + + echo "Installing GNAT..........................................." + sudo apt install -y gnat + + # It will remove older versions of llvm if any + echo "Removing older LLVM........................................" + sudo apt remove -y llvm llvm-dev + + echo "Installing LLVM........................................" + sudo apt install -y llvm llvm-dev + + echo "Installing Clang.........................................." + sudo apt install -y clang + + echo "Installing Zlib1g-dev....................................." + sudo apt install -y zlib1g-dev + + # Specific dependency for canberra-gtk modules + echo "Installing Gtk Canberra modules..........................." + sudo apt install -y libcanberra-gtk-module libcanberra-gtk3-module + + # Specific dependency for nvidia graphic cards + echo "Installing graphics dependency for Ngspice source build" + echo "Installing libxaw7........................................" + sudo apt install -y libxaw7 + + echo "Installing libxaw7-dev...................................." + sudo apt install -y libxaw7-dev + + + echo "Installing dependencies for $verilator...................." + if [[ -n "$(which apt 2> /dev/null)" ]] + then + # Ubuntu + sudo apt install -y make autoconf g++ flex bison + else [[ -n "$(which yum 2> /dev/null)" ]] + # Ubuntu + sudo yum install make autoconf flex bison which -y + sudo yum groupinstall 'Development Tools' -y + fi + +} + + + +function installGHDL +{ + + echo "Installing $ghdl LLVM................................." + tar xvf $ghdl.tar.gz + echo "$ghdl successfully extracted" + echo "Changing directory to $ghdl installation" + cd $ghdl/ + echo "Configuring $ghdl build as per requirements" + chmod +x configure + # Other configure flags can be found at - https://github.com/ghdl/ghdl/blob/master/configure + ./configure --with-llvm-config=/usr/bin/llvm-config + echo "Building the install file for $ghdl LLVM" + make -j$(nproc) + sudo make install + + # set +e # Temporary disable exit on error + # trap "" ERR # Do not trap on error of any command + + # echo "Removing unused part of $ghdl LLVM" + # sudo rm -rf ../$ghdl + + # set -e # Re-enable exit on error + # trap error_exit ERR + + echo "GHDL installed successfully" + cd ../ + +} + + +function installVerilator +{ + + echo "Installing $verilator......................." + tar -xvf $verilator.tar.xz + echo "$verilator successfully extracted" + echo "Changing directory to $verilator installation" + cd $verilator + echo "Configuring $verilator build as per requirements" + chmod +x configure + ./configure + make -j$(nproc) + sudo make install + echo "Removing the unessential verilator files........" + rm -r docs + rm -r examples + rm -r include + rm -r test_regress + rm -r bin + ls -1 | grep -E -v 'config.status|configure.ac|Makefile.in|verilator.1|configure|Makefile|src|verilator.pc' | xargs rm -f + #sudo rm -v -r'!("config.status"|"configure.ac"|"Makefile.in"|"verilator.1"|"configure"|"Makefile"|"src"|"verilator.pc")' + + echo "Verilator installed successfully" + cd ../ + +} + + +function installNGHDL +{ + + echo "Installing NGHDL........................................" + + # Extracting NGHDL to Home Directory + cd $src_dir + tar -xJf $nghdl-source.tar.xz -C $HOME + mv $HOME/$nghdl-source $HOME/$nghdl + + echo "NGHDL extracted sucessfully to $HOME" + # Change to nghdl directory + cd $HOME/$nghdl + # Make local install directory + mkdir -p install_dir + # Make release directory for build + mkdir -p release + # Change to release directory + cd release + echo "Configuring NGHDL..........." + sleep 2 + + chmod +x ../configure + ../configure --enable-xspice --disable-debug --prefix=$HOME/$nghdl/install_dir/ --exec-prefix=$HOME/$nghdl/install_dir/ + + # Adding patch to Ngspice base code + # cp $src_dir/src/outitf.c $HOME/$nghdl/src/frontend + + make -j$(nproc) + make install + + # Make it executable + sudo chmod 755 $HOME/$nghdl/install_dir/bin/ngspice + + set +e # Temporary disable exit on error + trap "" ERR # Do not trap on error of any command + + echo "Removing previously installed Ngspice (if any)" + sudo apt-get purge -y ngspice + + echo "NGHDL installed sucessfully" + echo "Adding softlink for the installed Ngspice" + + # Add symlink to the path + sudo rm /usr/bin/ngspice + + set -e # Re-enable exit on error + trap error_exit ERR + + sudo ln -sf $HOME/$nghdl/install_dir/bin/ngspice /usr/bin/ngspice + echo "Added softlink for Ngspice....." + +} + + +function createConfigFile +{ + + # Creating config.ini file and adding configuration information + # Check if config file is present + if [ -d $config_dir ];then + rm $config_dir/$config_file && touch $config_dir/$config_file + else + mkdir $config_dir && touch $config_dir/$config_file + fi + + echo "[NGHDL]" >> $config_dir/$config_file + echo "NGHDL_HOME = $HOME/$nghdl" >> $config_dir/$config_file + echo "DIGITAL_MODEL = %(NGHDL_HOME)s/src/xspice/icm" >> $config_dir/$config_file + echo "RELEASE = %(NGHDL_HOME)s/release" >> $config_dir/$config_file + echo "[SRC]" >> $config_dir/$config_file + echo "SRC_HOME = $src_dir" >> $config_dir/$config_file + echo "LICENSE = %(SRC_HOME)s/LICENSE" >> $config_dir/$config_file + +} + + +function createSoftLink +{ + # Make it executable + sudo chmod 755 $src_dir/src/ngspice_ghdl.py + + # Creating softlink + cd /usr/local/bin + if [[ -L nghdl ]];then + echo "Symlink was already present" + sudo unlink nghdl + fi + + sudo ln -sf $src_dir/src/ngspice_ghdl.py nghdl + echo "Added softlink for NGHDL....." + + cd $pwd + +} + + +##################################################################### +# Script start from here # +##################################################################### + +### Checking if file is passsed as argument to script + +if [ "$#" -eq 1 ];then + option=$1 +else + echo "USAGE : " + echo "./install-nghdl.sh --install" + exit 1; +fi + +## Checking flags +if [ $option == "--install" ];then + + set -e # Set exit option immediately on error + set -E # inherit ERR trap by shell functions + + # Trap on function error_exit before exiting on error + trap error_exit ERR + + #Calling functions + installDependency + if [ $? -ne 0 ];then + echo -e "\n\n\nERROR: Unable to install required packages. Please check your internet connection.\n\n" + exit 0 + fi + + installGHDL + installVerilator + installNGHDL + createConfigFile + createSoftLink + +elif [ $option == "--uninstall" ];then + sudo rm -rf $HOME/$nghdl $HOME/.nghdl /usr/share/kicad/library/eSim_Nghdl.lib /usr/local/bin/nghdl /usr/bin/ngspice + + echo "Removing GHDL......................" + cd $ghdl/ + sudo make uninstall + cd ../ + sudo rm -rf $ghdl/ + # sudo rm -rf /usr/local/bin/ghdl /usr/local/bin/ghdl1-llvm /usr/local/lib/ghdl /usr/local/lib/libghdlvpi.so /usr/local/include/vpi_user.h + + echo "Removing Verilator................." + cd $verilator/ + sudo make uninstall + cd ../ + sudo rm -rf $verilator/ + + echo "Removing libxaw7-dev..............." + sudo apt purge -y libxaw7-dev + echo "Removing LLVM......................" + sudo apt-get purge -y llvm-${llvm_version} llvm-${llvm_version}-dev + echo "Removing GNAT......................" + sudo apt purge -y gnat +else + echo "Please select the proper operation." + echo "--install" + echo "--uninstall" +fi diff --git a/docker-launcher/scripts/launcher-esim.sh b/docker-launcher/scripts/launcher-esim.sh new file mode 100644 index 0000000..e742856 --- /dev/null +++ b/docker-launcher/scripts/launcher-esim.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# Launcher script for eSim (PR #473 AI Version) +export PYTHONPATH=$HOME/eSim/src:$PYTHONPATH +export QT_LOGGING_RULES="qt5.*=false" + +# Run the local setup script +$HOME/eSim/scripts/setup-esim.sh + +# Move to the FrontEnd folder +cd $HOME/eSim/src/frontEnd + +# Run the Python application +exec python3 ./Application.py "$@" + diff --git a/docker-launcher/scripts/setup-esim.sh b/docker-launcher/scripts/setup-esim.sh new file mode 100644 index 0000000..23c9326 --- /dev/null +++ b/docker-launcher/scripts/setup-esim.sh @@ -0,0 +1,62 @@ +#!/usr/bin/bash +config_dir_esim="$HOME/.esim" +config_dir_nghdl="$HOME/.nghdl" + +config_file="config.ini" +eSim_HOME="/home/adarsh_10811/eSim" +NGHDL_HOME="/home/adarsh_10811/nghdl-simulator" + +# Setup KiCad 6.0 eSim libraries +TARGET="$HOME/.local/kicad/6.0" +FLAG="$TARGET/.esim_kicad_setup_done" + + +# eSim Configuration + +if [ ! -d "$config_dir_esim/.setup_done" ]; then + mkdir -p $config_dir_esim + + echo "[eSim]" > $config_dir_esim/$config_file + echo "eSim_HOME = $eSim_HOME" >> $config_dir_esim/$config_file + echo "LICENSE = %(eSim_HOME)s/LICENSE" >> $config_dir_esim/$config_file + echo "KicadLib = %(eSim_HOME)s/library/kicadLibrary.tar.xz" >> $config_dir_esim/$config_file + echo "IMAGES = %(eSim_HOME)s/images" >> $config_dir_esim/$config_file + echo "VERSION = %(eSim_HOME)s/VERSION" >> $config_dir_esim/$config_file + echo "MODELICA_MAP_JSON = %(eSim_HOME)s/library/ngspicetoModelica/Mapping.json" >> $config_dir_esim/$config_file + + touch "$config_dir_esim/.setup_done" + +fi + + +# nghdl configuration + +if [ ! -d $config_dir_nghdl/.setup_done ]; then + mkdir -p $config_dir_nghdl + + echo "[NGHDL]" > $config_dir_nghdl/$config_file + echo "NGHDL_HOME = $NGHDL_HOME" >> $config_dir_nghdl/$config_file + echo "DIGITAL_MODEL = %(NGHDL_HOME)s/src/xspice/icm" >> $config_dir_nghdl/$config_file + echo "RELEASE = %(NGHDL_HOME)s" >> $config_dir_nghdl/$config_file + echo "[SRC]" >> $config_dir_nghdl/$config_file + echo "SRC_HOME = $NGHDL_HOME" >> $config_dir_nghdl/$config_file + echo "LICENSE = %(SRC_HOME)s/LICENSE" >> $config_dir_nghdl/$config_file + + touch $config_dir_nghdl/.setup_done + +fi + +if [ ! -f "$FLAG" ]; then + echo "Setting up eSim libraries for the first time..." + +# install -d "$TARGET/symbols" + install -d "$TARGET/template" + +# cp -r "$SNAP/3rdparty/symbols/." "$TARGET/symbols/" + cp "$SNAP/3rdparty/template/sym-lib-table" "$TARGET/template/" + + touch "$FLAG" + echo "eSim libraries setup completed." +else + echo "eSim libraries already set up." +fi diff --git a/docker-launcher/src/maker/Maker.py b/docker-launcher/src/maker/Maker.py new file mode 100644 index 0000000..40e01f3 --- /dev/null +++ b/docker-launcher/src/maker/Maker.py @@ -0,0 +1,545 @@ +# ========================================================================= +# FILE: Maker.py +# +# USAGE: --- +# +# DESCRIPTION: This define all components of the Makerchip Tab. +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: Sumanto Kar, sumantokar@iitb.ac.in, FOSSEE, IIT Bombay +# ACKNOWLEDGEMENTS: Rahul Paknikar, rahulp@iitb.ac.in, FOSSEE, IIT Bombay +# Digvijay Singh, digvijay.singh@iitb.ac.in, FOSSEE, IIT Bombay +# Prof. Maheswari R. and Team, VIT Chennai +# GUIDED BY: Steve Hoover, Founder Redwood EDA +# Kunal Ghosh, VLSI System Design Corp.Pvt.Ltd +# Anagha Ghosh, VLSI System Design Corp.Pvt.Ltd +# OTHER CONTRIBUTERS: +# Prof. Madhuri Kadam, Shree L. R. Tiwari College of Engineering +# Rohinth Ram, Madras Institue of Technology +# Charaan S., Madras Institue of Technology +# Nalinkumar S., Madras Institue of Technology +# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay +# CREATED: Monday 29, November 2021 +# REVISION: Tuesday 25, January 2022 +# ========================================================================= + +# importing the files and libraries +import hdlparse.verilog_parser as vlog +from PyQt5 import QtCore, QtWidgets +from PyQt5.QtCore import QThread +from configuration.Appconfig import Appconfig +import os +import watchdog.events +import watchdog.observers +from os.path import expanduser +home = expanduser("~") +# import inotify.adapters + +# declaring the global variables +# verilogfile stores the name of the file +# toggle flag stores the object of the toggling button +verilogFile = [] +toggle_flag = [] + + +# This function is called to accept TOS of makerchip +def makerchipTOSAccepted(display=True): + if not os.path.isfile(home + "/.makerchip_accepted"): + if display: + reply = QtWidgets.QMessageBox.warning( + None, "Terms of Service", "Please review the Makerchip \ + Terms of Service \ + (\ + https://www.makerchip.com/terms/). \ + Have you read and do you \ + accept these Terms of Service?", + QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No + ) + + if reply == QtWidgets.QMessageBox.Yes: + f = open(home + "/.makerchip_accepted", "w") + f.close() + return True + + return False + return True + + +# beginning class Maker. This class create the Maker Tab +class Maker(QtWidgets.QWidget): + + # initailising the varaibles + def __init__(self, filecount): + print(self) + + QtWidgets.QWidget.__init__(self) + self.count = 0 + self.text = "" + self.filecount = filecount + self.entry_var = {} + self.createMakerWidget() + self.obj_Appconfig = Appconfig() + verilogFile.append("") + + # Creating the various components of the Widget(Maker Tab) + def createMakerWidget(self): + + self.grid = QtWidgets.QGridLayout() + self.setLayout(self.grid) + + self.grid.addWidget(self.createoptionsBox(), 0, 0, QtCore.Qt.AlignTop) + self.grid.addWidget(self.creategroup(), 1, 0, 5, 0) + # self.grid.addWidget(self.creategroup(), 1, 0, 5, 0) + self.show() + + # This function is to Add new verilog file + def addverilog(self): + + init_path = '/home/adarsh_10811/eSim/' + if os.name == 'nt': + init_path = '' + self.verilogfile = QtCore.QDir.toNativeSeparators( + QtWidgets.QFileDialog.getOpenFileName( + self, "Open Verilog Directory", + init_path + "home", "*v" + )[0] + ) + if self.verilogfile == "": + self.verilogfile = self.entry_var[0].text() + + if self.verilogfile == "": + reply = QtWidgets.QMessageBox.critical( + None, + "Error Message", + "No Verilog File Chosen. \ + Please choose a verilog file.", + QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel) + + if reply == QtWidgets.QMessageBox.Ok: + self.addverilog() + + if self.verilogfile == "": + return + + self.obj_Appconfig.print_info('Add Verilog File Called') + + elif reply == QtWidgets.QMessageBox.Cancel: + self.obj_Appconfig.print_info('No Verilog File Chosen') + return + + self.text = open(self.verilogfile).read() + self.entry_var[0].setText(self.verilogfile) + self.entry_var[1].setText(self.text) + global verilogFile + + verilogFile[self.filecount] = self.verilogfile + if self.refreshoption in toggle_flag: + toggle_flag.remove(self.refreshoption) + + self.observer = watchdog.observers.Observer() + self.event_handler = Handler( + self.verilogfile, + self.refreshoption, + self.observer) + + self.observer.schedule( + self.event_handler, + path=self.verilogfile, + recursive=True) + self.observer.start() + # self.notify=notify(self.verilogfile,self.refreshoption) + # self.notify.start() + # open("filepath.txt","w").write(self.verilogfile) + + # This function is used to call refresh while + # running Ngspice to Verilog Converter + # (as the original one gets destroyed) + def refresh_change(self): + if self.refreshoption in toggle_flag: + self.toggle = toggle(self.refreshoption) + self.toggle.start() + + # It is used to refresh the file in eSim if its edited anywhere else + def refresh(self): + if not hasattr(self, 'verilogfile'): + return + self.text = open(self.verilogfile).read() + self.entry_var[1].setText(self.text) + print("NgVeri File: " + self.verilogfile + " Refreshed") + self.obj_Appconfig.print_info( + "NgVeri File: " + self.verilogfile + " Refreshed") + self.observer = watchdog.observers.Observer() + self.event_handler = Handler( + self.verilogfile, + self.refreshoption, + self.observer) + + self.observer.schedule( + self.event_handler, + path=self.verilogfile, + recursive=True) + self.observer.start() + # self.notify.start() + global toggle_flag + if self.refreshoption in toggle_flag: + toggle_flag.remove(self.refreshoption) + + # This function is used to save the edited file in eSim + def save(self): + try: + wr = self.entry_var[1].toPlainText() + open(self.verilogfile, "w+").write(wr) + except BaseException as err: + self.msg = QtWidgets.QErrorMessage(self) + self.msg.setModal(True) + self.msg.setWindowTitle("Error Message") + self.msg.showMessage( + "Error in saving verilog file. Please check if it is chosen." + ) + self.msg.exec_() + print("Error in saving verilog file: " + str(err)) + + # This is used to run the makerchip-app + def runmakerchip(self): + init_path = '/home/adarsh_10811/eSim/' + if os.name == 'nt': + init_path = '' + try: + if not makerchipTOSAccepted(True): + return + + print("Running Makerchip IDE...........................") + # self.file = open(self.verilogfile,"w") + # self.file.write(self.entry_var[1].toPlainText()) + # self.file.close() + filename = self.verilogfile + if self.verilogfile.split('.')[-1] != "tlv": + reply = QtWidgets.QMessageBox.warning( + None, + "Do you want to automate the top module? ", + "Click on YES button if you want the top module \ + to be added automatically. A .tlv file will be created \ + in the directory of current verilog file \ + and the Makerchip IDE will be running on \ + this file. Otherwise click on NO button. \ + To not open Makerchip IDE, click on CANCEL button. \ +

NOTE: Makerchip IDE requires an active \ + internet connection and a browser.", + QtWidgets.QMessageBox.Yes + | QtWidgets.QMessageBox.No + | QtWidgets.QMessageBox.Cancel) + if reply == QtWidgets.QMessageBox.Cancel: + return + if reply == QtWidgets.QMessageBox.Yes: + code = open(self.verilogfile).read() + text = code + filename = '.'.join( + self.verilogfile.split('.')[:-1]) + ".tlv" + file = os.path.basename('.'.join( + self.verilogfile.split('.')[:-1])) + f = open(filename, 'w') + code = code.replace(" wire ", " ") + code = code.replace(" reg ", " ") + vlog_ex = vlog.VerilogExtractor() + vlog_mods = vlog_ex.extract_objects_from_source(code) + lint_off = open( + init_path + "library/tlv/lint_off.txt" + ).readlines() + string = '''\\TLV_version 1d: tl-x.org\n\\SV\n''' + for item in lint_off: + string += "/* verilator lint_off " + \ + item.strip("\n") + "*/ " + string += '''\n\n//Your Verilog/System \ +Verilog Code Starts Here:\n''' + \ + text + '''\n\n//Top Module Code \ +Starts here:\n\tmodule top(input \ +logic clk, input logic reset, input logic [31:0] cyc_cnt, \ +output logic passed, output logic failed);\n''' + print(file) + for m in vlog_mods: + if m.name.lower() == file.lower(): + for p in m.ports: + if str( + p.name) != "clk" and str( + p.name) != "reset" and str( + p.name) != "cyc_cnt" and str( + p.name) != "passed" and str( + p.name) != "failed": + string += '\t\tlogic ' + p.data_type\ + + " " + p.name + ";//" + p.mode + "\n" + if m.name.lower() != file.lower(): + QtWidgets.QMessageBox.critical( + None, + "Error Message", + "Error: File name and module \ + name are not same. Please \ + ensure that they are same.", + QtWidgets.QMessageBox.Ok) + + self.obj_Appconfig.print_info( + 'NgVeri stopped due to file \ +name and module name not matching error') + return + string += "//The $random() can be replaced \ +if user wants to assign values\n" + for m in vlog_mods: + if m.name.lower() == file.lower(): + for p in m.ports: + if str( + p.mode) == "input" or str( + p.mode) == "inout": + if str( + p.name) != "clk" and str( + p.name) != "reset" and str( + p.name) != "cyc_cnt" and str( + p.name) != "passed" and str( + p.name) != "failed": + string += '\t\tassign ' + p.name\ + + " = " + "$random();\n" + + for m in vlog_mods: + if m.name.lower() == file.lower(): + string += '\t\t' + m.name + " " + m.name + '(' + i = 0 + for p in m.ports: + i = i + 1 + string += "."+p.name+"("+p.name+")" + if i == len(m.ports): + string += ");\n\t\n\\TLV\n//\ +Add \\TLV here if desired\ + \n\\SV\nendmodule\n\n" + else: + string += ", " + f.write(string) + + self.process = QtCore.QProcess(self) + cmd = 'makerchip ' + filename + print("File: " + filename) + self.process.start(cmd) + print( + "Makerchip IDE command process pid ---------->", + self.process.pid()) + except BaseException as e: + print(e) + self.msg = QtWidgets.QErrorMessage(self) + self.msg.setModal(True) + self.msg.setWindowTitle("Error Message") + self.msg.showMessage( + "Error in running Makerchip IDE. \ +Please check if verilog file is chosen.") + self.msg.exec_() + print("Error in running Makerchip IDE. \ +Please check if verilog file is chosen.") + # initial = self.read_file() + + # while True: + # current = self.read_file() + # if initial != current: + # for line in current: + # if line not in initial: + # print(line) + # initial = current + # self.processfile = QtCore.QProcess(self) + # self.processfile.start("python3 notify.py") + # print(self.processfile.readChannel()) + + # This creates the buttons/options + + def createoptionsBox(self): + + self.optionsbox = QtWidgets.QGroupBox() + self.optionsbox.setTitle("Select Options") + self.optionsgrid = QtWidgets.QGridLayout() + # self.optionsbox2 = QtWidgets.QGroupBox() + # self.optionsbox2.setTitle("Note: Please save the file once edited") + # self.optionsgrid2 = QtWidgets.QGridLayout() + self.optionsgroupbtn = QtWidgets.QButtonGroup() + self.addoptions = QtWidgets.QPushButton("Add Top Level Verilog Model") + self.optionsgroupbtn.addButton(self.addoptions) + self.addoptions.clicked.connect(self.addverilog) + self.optionsgrid.addWidget(self.addoptions, 0, 1) + # self.optionsbox.setLayout(self.optionsgrid) + # self.grid.addWidget(self.creategroup(), 1, 0, 5, 0 + self.refreshoption = QtWidgets.QPushButton("Refresh") + self.optionsgroupbtn.addButton(self.refreshoption) + self.refreshoption.clicked.connect(self.refresh) + self.optionsgrid.addWidget(self.refreshoption, 0, 2) + # self.optionsbox.setLayout(self.optionsgrid) + # self.grid.addWidget(self.creategroup(), 1, 0, 5, 0) + self.saveoption = QtWidgets.QPushButton("Save") + self.optionsgroupbtn.addButton(self.saveoption) + self.saveoption.clicked.connect(self.save) + self.optionsgrid.addWidget(self.saveoption, 0, 3) + # self.optionsbox.setLayout(self.optionsgrid) + # self.grid.addWidget(self.creategroup(), 1, 0, 5, 0) + self.runoptions = QtWidgets.QPushButton("Edit in Makerchip IDE") + self.runoptions.setToolTip( + "Requires internet connection and a browser" + ) + self.runoptions.setToolTipDuration(5000) + self.optionsgroupbtn.addButton(self.runoptions) + self.runoptions.clicked.connect(self.runmakerchip) + self.optionsgrid.addWidget(self.runoptions, 0, 4) + # self.optionsbox.setLayout(self.optionsgrid) + # self.grid.addWidget(self.creategroup(), 1, 0, 5, 0) + if not makerchipTOSAccepted(False): + self.acceptTOS = QtWidgets.QPushButton("Accept Makerchip TOS") + self.optionsgroupbtn.addButton(self.acceptTOS) + self.acceptTOS.clicked.connect(lambda: makerchipTOSAccepted(True)) + self.optionsgrid.addWidget(self.acceptTOS, 0, 5) + # self.optionsbox.setLayout(self.optionsgrid) + # self.grid.addWidget(self.creategroup(), 1, 0, 5, 0) + self.optionsbox.setLayout(self.optionsgrid) + return self.optionsbox + + # This function adds the other parts of widget like text box + def creategroup(self): + self.trbox = QtWidgets.QGroupBox() + self.trbox.setTitle(".tlv file") + # self.trbox.setDisabled(True) + # self.trbox.setVisible(False) + self.trgrid = QtWidgets.QGridLayout() + self.trbox.setLayout(self.trgrid) + + self.start = QtWidgets.QLabel("Path to .tlv file") + self.trgrid.addWidget(self.start, 1, 0) + self.count = 0 + self.entry_var[self.count] = QtWidgets.QLabel() + self.trgrid.addWidget(self.entry_var[self.count], 1, 1) + self.entry_var[self.count].setMaximumWidth(1000) + self.count += 1 + + # CSS + self.trbox.setStyleSheet(" \ + QGroupBox { border: 1px solid gray; border-radius: \ + 9px; margin-top: 0.5em; } \ + QGroupBox::title { subcontrol-origin: margin; left: \ + 10px; padding: 0 3px 0 3px; } \ + ") + + self.start = QtWidgets.QLabel(".tlv code") + # self.start2 = QtWidgets.QLabel("Note: \ + # Please save the file once edited") + # self.start2.setStyleSheet("background-color: red") + self.trgrid.addWidget(self.start, 2, 0) + # self.trgrid.addWidget(self.start2, 3,0) + self.entry_var[self.count] = QtWidgets.QTextEdit() + self.trgrid.addWidget(self.entry_var[self.count], 2, 1) + self.entry_var[self.count].setMaximumWidth(1000) + self.entry_var[self.count].setMaximumHeight(1000) + # self.entry_var[self.count].textChanged.connect(self.save) + self.count += 1 + + # CSS + self.trbox.setStyleSheet(" \ + QGroupBox { border: 1px solid gray; border-radius: \ + 9px; margin-top: 0.5em; } \ + QGroupBox::title { subcontrol-origin: margin; left: \ + 10px; padding: 0 3px 0 3px; } \ + ") + + return self.trbox + + +# The Handler class is used to create a watch on the files using WatchDog +class Handler(watchdog.events.PatternMatchingEventHandler): + # this function initialisses the variable and the objects of watchdog + def __init__(self, verilogfile, refreshoption, observer): + # Set the patterns for PatternMatchingEventHandler + watchdog.events.PatternMatchingEventHandler.__init__( + self, ignore_directories=True, case_sensitive=False) + self.verilogfile = verilogfile + self.refreshoption = refreshoption + self.obj_Appconfig = Appconfig() + self.observer = observer + self.toggle = toggle(self.refreshoption) + + # if a file is modified, toggle starts to toggle the refresh button + def on_modified(self, event): + print("Watchdog received modified event - % s." % event.src_path) + msg = QtWidgets.QErrorMessage() + msg.setWindowTitle("eSim Message") + msg.showMessage( + "NgVeri File: " + + self.verilogfile + + " modified. Please click on Refresh") + msg.exec_() + print("NgVeri File: " + self.verilogfile + + " modified. Please click on Refresh") + # self.obj_Appconfig.print_info("NgVeri File:\ + # "+self.verilogfile+" modified. Please click on Refresh") + global toggle_flag + if self.refreshoption not in toggle_flag: + toggle_flag.append(self.refreshoption) + # i.rm_watch() + self.observer.stop() + self.toggle.start() + + +# class notify(QThread): +# def __init__(self,verilogfile,refreshoption):#,obj_Appconfig): +# QThread.__init__(self) +# self.verilogfile=verilogfile +# self.refreshoption=refreshoption +# self.obj_Appconfig = Appconfig() +# self.toggle=toggle(self.refreshoption) + + +# def __del__(self): +# self.wait() + +# def run(self): +# i = inotify.adapters.Inotify() + +# i.add_watch(self.verilogfile) + +# for event in i.event_gen(): +# if not self.refreshoption.isVisible(): +# break +# if event!=None: +# print(event) +# if "IN_CLOSE_WRITE" in event[1] : +# msg = QtWidgets.QErrorMessage() +# msg.setModal(True) +# msg.setWindowTitle("eSim Message") +# msg.showMessage( +# "NgVeri File: "+self.verilogfile+"\ +# modified. Please click on Refresh") +# msg.exec_() +# print("NgVeri File: "+self.verilogfile+"\ +# modified. Please click on Refresh") +# # self.obj_Appconfig.print_info("NgVeri File: \ +# "+self.verilogfile+" modified. Please click on Refresh") +# global toggle_flag +# toggle_flag.append(self.refreshoption) +# #i.rm_watch() +# self.toggle.start() +# break + + +# This class is used to toggle a button(change colour by toggling) +class toggle(QThread): + # initialising the threads + def __init__(self, option): + QThread.__init__(self) + self.option = option + + def __del__(self): + self.wait() + + # running the thread to toggle + def run(self): + + while True: + self.option.setStyleSheet("background-color: red") + self.sleep(1) + self.option.setStyleSheet("background-color: none") + self.sleep(1) + print(toggle_flag) + if not self.option.isVisible(): + break + if self.option not in toggle_flag: + break diff --git a/docker-launcher/src/maker/ModelGeneration.py b/docker-launcher/src/maker/ModelGeneration.py new file mode 100644 index 0000000..db2cebb --- /dev/null +++ b/docker-launcher/src/maker/ModelGeneration.py @@ -0,0 +1,1270 @@ +# ========================================================================= +# FILE: ModelGeneration.py +# +# USAGE: --- +# +# DESCRIPTION: This define all model generation processes of NgVeri. +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: Sumanto Kar, sumantokar@iitb.ac.in, FOSSEE, IIT Bombay +# ACKNOWLEDGEMENTS: Rahul Paknikar, rahulp@iitb.ac.in, FOSSEE, IIT Bombay +# Digvijay Singh, digvijay.singh@iitb.ac.in, FOSSEE, IIT Bombay +# Prof. Maheswari R. and Team, VIT Chennai +# GUIDED BY: Steve Hoover, Founder Redwood EDA +# Kunal Ghosh, VLSI System Design Corp.Pvt.Ltd +# Anagha Ghosh, VLSI System Design Corp.Pvt.Ltd +# OTHER CONTRIBUTERS: +# Prof. Madhuri Kadam, Shree L. R. Tiwari College of Engineering +# Rohinth Ram, Madras Institue of Technology +# Charaan S., Madras Institue of Technology +# Nalinkumar S., Madras Institue of Technology +# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay +# CREATED: Monday 29, November 2021 +# REVISION: Tuesday 2nd, September 2023 +# ========================================================================= + + +import re +import os +from PyQt5 import QtCore, QtWidgets +from configparser import ConfigParser +from configuration import Appconfig + +from . import createkicad +import hdlparse.verilog_parser as vlog + + +class ModelGeneration(QtWidgets.QWidget): + ''' + Class is used to generate the Ngspice Model + ''' + def __init__(self, file, termedit): + QtWidgets.QWidget.__init__(self) + super().__init__() + self.obj_Appconfig = Appconfig.Appconfig() + print("Argument is : ", file) + + if os.name == 'nt': + self.file = file.replace('\\', '/') + else: + self.file = file + + self.termedit = termedit + self.cur_dir = os.getcwd() + self.fname = os.path.basename(file) + self.fname = self.fname.lower() + print("Verilog/SystemVerilog/TL Verilog filename is : ", self.fname) + + if os.name == 'nt': + self.home = os.path.join('library', 'config') + else: + self.home = os.path.expanduser('~') + + self.parser = ConfigParser() + self.parser.read(os.path.join( + self.home, os.path.join('.nghdl', 'config.ini'))) + self.nghdl_home = self.parser.get('NGHDL', 'NGHDL_HOME') + self.release_dir = self.parser.get('NGHDL', 'RELEASE') + self.src_home = self.parser.get('SRC', 'SRC_HOME') + self.licensefile = self.parser.get('SRC', 'LICENSE') + self.digital_home = self.parser.get( + 'NGHDL', 'DIGITAL_MODEL') + "/Ngveri" + + def verilogfile(self): + ''' + Reading the file and performing operations and + copying it in the Ngspice folder + ''' + Text = "" + Text += ".................Running NgVeri..................." + Text += "" + self.termedit.append(Text) + + read_verilog = open(self.file, 'r') + verilog_data = read_verilog.readlines() + read_verilog.close() + self.modelpath = self.digital_home + \ + "/" + self.fname.split('.')[0] + "/" + if not os.path.isdir(self.modelpath): + os.mkdir(self.modelpath) + + if self.fname.split('.')[1] == "tlv": + self.sandpiper() + read_verilog = open(self.modelpath + self.fname, 'r') + verilog_data = read_verilog.readlines() + read_verilog.close() + f = open(self.modelpath + self.fname, 'w') + + for item in verilog_data: + if self.fname.split('.')[1] == "sv": + string = item.replace("top", self.fname.split('.')[0]) + else: + string = item + f.write(string) + f.write("\n") + f.close() + + def sandpiper(self): + ''' + This function calls the sandpiper to convert .tlv file to .sv file + ''' + init_path = '/home/adarsh_10811/eSim/' + if os.name == 'nt': + init_path = '' + # Text="Running Sandpiper............" + print("Running Sandpiper-Saas for TLV to SV Conversion") + self.cmd = "cp " + init_path + "library/tlv/clk_gate.v " + \ + init_path + "library/tlv/pseudo_rand.sv " + \ + init_path + "library/tlv/sandpiper.vh " + \ + init_path + "library/tlv/sandpiper_gen.vh " + \ + init_path + "library/tlv/sp_default.vh " + \ + init_path + "library/tlv/pseudo_rand_gen.sv " + \ + init_path + "library/tlv/pseudo_rand.m4out.tlv " + \ + self.file + " " + self.modelpath + + self.process = QtCore.QProcess(self) + self.args = ['-c', self.cmd] + self.process.start('sh', self.args) + self.termedit.append("Command: " + self.cmd) + self.process \ + .readyReadStandardOutput.connect(self.readAllStandard) + self.process.waitForFinished(50000) + print("Copied the files required for TLV successfully") + self.cur_dir = os.getcwd() + print("Running Sandpiper............") + os.chdir(self.modelpath) + self.cmd = "sandpiper-saas -i " + \ + self.fname.split('.')[0] + ".tlv -o "\ + + self.fname.split('.')[0] + ".sv" + # self.args = ['-c', self.cmd] + # self.process.start('sh', self.args) + self.process.start(self.cmd) + self.termtitle("RUN SANDPIPER-SAAS") + self.termtext("Current Directory: " + self.modelpath) + self.termtext("Command: " + self.cmd) + # self.process.setProcessChannelMode(QtCore.QProcess.MergedChannels) + self.process \ + .readyReadStandardOutput.connect(self.readAllStandard) + self.process \ + .readyReadStandardError.connect(self.readAllStandard) + self.process.waitForFinished(50000) + print("Ran Sandpiper successfully") + os.chdir(self.cur_dir) + self.fname = self.fname.split('.')[0] + ".sv" + + def verilogParse(self): + ''' + This function parses the module name and + input/output ports of verilog code using HDL parse + and writes to the "connection_info.txt". + ''' + with open(self.modelpath + self.fname, 'rt') as fh: + code = fh.read() + + code = code.replace("wire", " ") + code = code.replace("reg", " ") + + header_re = re.compile(r'module\s+\w+\s*\((.*?)\)\s*;', re.S) + def _split_ports(match): + # add a newline after every comma that is inside the header + return match.group(0).replace(',', ',\n') + code = header_re.sub(_split_ports, code) + vlog_ex = vlog.VerilogExtractor() + vlog_mods = vlog_ex.extract_objects_from_source(code) + f = open(self.modelpath + "connection_info.txt", 'w') + for m in vlog_mods: + if m.name.lower() == self.fname.split('.')[0]: + print(str(m.name) + " " + self.fname.split('.')[0]) + for p in m.ports: + print(p.data_type) + if str(p.data_type).find(':') == -1: + p.port_number = "1" + else: + x = p.data_type.split(":") + print(x) + y = x[0].split("[") + z = x[1].split("]") + z = int(y[1]) - int(z[0]) + p.port_number = z + 1 + + for m in vlog_mods: + if m.name.lower() == self.fname.split('.')[0]: + m.name = m.name.lower() + print('Module "{}":'.format(m.name)) + for p in m.generics: + print('\t{:20}{:8}{}'.format(p.name, p.mode, p.data_type)) + print(' Ports:') + for p in m.ports: + print( + '\t{:20}{:8}{}'.format( + p.name, p.mode, p.port_number)) + f.write( + '\t{:20}{:8}{}\n'.format( + p.name, p.mode, p.port_number)) + break + f.close() + if m.name.lower() != self.fname.split(".")[0]: + QtWidgets.QMessageBox.critical( + None, + "Error Message", + "Error: File name and module \ + name are not same. Please ensure that they are same", + QtWidgets.QMessageBox.Ok) + + self.obj_Appconfig.print_info( + 'NgVeri stopped due to file \ + name and module name not matching error') + return "Error" + modelname = str(m.name) + schematicLib = createkicad.AutoSchematic() + schematicLib.init(modelname, self.modelpath) + error = schematicLib.createKicadSymbol() + if error == "Error": + return "Error" + return "No Error" + + def getPortInfo(self): + ''' + This function is used to get the port information + from "connection_info.txt" + ''' + readfile = open(self.modelpath + 'connection_info.txt', 'r') + data = readfile.readlines() + self.input_list = [] + self.output_list = [] + for line in data: + if re.match(r'^\s*$', line): + pass + else: + in_items = re.findall( + "INPUT", line, re.MULTILINE | re.IGNORECASE + ) + inout_items = re.findall( + "INOUT", line, re.MULTILINE | re.IGNORECASE + ) + out_items = re.findall( + "OUTPUT", line, re.MULTILINE | re.IGNORECASE + ) + if in_items: + self.input_list.append(line.split()) + if inout_items: + self.input_list.append(line.split()) + if out_items: + self.output_list.append(line.split()) + + self.input_port = [] + self.output_port = [] + + # creating list of input and output port with its weight + for input in self.input_list: + self.input_port.append(input[0] + ":" + input[2]) + for output in self.output_list: + self.output_port.append(output[0] + ":" + output[2]) + + def cfuncmod(self): + ''' + This function is used to create the "cfunc.mod" file + in Ngspice folder automatically. + ''' + + # ############# Creating content for cfunc.mod file ############## # + + print("Starting With cfunc.mod file") + cfunc = open(self.modelpath + 'cfunc.mod', 'w') + print("Building content for cfunc.mod file") + + comment = '''/* This cfunc.mod file auto generated by gen_con_info.py + Developed by Sumanto, Rahul at IIT Bombay */\n + ''' + + header = ''' + #include + #include + #include + #include "sim_main_''' + self.fname.split('.')[0] + '''.h" + + ''' + + function_open = ( + '''void cm_''' + self.fname.split('.')[0] + '''(ARGS) \n{''') + + digital_state_output = [] + for item in self.output_port: + digital_state_output.append( + "Digital_State_t *_op_" + item.split(':')[0] + + ", *_op_" + item.split(':')[0] + "_old;" + ) + + var_section = ''' + static int inst_count=0; + int count=0; + ''' + + # Start of INIT function + init_start_function = ''' + if(INIT) + { + inst_count++; + PARAM(instance_id)=inst_count; + foo_''' + self.fname.split('.')[0] + '''(0,inst_count); + /* Allocate storage for output ports \ +and set the load for input ports */ + + ''' + port_init = [] + for i, item in enumerate(self.input_port + self.output_port): + port_init.append(self.fname.split('.')[0] + '''_port_''' + + item.split(':')[0] + '''=PORT_SIZE(''' + + item.split(':')[0] + '''); +''') + + cm_event_alloc = [] + cm_count_output = 0 + for item in self.output_port: + cm_event_alloc.append( + "cm_event_alloc(" + + str(cm_count_output) + "," + item.split(':')[1] + + "*sizeof(Digital_State_t));" + ) + cm_count_output = cm_count_output + 1 + + load_in_port = [] + for item in self.input_port: + load_in_port.append( + "for(Ii=0;Ii + #include + #include "V''' + self.fname.split('.')[0] + '''.h" + #include + #include + #include + #include + #include + #include + #include + using namespace std; + ''' + + extern_var = [] + for i, item in enumerate(self.input_port + self.output_port): + extern_var.append(''' + extern "C" int ''' + self.fname.split('.')[0] + + '''_temp_''' + item.split(':')[0] + '''[1024]; + extern "C" int ''' + self.fname.split('.')[0] + + '''_port_''' + item.split(':')[0] + ''';''') + + extern_var.append(''' + extern "C" int foo_''' + self.fname.split('.')[0] + '''(int,int); + ''') + convert_func = ''' + void int2arr''' + self.fname.split('.')[0] + \ + '''(int num, int array[], int n) + { + for (int i = 0; i < n && num>=0; i++) + { + array[n-i-1] = num % 2; + num /= 2; + } + } + int arr2int''' + self.fname.split('.')[0] + '''(int array[],int n) + { + int i,k=0; + for (i = 0; i < n; i++) + k = 2 * k + array[i]; + return k; + } + ''' + foo_func = ''' + int foo_''' + self.fname.split('.')[0] + '''(int init,int count) + { + int argc=1; + const char* argv[]={"fullverbose"}; + Verilated::commandArgs(argc, argv); + static VerilatedContext* contextp = new VerilatedContext; + static V''' + self.fname.split('.')[0] + "* " + \ + self.fname.split('.')[0] + '''[1024]; + count--; + if (init==0) + { + ''' + self.fname.split('.')[0] + '''[count]=new V''' + \ + self.fname.split('.')[0] + '''{contextp}; + contextp->traceEverOn(true); + } + else + { + contextp->timeInc(1); + printf("=============''' + self.fname.split('.')[0] + \ + ''' : New Iteration==========="); + printf("\\nInstance : %d\\n",count); + printf("\\nInside foo before eval.....\\n"); +''' + + before_eval = [] + after_eval = [] + for i, item in enumerate(self.input_port + self.output_port): + before_eval.append( + '''\t\t\t\tprintf("''' + + item.split(':')[0] + + '''=%d\\n", ''' + + self.fname.split('.')[0] + + '''[count] ->''' + + item.split(':')[0] + + ''');\n''') + for i, item in enumerate(self.input_port): + + before_eval.append( + '''\t\t\t\t''' + + self.fname.split('.')[0] + + '''[count]->''' + + item.split(':')[0] + + ''' = arr2int''' + + self.fname.split('.')[0] + + '''(''' + self.fname.split('.')[0] + '''_temp_''' + + item.split(':')[0] + + ''', ''' + self.fname.split('.')[0] + '''_port_''' + + item.split(':')[0] + + ''');\n''') + before_eval.append( + "\t\t\t\t" + + self.fname.split('.')[0] + + "[count]->eval();\n") + + after_eval.append(''' + printf("\\nInside foo after eval.....\\n");\n''') + for i, item in enumerate(self.input_port + self.output_port): + after_eval.append( + '''\t\t\t\tprintf("''' + + item.split(':')[0] + + '''=%d\\n", ''' + + self.fname.split('.')[0] + + '''[count] ->''' + + item.split(':')[0] + + ''');\n''') + + for i, item in enumerate(self.output_port): + after_eval.append( + "\t\t\t\tint2arr" + + self.fname.split('.')[0] + + "(" + + self.fname.split('.')[0] + + '''[count] -> ''' + + item.split(':')[0] + + ''', ''' + self.fname.split('.')[0] + '''_temp_''' + + item.split(':')[0] + + ''', ''' + self.fname.split('.')[0] + '''_port_''' + + item.split(':')[0] + + ''');\n''') + after_eval.append(''' + } + return 0; + }''') + + csim.write(comment) + csim.write(header) + for item in extern_var: + csim.write(item) + csim.write(convert_func) + csim.write(foo_func) + + for item in before_eval: + csim.write(item) + for item in after_eval: + csim.write(item) + csim.close() + + def modpathlst(self): + ''' + This function creates modpathlst in Ngspice folder. + ''' + print("Editing modpath.lst file") + mod = open(self.digital_home + '/modpath.lst', 'r') + text = mod.read() + mod.close() + mod = open(self.digital_home + '/modpath.lst', 'a+') + if not self.fname.split('.')[0] in text: + mod.write(self.fname.split('.')[0] + "\n") + mod.close() + + def run_verilator(self): + ''' + This function is used to run the Verilator + using the verilator commands. + ''' + init_path = '/home/adarsh_10811/eSim/' + if os.name == 'nt': + init_path = '' + + self.cur_dir = os.getcwd() + wno = " " + with open(init_path + "library/tlv/lint_off.txt") as file: + for item in file.readlines(): + if item and item.strip(): + wno += " -Wno-" + item.strip("\n") + + print("Running Verilator.............") + os.chdir(self.modelpath) + self.release_home = self.parser.get('NGHDL', 'RELEASE') + # print(self.modelpath) + + if os.name == 'nt': + self.msys_home = self.parser.get('COMPILER', 'MSYS_HOME') + self.cmd = "export VERILATOR_ROOT=" + self.msys_home + "/mingw64; " + else: + self.cmd = '' + + # self.cmd = self.cmd + "verilator -Wall " + wno + " \ + # --cc --exe --no-MMD --Mdir . -CFLAGS -fPIC sim_main_" + \ + # self.fname.split('.')[0] + ".cpp " + self.fname + self.cmd = self.cmd + "verilator --stats -O3 -CFLAGS\ + -O3 -LDFLAGS \"-static\" --x-assign fast \ + --x-initial fast --noassert --bbox-sys -Wall " + wno + "\ + --cc --exe --no-MMD --Mdir . -CFLAGS\ + -fPIC -output-split 0 sim_main_" + \ + self.fname.split('.')[0] + ".cpp --autoflush \ + -DBSV_RESET_FIFO_HEAD -DBSV_RESET_FIFO_ARRAY " + self.fname + self.process = QtCore.QProcess(self) + self.process.readyReadStandardOutput.connect(self.readAllStandard) + self.process.start('sh', ['-c', self.cmd]) + self.termtitle("RUN VERILATOR") + self.termtext("Current Directory: " + self.modelpath) + self.termtext("Command: " + self.cmd) + # self.process.setProcessChannelMode(QtCore.QProcess.MergedChannels) + self.process \ + .readyReadStandardOutput.connect(self.readAllStandard) + self.process \ + .readyReadStandardError.connect(self.readAllStandard) + self.process.waitForFinished(50000) + print("Verilator Executed") + os.chdir(self.cur_dir) + + def make_verilator(self): + ''' + Running make verilator using this function + ''' + self.cur_dir = os.getcwd() + print("Make Verilator.............") + os.chdir(self.modelpath) + + if os.path.exists(self.modelpath + "../verilated.o"): + os.remove(self.modelpath + "../verilated.o") + + if os.name == 'nt': + # path to msys home directory + self.msys_home = self.parser.get('COMPILER', 'MSYS_HOME') + self.cmd = self.msys_home + "/mingw64/bin/mingw32-make.exe" + else: + self.cmd = "make" + + self.cmd = self.cmd + " -f V" + self.fname.split('.')[0]\ + + ".mk V" + self.fname.split( + '.')[0] + "__ALL.a sim_main_" \ + + self.fname.split('.')[0] + ".o ../verilated.o" + self.process = QtCore.QProcess(self) + self.process.readyReadStandardOutput.connect(self.readAllStandard) + self.process.start('sh', ['-c', self.cmd]) + self.termtitle("MAKE VERILATOR") + self.termtext("Current Directory: " + self.modelpath) + self.termtext("Command: " + self.cmd) + self.process \ + .readyReadStandardOutput.connect(self.readAllStandard) + self.process \ + .readyReadStandardError.connect(self.readAllStandard) + self.process.waitForFinished(50000) + + print("Make Verilator Executed") + os.chdir(self.cur_dir) + + def copy_verilator(self): + ''' + This function copies the verilator files/object files from + "src/xspice/icm/Ngveri/ to release/src/xspice/icm/Ngveri/" + ''' + self.cur_dir = os.getcwd() + print("Copying the required files to Release Folder.............") + os.chdir(self.modelpath) + self.release_home = self.parser.get('NGHDL', 'RELEASE') + path_icm = self.release_home + "/src/xspice/icm/Ngveri/" + if not os.path.isdir(path_icm + self.fname.split('.')[0]): + os.mkdir(path_icm + self.fname.split('.')[0]) + path_icm = path_icm + self.fname.split('.')[0] + if os.path.exists( + path_icm + + "sim_main_" + + self.fname.split('.')[0] + + ".o"): + os.remove(path_icm + "sim_main_" + self.fname.split('.')[0] + ".o") + if os.path.exists( + self.release_home + + "src/xspice/icm/Ngveri/" + + "verilated.o"): + os.remove( + self.release_home + "/src/xspice/icm/Ngveri/" + "verilated.o" + ) + if os.path.exists( + path_icm + + "V" + + self.fname.split('.')[0] + + "__ALL.o"): + os.remove(path_icm + "V" + self.fname.split('.')[0] + "__ALL.o") + # print(self.modelpath) + try: + self.cmd = "cp sim_main_" + \ + self.fname.split('.')[0] + ".o V" + \ + self.fname.split('.')[0] + "__ALL.o " + path_icm + self.process = QtCore.QProcess(self) + self.args = ['-c', self.cmd] + self.process \ + .readyReadStandardOutput.connect(self.readAllStandard) + self.process \ + .readyReadStandardError.connect(self.readAllStandard) + self.process.start('sh', self.args) + self.termtitle("COPYING FILES") + self.termtext("Current Directory: " + self.modelpath) + self.termtext("Command: " + self.cmd) + self.process.waitForFinished(50000) + self.cmd = "cp ../verilated.o " + self.release_home \ + + "/src/xspice/icm/Ngveri/" + self.process.start('sh', ['-c', self.cmd]) + self.termtext("Command: " + self.cmd) + self.process \ + .readyReadStandardOutput.connect(self.readAllStandard) + self.process.waitForFinished(50000) + print("Copied the files") + os.chdir(self.cur_dir) + except BaseException: + print("There is error in Copying Files ") + + def runMake(self): + ''' + Running the make command for Ngspice + ''' + print("run Make Called") + self.release_home = self.parser.get('NGHDL', 'RELEASE') + path_icm = os.path.join(self.release_home, "src/xspice/icm") + os.chdir(path_icm) + + try: + if os.name == 'nt': + # path to msys home directory + self.msys_home = self.parser.get('COMPILER', 'MSYS_HOME') + self.cmd = self.msys_home + "/mingw64/bin/mingw32-make.exe" + else: + self.cmd = "make" + + print("Running Make command in " + path_icm) + self.process = QtCore.QProcess(self) + self.process.start('sh', ['-c', self.cmd]) + print("make command process pid ---------- >", self.process.pid()) + + self.termtitle("MAKE COMMAND") + self.termtext("Current Directory: " + path_icm) + self.termtext("Command: " + self.cmd) + self.process \ + .readyReadStandardOutput.connect(self.readAllStandard) + self.process \ + .readyReadStandardError.connect(self.readAllStandard) + self.process.waitForFinished(50000) + os.chdir(self.cur_dir) + except BaseException: + print("There is error in 'make' ") + + def runMakeInstall(self): + ''' + Running the make install command for Ngspice + ''' + self.cur_dir = os.getcwd() + print("run Make Install Called") + self.release_home = self.parser.get('NGHDL', 'RELEASE') + path_icm = os.path.join(self.release_home, "src/xspice/icm") + os.chdir(path_icm) + + try: + if os.name == 'nt': + self.msys_home = self.parser.get('COMPILER', 'MSYS_HOME') + self.cmd = self.msys_home + \ + "/mingw64/bin/mingw32-make.exe install" + else: + self.cmd = "make install" + print("Running Make Install") + try: + self.process.close() + except BaseException: + pass + + self.process = QtCore.QProcess(self) + self.process.start('sh', ['-c', self.cmd]) + # text="" + self.termtitle("MAKE INSTALL COMMAND") + self.termtext("Current Directory: " + path_icm) + self.termtext("Command: " + self.cmd) + self.process \ + .readyReadStandardOutput.connect(self.readAllStandard) + self.process \ + .readyReadStandardError.connect(self.readAllStandard) + self.process.waitForFinished(50000) + os.chdir(self.cur_dir) + + except BaseException as e: + print(e) + print("There is error in 'make install' ") + + def addfile(self): + ''' + This function is used to add additional files + required by the verilog top module. + ''' + print("Adding the files required by the top level module file") + + init_path = '/home/adarsh_10811/eSim/' + if os.name == 'nt': + init_path = '' + + includefile = QtCore.QDir.toNativeSeparators( + QtWidgets.QFileDialog.getOpenFileName( + self, + "Open adding other necessary files to be included", + init_path + "home")[0]) + + if includefile == "": + reply = QtWidgets.QMessageBox.critical( + None, "Error Message", + "Error: No File Chosen. Please chose a file", + QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel + ) + + if reply == QtWidgets.QMessageBox.Ok: + self.addfile() + + if includefile == "": + return + + self.obj_Appconfig.print_info('Add Other Files Called') + + elif reply == QtWidgets.QMessageBox.Cancel: + self.obj_Appconfig.print_info('No File Chosen') + return + + filename = os.path.basename(includefile) + self.modelpath = self.digital_home + \ + "/" + self.fname.split('.')[0] + "/" + + if not os.path.isdir(self.modelpath): + os.mkdir(self.modelpath) + text = open(includefile).read() + text = text + '\n' + f = open(self.modelpath + filename, 'w') + for item in text: + f.write(item) + f.write("\n") + f.close() + print("Added the File:" + filename) + self.termtitle("Added the File:" + filename) + + def addfolder(self): + ''' + This function is used to add additional folder required + by the verilog top module + ''' + # self.cur_dir = os.getcwd() + print("Adding the folder required by the top level module file") + + includefolder = QtCore.QDir.toNativeSeparators( + QtWidgets.QFileDialog.getExistingDirectory( + self, "open", "home" + ) + ) + + if includefolder == "": + reply = QtWidgets.QMessageBox.critical( + None, "Error Message", + "Error: No Folder Chosen. Please chose a folder", + QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel + ) + + if reply == QtWidgets.QMessageBox.Ok: + self.addfolder() + + if includefolder == "": + return + + self.obj_Appconfig.print_info('Add Folder Called') + + elif reply == QtWidgets.QMessageBox.Cancel: + self.obj_Appconfig.print_info('No Folder Chosen') + return + + self.modelpath = self.digital_home + \ + "/" + self.fname.split('.')[0] + "/" + + reply = QtWidgets.QMessageBox.question( + None, "Message", + '''If you want only the contents\ + of the folder to be added press "Yes".\ + If you want complete folder \ + to be added, press "No". ''', + QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No + ) + if reply == QtWidgets.QMessageBox.Yes: + self.cmd = "cp -a " + includefolder + "/. " + self.modelpath + self.obj_Appconfig.print_info('Adding Contents of the Folder') + elif reply == QtWidgets.QMessageBox.No: + self.cmd = "cp -R " + includefolder + " " + self.modelpath + self.obj_Appconfig.print_info('Adding the Folder') + + print("Adding the Folder:" + includefolder.split('/')[-1]) + self.termtitle("Adding the Folder:" + includefolder.split('/')[-1]) + + self.process = QtCore.QProcess(self) + self.process.start('sh', ['-c', self.cmd]) + self.termtext("Command: " + self.cmd) + self.process \ + .readyReadStandardOutput.connect(self.readAllStandard) + self.process.waitForFinished(50000) + print("Added the folder") + # os.chdir(self.cur_dir) + + def termtitle(self, textin): + ''' + This function is used to print the titles + in the terminal of Ngveri tab. + ''' + Text = "" + Text += "
================================
" + Text += textin + Text += "
================================
" + Text += "
" + self.termedit.append(Text) + + def termtext(self, textin): + ''' + This function is used to print the text/commands + in the terminal of Ngveri tab. + ''' + Text = "" + Text += textin + Text += "" + self.termedit.append(Text) + + @QtCore.pyqtSlot() + def readAllStandard(self): + ''' + This function reads all the standard output data and + the errors from the process that are being run. + ''' + # self.termedit = termedit + # self.termedit.append(str(self.process.readAll().data(),\ + # encoding='utf-8')) + stdoutput = self.process.readAll() + TextStdOut = "" + for line in str(stdoutput.data(), encoding='utf-8').split("\n"): + TextStdOut += "
" + line + TextStdOut += "
" + self.termedit.append(TextStdOut) + # print(str(self.process.readAll().data(), encoding='utf-8')) + + stderror = self.process.readAllStandardError() + if stderror.toUpper().contains(b"ERROR"): + self.errorFlag = True + TextErr = "" + for line in str(stderror.data(), encoding='utf-8').split("\n"): + TextErr += "
" + line + TextErr += "
" + self.termedit.append(TextErr) + + # @QtCore.pyqtSlot() + # def readAllStandard(self): + # #self.termedit = termedit + # self.termedit.append(str(self.process.\ + # readAll().data(), encoding='utf-8')) + + # print(str(self.process.readAll().data(), encoding='utf-8')) + # stderror = self.process.readAllStandardError() + # if stderror.toUpper().contains(b"ERROR"): + # self.errorFlag = True + # Text = "" + # for line in str(stderror.data(), encoding='utf-8').split("\n"): + # Text += "
"+line+"
" + # Text += "
" + # self.termedit.append(Text+"\n") + + # init_path = '/home/adarsh_10811/eSim/' + # if os.name == 'nt': + # init_path = '' + # includefile = QtCore.QDir.toNativeSeparators(\ + # QtWidgets.QFileDialog.getOpenFileName( + # self, "Open adding other necessary files to be included", + # init_path + "home" + # )[0] + # ) + # if includefile=="": + # reply=QtWidgets.QMessageBox.critical( + # None, "Error Message", + # "Error: No File Chosen. Please chose a file", + # QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel + # ) + # if reply == QtWidgets.QMessageBox.Ok: + # self.addfile() + # self.obj_Appconfig.print_info('Add Other Files Called') + + # elif reply == QtWidgets.QMessageBox.Cancel: + # self.obj_Appconfig.print_info('No File Chosen') + # filename = os.path.basename(includefile) + # self.modelpath=self.digital_home+"/"+self.fname.split('.')[0]+"/" + + # if not os.path.isdir(self.modelpath): + # os.mkdir(self.modelpath) + # text = open(includefile).read() + # open(self.modelpath+filename,'w').write(text) + # includefile.close() diff --git a/docker-launcher/src/maker/NgVeri.py b/docker-launcher/src/maker/NgVeri.py new file mode 100644 index 0000000..bc37781 --- /dev/null +++ b/docker-launcher/src/maker/NgVeri.py @@ -0,0 +1,443 @@ +# ========================================================================= +# FILE: NgVeri.py +# +# USAGE: --- +# +# DESCRIPTION: This define all components of the NgVeri Tab. +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: Sumanto Kar, sumantokar@iitb.ac.in, FOSSEE, IIT Bombay +# ACKNOWLEDGEMENTS: Rahul Paknikar, rahulp@iitb.ac.in, FOSSEE, IIT Bombay +# Digvijay Singh, digvijay.singh@iitb.ac.in, FOSSEE, IIT Bombay +# Prof. Maheswari R. and Team, VIT Chennai +# GUIDED BY: Steve Hoover, Founder Redwood EDA +# Kunal Ghosh, VLSI System Design Corp.Pvt.Ltd +# Anagha Ghosh, VLSI System Design Corp.Pvt.Ltd +# OTHER CONTRIBUTERS: +# Prof. Madhuri Kadam, Shree L. R. Tiwari College of Engineering +# Rohinth Ram, Madras Institue of Technology +# Charaan S., Madras Institue of Technology +# Nalinkumar S., Madras Institue of Technology +# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay +# CREATED: Monday 29, November 2021 +# REVISION: Tuesday 25, January 2022 +# ========================================================================= + + +# importing the files and libraries +from PyQt5 import QtCore, QtWidgets +from . import Maker +from . import ModelGeneration +import os +import shutil +from configuration.Appconfig import Appconfig +from configparser import ConfigParser + + +class NgVeri(QtWidgets.QWidget): + ''' + This class create the NgVeri Tab + ''' + def __init__(self, filecount): + QtWidgets.QWidget.__init__(self) + # Maker.addverilog(self) + self.obj_Appconfig = Appconfig() + + if os.name == 'nt': + self.home = os.path.join('library', 'config') + else: + self.home = os.path.expanduser('~') + + self.parser = ConfigParser() + self.parser.read(os.path.join( + self.home, os.path.join('.nghdl', 'config.ini'))) + self.nghdl_home = self.parser.get('NGHDL', 'NGHDL_HOME') + self.release_dir = self.parser.get('NGHDL', 'RELEASE') + self.src_home = self.parser.get('SRC', 'SRC_HOME') + self.licensefile = self.parser.get('SRC', 'LICENSE') + self.digital_home = self.parser.get('NGHDL', 'DIGITAL_MODEL') + self.digital_home = self.digital_home + "/Ngveri" + self.count = 0 + self.text = "" + self.entry_var = {} + self.createNgveriWidget() + self.fname = "" + self.filecount = filecount + + def createNgveriWidget(self): + ''' + Creating the various components of the Widget(Ngveri Tab) + ''' + self.grid = QtWidgets.QGridLayout() + self.setLayout(self.grid) + + self.grid.addWidget(self.createoptionsBox(), 0, 0, QtCore.Qt.AlignTop) + self.grid.addWidget(self.creategroup(), 1, 0, 5, 0) + + self.show() + + def addverilog(self): + ''' + Adding the verilog file in Maker tab to Ngveri Tab automatically + ''' + # b=Maker.Maker(self) + print(Maker.verilogFile) + if Maker.verilogFile[self.filecount] == "": + reply = QtWidgets.QMessageBox.critical( + None, + "Error Message", + "Error: No Verilog File Chosen. \ + Please choose a verilog file in Makerchip Tab", + QtWidgets.QMessageBox.Ok) + if reply == QtWidgets.QMessageBox.Ok: + self.obj_Appconfig.print_error( + 'No Verilog File Chosen. ' + 'Please choose a verilog file in Makerchip Tab' + ) + return + + self.fname = Maker.verilogFile[self.filecount] + currentTermLogs = QtWidgets.QTextEdit() + model = ModelGeneration.ModelGeneration(self.fname, currentTermLogs) + file = (os.path.basename(self.fname)).split('.')[0] + if self.entry_var[1].findText(file) == -1: + self.entry_var[1].addItem(file) + + if not Maker.makerchipTOSAccepted(True): + QtWidgets.QMessageBox.warning( + None, "Warning Message", + "Please accept the Makerchip Terms of Service " + "to proceed further.", + QtWidgets.QMessageBox.Ok + ) + + return + + try: + model.verilogfile() + error = model.verilogParse() + if error != "Error": + model.getPortInfo() + model.cfuncmod() + model.ifspecwrite() + model.sim_main_header() + model.sim_main() + model.modpathlst() + model.run_verilator() + model.make_verilator() + model.copy_verilator() + model.runMake() + + if os.name != 'nt': + model.runMakeInstall() + else: + try: + shutil.copy( + self.release_dir + + "/src/xspice/icm/Ngveri/Ngveri.cm", + self.nghdl_home + "/lib/ngspice/" + ) + except FileNotFoundError as err: + currentTermLogs.append( + "Error in copying Ngveri code model: " + str(err) + ) + + if "error" not in currentTermLogs.toPlainText().lower(): + currentTermLogs.append(''' +

Model Created Successfully! +

+ ''') + + except BaseException as err: + currentTermLogs.append( + "Error in Ngspice code model generation " + + "from Verilog: " + str(err) + ) + + if "error" in currentTermLogs.toPlainText().lower(): + currentTermLogs.append(''' +

There was an error during model creation, +
Please rectify the error and try again! +

+ ''') + + self.entry_var[0].append(currentTermLogs.toHtml()) + + # Force scroll the terminal widget at bottom + self.entry_var[0].verticalScrollBar().setValue( + self.entry_var[0].verticalScrollBar().maximum() + ) + + def addfile(self): + ''' + This function is used to add additional files required + by the verilog top module + ''' + if len(Maker.verilogFile) < (self.filecount + 1): + reply = QtWidgets.QMessageBox.critical( + None, + "Error Message", + "Error: No Verilog File Chosen. \ + Please choose a verilog file in Makerchip Tab", + QtWidgets.QMessageBox.Ok) + if reply == QtWidgets.QMessageBox.Ok: + self.obj_Appconfig.print_error( + 'No Verilog File Chosen. Please choose \ + a verilog file in Makerchip Tab') + return + + self.fname = Maker.verilogFile[self.filecount] + model = ModelGeneration.ModelGeneration(self.fname, self.entry_var[0]) + # model.verilogfile() + model.addfile() + + def addfolder(self): + ''' + This function is used to add additional folder required + by the verilog top module. + ''' + if len(Maker.verilogFile) < (self.filecount + 1): + reply = QtWidgets.QMessageBox.critical( + None, + "Error Message", + "Error: No Verilog File Chosen. \ + Please choose a verilog file in Makerchip Tab", + QtWidgets.QMessageBox.Ok) + if reply == QtWidgets.QMessageBox.Ok: + self.obj_Appconfig.print_error( + 'No Verilog File Chosen. Please choose \ + a verilog file in Makerchip Tab') + return + self.fname = Maker.verilogFile[self.filecount] + model = ModelGeneration.ModelGeneration(self.fname, self.entry_var[0]) + # model.verilogfile() + model.addfolder() + + def clearTerminal(self): + ''' + This function is used to clear the terminal + ''' + self.entry_var[0].setText("") + + def createoptionsBox(self): + ''' + This function is used to create buttons/options + ''' + self.optionsbox = QtWidgets.QGroupBox() + self.optionsbox.setTitle("Select Options") + self.optionsgrid = QtWidgets.QGridLayout() + + self.optionsgroupbtn = QtWidgets.QButtonGroup() + + self.addverilogbutton = QtWidgets.QPushButton( + "Convert Verilog to Ngspice") + self.addverilogbutton.setToolTip( + "Requires internet connection for converting TL-Verilog models" + ) + self.addverilogbutton.setToolTipDuration(5000) + self.optionsgroupbtn.addButton(self.addverilogbutton) + self.addverilogbutton.clicked.connect(self.addverilog) + self.optionsgrid.addWidget(self.addverilogbutton, 0, 1) + # self.optionsbox.setLayout(self.optionsgrid) + # self.grid.addWidget(self.creategroup(), 1, 0, 5, 0) + + self.addfilebutton = QtWidgets.QPushButton("Add dependency files") + self.optionsgroupbtn.addButton(self.addfilebutton) + self.addfilebutton.clicked.connect(self.addfile) + self.optionsgrid.addWidget(self.addfilebutton, 0, 2) + # self.optionsbox.setLayout(self.optionsgrid) + # self.grid.addWidget(self.creategroup(), 1, 0, 5, 0) + + self.addfolderbutton = QtWidgets.QPushButton("Add dependency folder") + self.optionsgroupbtn.addButton(self.addfolderbutton) + self.addfolderbutton.clicked.connect(self.addfolder) + self.optionsgrid.addWidget(self.addfolderbutton, 0, 3) + # self.optionsbox.setLayout(self.optionsgrid) + # self.grid.addWidget(self.creategroup(), 1, 0, 5, 0) + + self.clearTerminalBtn = QtWidgets.QPushButton("Clear Terminal") + self.optionsgroupbtn.addButton(self.clearTerminalBtn) + self.clearTerminalBtn.clicked.connect(self.clearTerminal) + self.optionsgrid.addWidget(self.clearTerminalBtn, 0, 4) + self.optionsbox.setLayout(self.optionsgrid) + # self.grid.addWidget(self.creategroup(), 1, 0, 5, 0) + + return self.optionsbox + + def edit_modlst(self, text): + ''' + This is used to remove models in modlst of Ngspice folder if + the user wants to remove a model. Note: files do not get removed. + ''' + if text == "Remove Verilog Models": + return + index = self.entry_var[1].findText(text) + self.entry_var[1].removeItem(index) + self.entry_var[1].setCurrentIndex(0) + ret = QtWidgets.QMessageBox.warning( + None, "Warning", '''Do you want to remove the model: ''' + + text, + QtWidgets.QMessageBox.Ok, QtWidgets.QMessageBox.Cancel + ) + if ret == QtWidgets.QMessageBox.Ok: + mod = open(self.digital_home + '/modpath.lst', 'r') + data = mod.readlines() + mod.close() + + data.remove(text + "\n") + mod = open(self.digital_home + '/modpath.lst', 'w') + for item in data: + mod.write(item) + self.fname = Maker.verilogFile[self.filecount] + model = ModelGeneration.ModelGeneration( + self.fname, self.entry_var[0]) + + try: + model.runMake() + + if os.name != 'nt': + model.runMakeInstall() + else: + shutil.copy( + self.release_dir + "/src/xspice/icm/Ngveri/Ngveri.cm", + self.nghdl_home + "/lib/ngspice/" + ) + except BaseException as err: + QtWidgets.QMessageBox.critical( + None, "Error Message", + "The verilog model '" + str(text) + + "' could not be removed: " + str(err), + QtWidgets.QMessageBox.Ok + ) + + def lint_off_edit(self, text): + ''' + This is to remove lint_off comments needed by the verilator warnings. + This function writes to the lint_off.txt in the library/tlv folder. + ''' + init_path = '/home/adarsh_10811/eSim/' + if os.name == 'nt': + init_path = '' + + if text == "Remove lint_off": + return + index = self.entry_var[2].findText(text) + self.entry_var[2].removeItem(index) + self.entry_var[2].setCurrentIndex(0) + ret = QtWidgets.QMessageBox.warning( + None, + "Warning", + '''Do you want to remove the lint off error: ''' + + text, + QtWidgets.QMessageBox.Ok, + QtWidgets.QMessageBox.Cancel) + + if ret == QtWidgets.QMessageBox.Ok: + try: + file_path = os.path.join(init_path, "library/tlv/lint_off.txt") + with open(file_path, 'r') as file: + data = file.readlines() + data = [line for line in data if line.strip() != text] + with open(file_path, 'w') as file: + file.writelines(data) + + except Exception as e: + QtWidgets.QMessageBox.warning( + None, + "Warning", + f"Could not remove lint_off entry '{text}'", + QtWidgets.QMessageBox.Ok + ) + + def add_lint_off(self): + ''' + This is to add lint_off comments needed by the verilator warnings. + This function writes to the lint_off.txt in the library/tlv folder. + ''' + init_path = '/home/adarsh_10811/eSim/' + if os.name == 'nt': + init_path = '' + + text = self.entry_var[3].text() + + if self.entry_var[2].findText(text) == -1: + self.entry_var[2].addItem(text) + file = open(init_path + "library/tlv/lint_off.txt", 'a+') + file.write(text + "\n") + file.close() + self.entry_var[3].setText("") + + def creategroup(self): + ''' + Creates various other groups like terminal, remove modlst, + remove lint_off and add lint_off + ''' + self.trbox = QtWidgets.QGroupBox() + self.trbox.setTitle("Terminal") + # self.trbox.setDisabled(True) + # self.trbox.setVisible(False) + self.trgrid = QtWidgets.QGridLayout() + self.trbox.setLayout(self.trgrid) + self.count = 0 + + self.start = QtWidgets.QLabel("Terminal") + # self.trgrid.addWidget(self.start, 2,0) + self.entry_var[self.count] = QtWidgets.QTextEdit() + self.entry_var[self.count].setReadOnly(1) + self.trgrid.addWidget(self.entry_var[self.count], 1, 1, 5, 3) + self.entry_var[self.count].setMaximumWidth(1000) + self.entry_var[self.count].setMaximumHeight(1000) + self.count += 1 + + self.entry_var[self.count] = QtWidgets.QComboBox() + self.entry_var[self.count].addItem("Remove Verilog Models") + self.modlst = open(self.digital_home + '/modpath.lst', 'r') + self.data = self.modlst.readlines() + self.modlst.close() + for item in self.data: + if item != "\n": + self.entry_var[self.count].addItem(item.strip()) + self.entry_var[self.count].activated[str].connect(self.edit_modlst) + self.trgrid.addWidget(self.entry_var[self.count], 1, 4, 1, 2) + self.count += 1 + self.entry_var[self.count] = QtWidgets.QComboBox() + self.entry_var[self.count].addItem("Remove lint_off") + + init_path = '/home/adarsh_10811/eSim/' + if os.name == 'nt': + init_path = '' + self.lint_off = open(init_path + "library/tlv/lint_off.txt", 'r') + + self.data = self.lint_off.readlines() + self.lint_off.close() + for item in self.data: + if item != "\n": + self.entry_var[self.count].addItem(item.strip()) + self.entry_var[self.count].activated[str].connect(self.lint_off_edit) + self.trgrid.addWidget(self.entry_var[self.count], 2, 4, 1, 2) + self.count += 1 + self.entry_var[self.count] = QtWidgets.QLineEdit(self) + self.trgrid.addWidget(self.entry_var[self.count], 3, 4) + self.entry_var[self.count].setMaximumWidth(100) + self.count += 1 + self.entry_var[self.count] = QtWidgets.QPushButton("Add lint_off") + self.entry_var[self.count].setMaximumWidth(100) + self.trgrid.addWidget(self.entry_var[self.count], 3, 5) + self.entry_var[self.count].clicked.connect(self.add_lint_off) + + self.count += 1 + + # CSS + self.trbox.setStyleSheet(" \ + QGroupBox { border: 1px solid gray; border-radius: \ + 9px; margin-top: 0.5em; } \ + QGroupBox::title { subcontrol-origin: margin; left: \ + 10px; padding: 0 3px 0 3px; } \ + ") + + return self.trbox diff --git a/docker-launcher/src/maker/OpenROAD.py b/docker-launcher/src/maker/OpenROAD.py new file mode 100644 index 0000000..fa00026 --- /dev/null +++ b/docker-launcher/src/maker/OpenROAD.py @@ -0,0 +1,63 @@ +import os +import subprocess +from PyQt5 import QtWidgets + +class OpenROADLogic: + def __init__(self, project_path): + """ + Initialize with the project path from eSim. + """ + self.project_path = project_path + self.project_name = os.path.basename(project_path) + + def run(self): + """ + Main execution flow: Netlist -> Verilog -> OpenROAD Synthesis + """ + print(f"\n[OpenROAD Flow] Initiating for: {self.project_name}") + + # 1. Define Absolute Paths + # Using expanduser("~") ensures it works for /home/soumy/ on any machine + home_dir = os.path.expanduser("~") + + # Path to your Netlist-to-Verilog script from Task 1 + script_path = os.path.join(home_dir, "eSim", "src", "maker", "netlist_to_verilog.py") + + # Path to the circuit netlist inside the project folder + netlist_path = os.path.join(self.project_path, f"{self.project_name}.cir.out") + + # 2. Validation Check + if not os.path.exists(netlist_path): + print(f"[Error] Netlist not found at: {netlist_path}") + QtWidgets.QMessageBox.critical( + None, "Error", + "Netlist (.cir.out) not found!\n\nPlease run 'Convert KiCad to Ngspice' first." + ) + return + + # 3. Trigger the actual conversion script using Subprocess + try: + print(f"[OpenROAD] Executing: python3 {script_path} {netlist_path}") + + # This line officially bridges eSim to your Verilog converter + result = subprocess.run(['python3', script_path, netlist_path], capture_output=True, text=True) + + if result.returncode == 0: + print(f"[Success] {result.stdout}") + QtWidgets.QMessageBox.information( + None, "Success", + f"Verilog conversion successful for '{self.project_name}'!\n\nReady for OpenROAD synthesis." + ) + else: + print(f"[Script Error] {result.stderr}") + QtWidgets.QMessageBox.warning( + None, "Script Error", + f"The conversion script failed:\n\n{result.stderr}" + ) + + except Exception as e: + print(f"[System Error] {str(e)}") + QtWidgets.QMessageBox.critical( + None, "Execution Error", + f"Could not trigger the conversion script:\n{str(e)}" + ) \ No newline at end of file diff --git a/docker-launcher/src/maker/createkicad.py b/docker-launcher/src/maker/createkicad.py new file mode 100644 index 0000000..562fd5e --- /dev/null +++ b/docker-launcher/src/maker/createkicad.py @@ -0,0 +1,379 @@ +# ============================================================================== +# FILE: createkicad.py +# +# USAGE: --- +# +# DESCRIPTION: This define all components of to create the Kicad Library. +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: Sumanto Kar, sumantokar@iitb.ac.in, FOSSEE, IIT Bombay +# ACKNOWLEDGEMENTS: Rahul Paknikar, rahulp@iitb.ac.in, FOSSEE, IIT Bombay +# Digvijay Singh, digvijay.singh@iitb.ac.in, FOSSEE, IIT Bombay +# Prof. Maheswari R. and Team, VIT Chennai +# GUIDED BY: Steve Hoover, Founder Redwood EDA +# Kunal Ghosh, VLSI System Design Corp.Pvt.Ltd +# Anagha Ghosh, VLSI System Design Corp.Pvt.Ltd +# OTHER CONTRIBUTERS: +# Prof. Madhuri Kadam, Shree L. R. Tiwari College of Engineering +# Rohinth Ram, Madras Institue of Technology +# Charaan S., Madras Institue of Technology +# Nalinkumar S., Madras Institue of Technology +# Partha Singha Roy, Kalyani Government Engineering College +# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay +# CREATED: Monday 29, November 2021 +# REVISION: Friday 16, June 2023 +# ============================================================================== + +from . import Appconfig +import re +import os +import xml.etree.cElementTree as ET +from PyQt5 import QtWidgets + + +class AutoSchematic: + def init(self, modelname, modelpath): + self.App_obj = Appconfig.Appconfig() + self.modelname = modelname.split('.')[0] + self.template = self.App_obj.kicad_sym_template.copy() + self.xml_loc = self.App_obj.xml_loc + self.lib_loc = self.App_obj.lib_loc + self.modelpath = modelpath + if os.name == 'nt': + eSim_src = self.App_obj.src_home + inst_dir = eSim_src.replace('\\eSim', '') + self.kicad_ngveri_sym = \ + inst_dir + '/KiCad/share/kicad/symbols/eSim_Ngveri.kicad_sym' + else: + self.kicad_ngveri_sym = \ + os.path.join(self.App_obj.src_home, 'library/kicadLibrary/eSim-symbols/eSim_Ngveri.kicad_sym') + # self.parser = self.App_obj.parser_ngveri + + def createKicadSymbol(self): + ''' + creating KiCad library using this function + ''' + xmlFound = None + for root, dirs, files in os.walk(self.xml_loc): + if (str(self.modelname) + '.xml') in files: + xmlFound = root + print(xmlFound) + break + + if xmlFound is None: + self.getPortInformation() + self.createXML() + self.createSym() + + elif (xmlFound == os.path.join(self.xml_loc, 'Ngveri')): + print('Library already exists...') + ret = QtWidgets.QMessageBox.warning( + None, "Warning", '''Library files for this model''' + + ''' already exist. Do you want to overwrite it?
+ If yes press ok, else cancel it and ''' + + '''change the name of your verilog model.''', + QtWidgets.QMessageBox.Ok, QtWidgets.QMessageBox.Cancel + ) + + if ret == QtWidgets.QMessageBox.Ok: + print("Overwriting existing libraries") + self.getPortInformation() + self.createXML() + self.removeOldLibrary() # Removes the existing library + self.createSym() + else: + print("Library Creation Cancelled") + return "Error" + + else: + print('Pre-existing library...') + ret = QtWidgets.QMessageBox.critical( + self.parent, "Error", '''A standard library already ''' + + '''exists with this name.
Please change the ''' + + '''name of your verilog model and add it again.''', + QtWidgets.QMessageBox.Ok + ) + + def getPortInformation(self): + ''' + getting the port information here + ''' + portInformation = PortInfo(self, self.modelpath) + portInformation.getPortInfo() + self.portInfo = portInformation.bit_list + self.input_length = portInformation.input_len + self.portName = portInformation.port_name + + def createXML(self): + ''' + creating the XML files at `library/modelParamXML/Ngveri` + ''' + cwd = os.getcwd() + xmlDestination = os.path.join(self.xml_loc, 'Ngveri') + self.splitText = "" + for bit in self.portInfo[:-1]: + self.splitText += bit + "-V:" + self.splitText += self.portInfo[-1] + "-V" + + print("changing directory to ", xmlDestination) + os.chdir(xmlDestination) + + root = ET.Element("model") + ET.SubElement(root, "name").text = self.modelname + ET.SubElement(root, "type").text = "Ngveri" + ET.SubElement(root, "node_number").text = str(len(self.portInfo)) + ET.SubElement(root, "title").text = ( + "Add parameters for " + str(self.modelname)) + ET.SubElement(root, "split").text = self.splitText + param = ET.SubElement(root, "param") + ET.SubElement(param, "rise_delay", default="1.0e-9").text = ( + "Enter Rise Delay (default=1.0e-9)") + ET.SubElement(param, "fall_delay", default="1.0e-9").text = ( + "Enter Fall Delay (default=1.0e-9)") + ET.SubElement(param, "input_load", default="1.0e-12").text = ( + "Enter Input Load (default=1.0e-12)") + ET.SubElement(param, "instance_id", default="1").text = ( + "Enter Instance ID (Between 0-99)") + + tree = ET.ElementTree(root) + tree.write(str(self.modelname) + '.xml') + print("Leaving the directory ", xmlDestination) + os.chdir(cwd) + + def findBlockSize(self): + ''' + Calculates the maximum between input and output ports + ''' + ind = self.input_length + return max( + self.char_sum(self.portInfo[:ind]), + self.char_sum(self.portInfo[ind:]) + ) + + def char_sum(self, ls): + return sum([int(x) for x in ls]) + + def removeOldLibrary(self): + ''' + removing the old library + ''' + cwd = os.getcwd() + os.chdir(self.lib_loc) + print("Changing directory to ", self.lib_loc) + sym_file = open(self.kicad_ngveri_sym) + lines = sym_file.readlines() + sym_file.close() + lines = lines[0:-2] + output = [] + line_reading_flag = False + + for line in lines: + if line.startswith("(symbol"): # Eeschema Template start + if line.split()[1] == f"\"{self.modelname}\"": + line_reading_flag = True + if not line_reading_flag: + output.append(line) + if line.startswith("))"): # Eeschema Template end + line_reading_flag = False + + sym_file = open(self.kicad_ngveri_sym, 'w') + for line in output: + sym_file.write(line) + + os.chdir(cwd) + print("Leaving directory, ", self.lib_loc) + + def createSym(self): + ''' + creating the symbol + (pins snapped to KiCad-6 grid) + ''' + self.grid = 0.635 + self.dist_port = 4 * self.grid # Distance between two ports # 100 mil (= 2.54 mm) + self.inc_size = self.dist_port # Increment size of a block (mil) + def snap(val): + snapped = round(float(val) / self.grid) * self.grid + return f"{snapped:.3f}" + cwd = os.getcwd() + os.chdir(self.lib_loc) + print("Changing directory to ", self.lib_loc) + + # Removing ")" from "eSim_Ngveri.kicad_sym" + file = open(self.kicad_ngveri_sym, "r") + content_file = file.read() + new_content_file = content_file[:-2] + file.close() + file = open(self.kicad_ngveri_sym, "w") + file.write(new_content_file) + file.close() + + # Appending new schematic block + sym_file = open(self.kicad_ngveri_sym, "a") + line1 = self.template["start_def"] + line1 = line1.split() + line1 = [w.replace('comp_name', self.modelname) for w in line1] + self.template["start_def"] = ' '.join(line1) + + if os.stat(self.kicad_ngveri_sym).st_size == 0: + sym_file.write( + "(kicad_symbol_lib (version 20211014) " + + "(generator kicad_symbol_editor)" + + "\n\n" + ) # Eeschema starter code + + # sym_file.write("#encoding utf-8"+ "\n"+ "#"+ "\n" + + # "#test_compo" + "\n"+ "#"+ "\n") + sym_file.write( + self.template["start_def"] + "\n" + self.template["U_field"] + "\n" + ) + + line3 = self.template["comp_name_field"] + line3 = line3.split() + line3 = [w.replace('comp_name', self.modelname) for w in line3] + self.template["comp_name_field"] = ' '.join(line3) + + sym_file.write(self.template["comp_name_field"] + "\n") + + line4 = self.template["blank_field"] + line4_1 = line4[0] + line4_2 = line4[1] + line4_1 = line4_1.split() + line4_1 = [w.replace('blank_quotes', '""') for w in line4_1] + line4_2 = line4_2.split() + line4_2 = [w.replace('blank_quotes', '""') for w in line4_2] + line4[0] = ' '.join(line4_1) + line4[1] = ' '.join(line4_2) + self.template["blank_qoutes"] = line4 + + sym_file.write(line4[0] + "\n" + line4[1] + "\n") + + draw_pos = self.template["draw_pos"] + draw_pos = draw_pos.split() + + draw_pos = \ + [w.replace('comp_name', f"{self.modelname}_0_1") for w in draw_pos] + draw_pos[8] = snap(float(draw_pos[8]) + # previously it is (-) + float(self.findBlockSize() * self.inc_size)) + draw_pos_rec = draw_pos[8] + + self.template["draw_pos"] = ' '.join(draw_pos) + + sym_file.write( + self.template["draw_pos"] + "\n" + self.template["start_draw"] + + " \"" + f"{self.modelname}_1_1\"" + "\n" + ) + + input_port = self.template["input_port"] + input_port = input_port.split() + output_port = self.template["output_port"] + output_port = output_port.split() + input_port[3] = snap(float(input_port[3])) + output_port[3] = snap(float(output_port[3])) + inputs = self.portInfo[0: self.input_length] + outputs = self.portInfo[self.input_length:] + inputName = [] + outputName = [] + + for i in range(self.input_length): + for j in range(int(inputs[i])): + inputName.append( + self.portName[i] + str(int(inputs[i]) - j - 1)) + + for i in range(self.input_length, len(self.portName)): + for j in range(int(outputs[i - self.input_length])): + outputName.append( + self.portName[i] + + str(int(outputs[i - self.input_length]) - j - 1)) + + inputs = self.char_sum(inputs) + outputs = self.char_sum(outputs) + + total = inputs + outputs + + port_list = [] + + # Set input & output port + input_port[4] = draw_pos_rec + output_port[4] = draw_pos_rec + + j = 0 + for i in range(total): + if (i < inputs): + input_port[9] = f"\"{inputName[i]}\"" + input_port[13] = f"\"{str(i + 1)}\"" + input_port[4] = \ + snap(float(input_port[4]) - float(self.dist_port)) + input_list = ' '.join(input_port) + port_list.append(input_list) + j = j + 1 + + else: + output_port[9] = f"\"{outputName[i - inputs]}\"" + output_port[13] = f"\"{str(i + 1)}\"" + output_port[4] = \ + snap(float(output_port[4]) - float(self.dist_port)) + output_list = ' '.join(output_port) + port_list.append(output_list) + + for ports in port_list: + sym_file.write(ports + "\n") + sym_file.write( + self.template["end_draw"] + "\n\n\n"+")" + ) + sym_file.close() + os.chdir(cwd) + + +class PortInfo: + ''' + The class contains port information + ''' + def __init__(self, model, modelpath): + self.modelname = model.modelname + self.bit_list = [] + self.port_name = [] + self.input_len = 0 + self.modelpath = modelpath + + def getPortInfo(self): + ''' + getting the port information from `connection_info.txt` + ''' + input_list = [] + output_list = [] + read_file = open(self.modelpath + 'connection_info.txt', 'r') + data = read_file.readlines() + # print(data) + read_file.close() + + for line in data: + if re.match(r'^\s*$', line): + pass + else: + in_items = re.findall( + "INPUT", line, re.MULTILINE | re.IGNORECASE + ) + inout_items = re.findall( + "INOUT", line, re.MULTILINE | re.IGNORECASE + ) + + out_items = re.findall( + "OUTPUT", line, re.MULTILINE | re.IGNORECASE + ) + if in_items: + input_list.append(line.split()) + if inout_items: + input_list.append(line.split()) + if out_items: + output_list.append(line.split()) + + for in_list in input_list: + self.bit_list.append(in_list[2]) + self.port_name.append(in_list[0]) + self.input_len = len(self.bit_list) + for out_list in output_list: + self.bit_list.append(out_list[2]) + self.port_name.append(out_list[0]) diff --git a/docker-launcher/src/maker/netlist_to_verilog.py b/docker-launcher/src/maker/netlist_to_verilog.py new file mode 100644 index 0000000..0bab50b --- /dev/null +++ b/docker-launcher/src/maker/netlist_to_verilog.py @@ -0,0 +1,289 @@ +import os +import re +import sys +import shutil +import subprocess + + +# ───────────────────────────────────────────────────────────── +# UTILITY FUNCTIONS +# ───────────────────────────────────────────────────────────── + +def fail(message, code=1): + print(f"[✗] {message}", file=sys.stderr) + sys.exit(code) + + +def write_file(path, content): + os.makedirs(os.path.dirname(path), exist_ok=True) + with open(path, "w", encoding="utf-8") as f: + f.write(content) + + +def normalize_module_name(name): + """ + Preserves original case (Halfwave_Rectifier stays Halfwave_Rectifier). + Only fixes invalid characters and collapses double underscores. + """ + name = re.sub(r'[^a-zA-Z0-9_]', '_', name) + name = re.sub(r'_+', '_', name) + return name.strip('_') + + +# ───────────────────────────────────────────────────────────── +# ALL ORFS STAGE ODB FILES IN ORDER +# Script will check from last to first and open +# the GUI at whichever stage completed successfully. +# ───────────────────────────────────────────────────────────── + +STAGE_ODBS = [ + ("6_final.odb", "Stage 6 - Final"), + ("5_route.odb", "Stage 5 - Routing"), + ("4_cts.odb", "Stage 4 - Clock Tree Synthesis"), + ("3_5_place_dp.odb", "Stage 3.5 - Detail Placement"), + ("3_4_place_resized.odb", "Stage 3.4 - Resizing"), + ("3_3_place_mpl.odb", "Stage 3.3 - Macro Placement"), + ("3_2_place_iop.odb", "Stage 3.2 - IO Placement"), + ("3_1_place_gp.odb", "Stage 3.1 - Global Placement"), + ("2_floorplan.odb", "Stage 2 - Floorplan"), + ("1_synth.odb", "Stage 1 - Synthesis"), +] + + +def find_latest_odb(orfs_flow, module_name): + """ + Checks all stage ODB files from last to first. + Returns (odb_filename, stage_label) of the furthest completed stage. + """ + base_dir = os.path.join(orfs_flow, "results", "sky130hd", module_name, "base") + + print(f"\n[*] Checking completed stages in: {base_dir}") + + for odb_file, stage_label in STAGE_ODBS: + full_path = os.path.join(base_dir, odb_file) + if os.path.isfile(full_path): + print(f"[✓] Found: {stage_label} → {odb_file}") + return odb_file, stage_label + + return None, None + + +# ───────────────────────────────────────────────────────────── +# VERILOG SEARCH +# ───────────────────────────────────────────────────────────── + +def find_generated_verilog(selected_path, project_name, orfs_design_dir): + project_dir = os.path.dirname(selected_path) or "." + home_dir = os.path.expanduser("~") + + candidates = [ + os.path.join(project_dir, f"{project_name}.v"), + os.path.join(home_dir, f"{project_name}.v"), + os.path.join(orfs_design_dir, f"{project_name}.v"), + selected_path.replace(".cir.out", ".v"), + ] + + print("[*] Looking for Verilog file in:") + for path in candidates: + print(f" - {path}") + if os.path.isfile(path): + print(f"[✓] Found Verilog: {path}") + return path + + return None + + +# ───────────────────────────────────────────────────────────── +# VERILOG INSPECTION +# ───────────────────────────────────────────────────────────── + +def extract_top_module_name(verilog_path): + with open(verilog_path, "r", encoding="utf-8") as f: + content = f.read() + match = re.search(r"^\s*module\s+([A-Za-z_][A-Za-z0-9_]*)", content, re.MULTILINE) + if not match: + fail(f"Could not find module name in: {verilog_path}") + return match.group(1) + + +def is_clocked_design(verilog_path): + with open(verilog_path, "r", encoding="utf-8") as f: + content = f.read() + return ( + re.search(r"\bposedge\b", content) is not None or + re.search(r"\bnegedge\b", content) is not None or + re.search(r"\binput\s+.*\bclk\b", content, re.IGNORECASE) is not None or + re.search(r"\binput\b[^;\n]*\bclock\b", content, re.IGNORECASE) is not None + ) + + +# ───────────────────────────────────────────────────────────── +# FILE BUILDERS +# ───────────────────────────────────────────────────────────── + +def build_config(module_name, project_name): + return f"""export DESIGN_NAME = {module_name} +export PLATFORM = sky130hd +export VERILOG_FILES = ./designs/sky130hd/{project_name}/{project_name}.v +export SDC_FILE = ./designs/sky130hd/{project_name}/constraint.sdc +export DIE_AREA = 0 0 100 100 +export CORE_AREA = 10 10 90 90 +""" + + +def build_sdc(is_clocked): + if is_clocked: + return "create_clock [get_ports clk] -period 10\n" + return "set_units -time ns\n" + + +def build_gui_tcl(module_name, stage_odb): + return ( + f"read_db ./results/sky130hd/{module_name}/base/{stage_odb}\n" + "gui::fit\n" + ) + + +# ───────────────────────────────────────────────────────────── +# MAIN +# ───────────────────────────────────────────────────────────── + +def main(): + if len(sys.argv) < 2: + fail("Usage: python3 openroad_integration.py ") + + selected_path = os.path.abspath(sys.argv[1]) + project_name = os.path.basename(selected_path).replace(".cir.out", "") + + print(f"\n{'='*60}") + print(f" OpenROAD Integration — Project: {project_name}") + print(f"{'='*60}\n") + print(f"[*] Selected file: {selected_path}") + + # ── ORFS paths ─────────────────────────────────────────── + orfs_root = os.path.expanduser("~/OpenROAD-flow-scripts") + orfs_flow = os.path.join(orfs_root, "flow") + docker_shell = os.path.join(orfs_flow, "util", "docker_shell") + + if not os.path.isdir(orfs_flow): + fail(f"OpenROAD flow directory not found: {orfs_flow}") + if not os.path.isfile(docker_shell): + fail(f"docker_shell not found: {docker_shell}") + if shutil.which("docker") is None: + fail("docker is not installed or not in PATH") + + # ── Design directory ───────────────────────────────────── + design_dir = os.path.join(orfs_flow, "designs", "sky130hd", project_name) + os.makedirs(design_dir, exist_ok=True) + + # ── Find Verilog ───────────────────────────────────────── + verilog_path = find_generated_verilog(selected_path, project_name, design_dir) + + if verilog_path is None: + fail( + f"Verilog file '{project_name}.v' not found.\n" + f"Please place your Verilog file in ONE of these locations:\n" + f" 1. {os.path.dirname(selected_path)}/{project_name}.v\n" + f" 2. ~/{project_name}.v\n" + f" 3. {design_dir}/{project_name}.v" + ) + + # ── Extract module info ────────────────────────────────── + module_name = extract_top_module_name(verilog_path) + module_name = normalize_module_name(module_name) + clocked = is_clocked_design(verilog_path) + + print(f"[*] Module name : {module_name}") + print(f"[*] Design type : {'clocked' if clocked else 'combinational'}") + print(f"[*] Flow target : {'finish' if clocked else 'place'}") + + # ── Copy Verilog + write config files ──────────────────── + target_verilog = os.path.join(design_dir, f"{project_name}.v") + target_sdc = os.path.join(design_dir, "constraint.sdc") + target_config = os.path.join(design_dir, "config.mk") + + shutil.copyfile(verilog_path, target_verilog) + print(f"[*] Copied Verilog : {target_verilog}") + + write_file(target_sdc, build_sdc(clocked)) + print(f"[*] Wrote SDC : {target_sdc}") + + write_file(target_config, build_config(module_name, project_name)) + print(f"[*] Wrote config.mk : {target_config}") + + # ── Environment ────────────────────────────────────────── + env = os.environ.copy() + env["QT_X11_NO_MITSHM"] = "1" + env["LIBGL_ALWAYS_SOFTWARE"] = "1" + env["OPENROAD_EXE"] = "/OpenROAD-flow-scripts/tools/install/OpenROAD/bin/openroad" + env["YOSYS_EXE"] = "/usr/local/bin/yosys" + + # ── Run ORFS flow ───────────────────────────────────────── + design_config = f"./designs/sky130hd/{project_name}/config.mk" + flow_target = "finish" + + cmd = [docker_shell, "make", f"DESIGN_CONFIG={design_config}", flow_target] + + print(f"\n[*] Running: make DESIGN_CONFIG={design_config} {flow_target}") + print("-" * 60) + + result = subprocess.run( + cmd, + cwd=orfs_flow, + env=env, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + text=True, + ) + print(result.stdout) + + if result.returncode != 0: + print(f"[!] Flow exited with code {result.returncode} — checking how far it got...") + else: + print(f"[✓] Flow completed successfully!") + + # ── Find latest completed ODB ───────────────────────────── + # Works whether flow succeeded OR failed halfway. + # Opens GUI at whatever stage was last completed. + stage_odb, stage_label = find_latest_odb(orfs_flow, module_name) + + if stage_odb is None: + fail( + f"No ODB files found at any stage.\n" + f"Flow likely failed at synthesis. Check logs:\n" + f" ~/OpenROAD-flow-scripts/flow/logs/sky130hd/{module_name}/base/" + ) + + print(f"\n[*] Opening GUI at: {stage_label}") + + # ── Launch GUI ──────────────────────────────────────────── + gui_tcl_path = os.path.join(orfs_flow, f"open_gui_{module_name}.tcl") + write_file(gui_tcl_path, build_gui_tcl(module_name, stage_odb)) + print(f"[*] Wrote GUI Tcl: {gui_tcl_path}") + + gui_cmd = [ + docker_shell, + "openroad", "-gui", + f"./{os.path.basename(gui_tcl_path)}", + ] + + print(f"[*] Launching: openroad -gui ./{os.path.basename(gui_tcl_path)}") + + gui_result = subprocess.run( + gui_cmd, + cwd=orfs_flow, + env=env, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + text=True, + ) + print(gui_result.stdout) + + if gui_result.returncode != 0: + fail(f"OpenROAD GUI failed with exit code {gui_result.returncode}") + + print(f"\n[✓] OpenROAD GUI closed for '{project_name}'") + + +if __name__ == "__main__": + main() From 1063a93389d93dce262b999ed07e102e752ccc46 Mon Sep 17 00:00:00 2001 From: Rishabh Jain <2r10j5@gmail.com> Date: Wed, 13 May 2026 11:42:45 +0530 Subject: [PATCH 2/8] Update README with Docker setup details Added information about the Docker environment and setup workflow. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 4b7cc0d..17aaa63 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,15 @@ This project is intended for the FOSSEE eSim ecosystem and Ubuntu-based setup wo | `orfs-setup.py` | OpenROAD Flow Scripts setup helper. | | `install.md` | Detailed installation and usage guide. | | `contribution.md` | Contribution guidelines. | +| `docker-launcher/` | Docker environment and launcher scripts for running the eSim OpenROAD integration workflow. | + ## Documentation For the full setup workflow, see [`install.md`](install.md). +For the docker setup workflow, see [`docker.md`](docker-launcher/README.md) + For contribution guidelines, see [`contribution.md`](contribution.md). ## License From 85343cb04ae5966bde8bb758f98537b1fcc539f8 Mon Sep 17 00:00:00 2001 From: Rishabh Jain <2r10j5@gmail.com> Date: Wed, 13 May 2026 13:02:57 +0530 Subject: [PATCH 3/8] Update modification details in Application.py Added modification details for Rishabh Jain. --- src/frontEnd/Application.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index 2c5bdb2..65f1f7e 100644 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -13,6 +13,7 @@ # MAINTAINED: Rahul Paknikar, rahulp@iitb.ac.in # Sumanto Kar, sumantokar@iitb.ac.in # Pranav P, pranavsdreams@gmail.com +# MODIFIED: Rishabh Jain, 2r10j5@gmail.com # ORGANIZATION: eSim Team at FOSSEE, IIT Bombay # CREATED: Tuesday 24 February 2015 # REVISION: Wednesday 07 June 2023 From 43a76ef1b97ac18a1c39173b0313f2ff653261ae Mon Sep 17 00:00:00 2001 From: Rishabh Jain <2r10j5@gmail.com> Date: Wed, 13 May 2026 13:08:19 +0530 Subject: [PATCH 4/8] Add documentation header to netlist2rtl.py Added header comments to netlist2rtl.py for documentation. --- src/maker/netlist2rtl.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/maker/netlist2rtl.py b/src/maker/netlist2rtl.py index cbda2f6..9c2731c 100644 --- a/src/maker/netlist2rtl.py +++ b/src/maker/netlist2rtl.py @@ -1,3 +1,20 @@ +# ========================================================================= +# FILE: netlist2rtl.py +# +# USAGE: --- +# +# DESCRIPTION: This file is used to convert netlist to verilog +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: Rishabh Jain, 2r10j5@gmail.com +# MAINTAINED: Sumanto Kar, sumantokar@iitb.ac.in +# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay +# CREATED: Monday 2 March 2026 +# ========================================================================= + import os import sys @@ -203,4 +220,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main() From 4711815dadf588919dc3f06a85b365e80a32636d Mon Sep 17 00:00:00 2001 From: Rishabh Jain <2r10j5@gmail.com> Date: Wed, 13 May 2026 13:10:04 +0530 Subject: [PATCH 5/8] Add file header and metadata to OpenROAD.py Added header comments with metadata for the OpenROAD.py file. --- src/maker/OpenROAD.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/maker/OpenROAD.py b/src/maker/OpenROAD.py index 6410b4e..b009c10 100644 --- a/src/maker/OpenROAD.py +++ b/src/maker/OpenROAD.py @@ -1,9 +1,25 @@ +# ========================================================================= +# FILE: OpenROAD.py +# +# USAGE: --- +# +# DESCRIPTION: This file is used to connect with orfs to esim +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: Rishabh Jain, 2r10j5@gmail.com +# MAINTAINED: Sumanto Kar, sumantokar@iitb.ac.in +# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay +# CREATED: Monday 2 March 2026 +# ========================================================================= + import os import shutil import subprocess import sys - class OpenROADFlow: def __init__( @@ -320,4 +336,4 @@ def run(self): verilog_file ) - flow.run() \ No newline at end of file + flow.run() From c645baaf340370eff16907b68d54dd41278a12bb Mon Sep 17 00:00:00 2001 From: Rishabh Jain <2r10j5@gmail.com> Date: Wed, 13 May 2026 13:11:26 +0530 Subject: [PATCH 6/8] Add metadata comments to orfs-setup.py Added header comments to provide file metadata. --- orfs-setup.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/orfs-setup.py b/orfs-setup.py index e0eedcc..a96fe22 100644 --- a/orfs-setup.py +++ b/orfs-setup.py @@ -1,4 +1,22 @@ #!/usr/bin/env python3 + +# ========================================================================= +# FILE: OpenROAD.py +# +# USAGE: --- +# +# DESCRIPTION: This file is used setup of orfs +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: Rishabh Jain, 2r10j5@gmail.com +# MAINTAINED: Sumanto Kar, sumantokar@iitb.ac.in +# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay +# CREATED: Monday 2 March 2026 +# ========================================================================= + import os,sys,shutil,subprocess from pathlib import Path @@ -243,4 +261,4 @@ def main(): print("================================================") if __name__=="__main__": - main() \ No newline at end of file + main() From 4e19d162dc7de28f9b762846f32f55fe65777d38 Mon Sep 17 00:00:00 2001 From: Rishabh Jain <2r10j5@gmail.com> Date: Wed, 13 May 2026 13:38:11 +0530 Subject: [PATCH 7/8] Revise eSim-OpenROAD Installation Guide Updated installation guide for eSim-OpenROAD plugin, including restructured sections and improved formatting. --- install.md | 76 +++++++++++++++++++----------------------------------- 1 file changed, 27 insertions(+), 49 deletions(-) diff --git a/install.md b/install.md index be313e2..3405579 100644 --- a/install.md +++ b/install.md @@ -1,8 +1,6 @@ -# eSim–OpenROAD Design Flow Plugin Installation Guide +# eSim-OpenROAD Design Flow Plugin Installation Guide -**Platform:** Ubuntu 22.04 - ---- +## **Platform :** Ubuntu 22.04 LTS # 1. Clone the Repository @@ -11,7 +9,6 @@ Open a terminal and run: ```bash git clone https://github.com/FOSSEE/eSim-to-OpenROAD_Design_Flow_Plugin.git ``` - --- # 2. Move to the Project Directory @@ -22,7 +19,9 @@ cd eSim-to-OpenROAD_Design_Flow_Plugin --- -# 3. Install eSim and Required Dependencies +# 3. eSim-2.5 Installation and Uninstallation + +## • Install eSim and Required Dependencies Give execution permission to the installation script and run it: @@ -37,9 +36,19 @@ This step installs: - OpenROAD dependencies - Required tools and libraries +## • Uninstall eSim and All Components + +```bash +./install-eSim.sh --uninstall +``` + +This removes eSim and all installed components from the system. + --- -# 4. Build OpenROAD Flow Scripts Locally +# 4. Build OpenROAD Flow Scripts + +## • Build orfs Locally Run the following command: @@ -49,9 +58,7 @@ python3 orfs-setup.py This command builds the OpenROAD Flow Scripts required for RTL-to-GDSII generation. ---- - -# 5. Rebuild OpenROAD Flow Scripts (If Build Fails) +## • Rebuild orfs (If Build Fails) If the build process fails: @@ -64,40 +71,34 @@ python3 orfs-setup.py --- -# Running the Tools +# 5. Running the Tools -# 6. Run eSim +## • Run eSim -## Using Terminal +### 1. Using Terminal ```bash esim ``` -## Using Desktop Shortcut +### 2. Using Desktop Shortcut Double-click the **eSim** desktop icon. ---- - -# 7. Run OpenROAD GUI +## • Run OpenROAD GUI ```bash cd ~/OpenROAD-flow-scripts/flow openroad -gui ``` ---- - -# 8. Run Yosys +## • Run Yosys ```bash yosys ``` ---- - -# 9. Run KLayout +## • Run KLayout ```bash klayout @@ -105,17 +106,7 @@ klayout --- -# 10. Uninstall eSim and All Components - -```bash -./install-eSim.sh --uninstall -``` - -This removes eSim and all installed components from the system. - ---- - -# Viewing Layouts in OpenROAD GUI +# 6. Viewing Layouts in OpenROAD GUI Start the OpenROAD GUI: @@ -124,9 +115,7 @@ cd ~/OpenROAD-flow-scripts/flow openroad -gui ``` ---- - -## View Half Adder Layout +## • View Half Adder Layout TCL Commands ```tcl read_lef platforms/sky130hd/lef/sky130_fd_sc_hd.tlef @@ -138,9 +127,7 @@ read_def results/sky130hd/Half_Adder/base/6_final.def gui::fit ``` ---- - -## View Full Adder Layout +## • View Full Adder Layout TCL Commands ```tcl read_lef platforms/sky130hd/lef/sky130_fd_sc_hd.tlef @@ -151,12 +138,3 @@ read_def results/sky130hd/FullAdder/base/6_final.def gui::fit ``` - ---- - -# Notes - -- Recommended Operating System: **Ubuntu 22.04** -- Ensure Python 3 is installed before running the setup script. -- Internet connection is required during installation. -- Use terminal commands carefully with proper permissions. \ No newline at end of file From 81c11f575ec4b06dabc3a1ce4858769b195fad8d Mon Sep 17 00:00:00 2001 From: Rishabh Jain <2r10j5@gmail.com> Date: Wed, 13 May 2026 13:42:37 +0530 Subject: [PATCH 8/8] Enhance install-eSim.sh with documentation and metadata Added header comments with usage instructions and author details. --- install-eSim.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/install-eSim.sh b/install-eSim.sh index 998cbf4..ab8e900 100644 --- a/install-eSim.sh +++ b/install-eSim.sh @@ -1,4 +1,24 @@ #!/bin/bash +#============================================================================= +# FILE: install-eSim.sh +# +# USAGE: ./install-eSim.sh --install +# OR +# ./install-eSim.sh --uninstall +# +# DESCRIPTION: Installation script for eSim EDA Suite +# +# OPTIONS: --- +# REQUIREMENTS: --- +# BUGS: --- +# NOTES: --- +# AUTHORS: Fahim Khan, Rahul Paknikar, Saurabh Bansode, +# Sumanto Kar, Partha Singha Roy, Jayanth Tatineni, +# Anshul Verma, Shiva Krishna Sangati, Harsha Narayana P +# ORGANIZATION: eSim Team, FOSSEE, IIT Bombay +# CREATED: Sunday 25 May 2025 17:40 +# REVISION: --- +#============================================================================= # Function to detect Ubuntu version and full version string get_ubuntu_version() {