diff --git a/compile.bat b/compile.bat index ff73b26..1491b51 100644 --- a/compile.bat +++ b/compile.bat @@ -1,14 +1,9 @@ @echo off setlocal -SET STACK=analog-xk - -SET DOCKER_USER=akilesalreadytaken -SET DOCKER_IMAGE=analog-tools -SET DOCKER_TAG=latest - -SET BASE_IMG=git.1159.cl/mario1159/analog-xk-web:latest - +@REM SET BASE_IMG=git.1159.cl/mario1159/analog-xk-web:latest +SET BASE_IMG=git.1159.cl/mario1159/analog-xk-desktop:latest +SET RESULT_IMAGE=akilesalreadytaken/analog-tools:latest SET CALL=call :parse @@ -29,10 +24,7 @@ SET CALL=call :run - SET TAG=%DOCKER_USER%/%DOCKER_IMAGE% - IF DEFINED DOCKER_TAG SET TAG=%TAG%:%DOCKER_TAG% - - %CALL% docker build --rm --build-arg BASE_IMG=%BASE_IMG% -t %TAG% -f stacks/analog-tools/Dockerfile stacks/analog-tools/ + %CALL% docker build --build-arg BASE_IMG=%BASE_IMG% -t %RESULT_IMAGE% -f stacks/analog-tools/Dockerfile stacks/analog-tools/ GOTO end :end @@ -48,4 +40,4 @@ SET CALL=call ::wsl --exec bash --norc -c 'echo $DISPLAY' :: Get current path of batsh script -::SET BATCH_PATH=%~dpnx0 \ No newline at end of file +::SET BATCH_PATH=%~dpnx0 diff --git a/run.bat b/run.bat index 4087e12..732c3d3 100644 --- a/run.bat +++ b/run.bat @@ -56,11 +56,17 @@ SET CALL=call :: Get parameters from wsl :::::::::::::::::::::::::: - SET WSL_GET_DISPLAY=wsl --exec bash --norc -c "echo $DISPLAY" - FOR /F "USEBACKQ" %%i IN (`%WSL_GET_DISPLAY%`) DO ( SET "DISPLAY=%%i" ) + SET WSL_GET_PARAMETER=wsl --exec bash --norc -c "echo $DISPLAY" + @REM SET WSL_GET_PARAMETER=wsl -d docker-desktop --exec ash -c "echo $DISPLAY" + FOR /F "USEBACKQ" %%i IN (`%WSL_GET_PARAMETER%`) DO ( SET "DISPLAY=%%i" ) - SET WSL_GET_WAYLAND_DISPLAY=wsl --exec bash --norc -c "echo $WAYLAND_DISPLAY" - FOR /F "USEBACKQ" %%i IN (`%WSL_GET_WAYLAND_DISPLAY%`) DO ( SET "WAYLAND_DISPLAY=%%i" ) + SET WSL_GET_PARAMETER=wsl --exec bash --norc -c "echo $WAYLAND_DISPLAY" + @REM SET WSL_GET_PARAMETER=wsl -d docker-desktop --exec ash -c "echo $WAYLAND_DISPLAY" + FOR /F "USEBACKQ" %%i IN (`%WSL_GET_PARAMETER%`) DO ( SET "WAYLAND_DISPLAY=%%i" ) + + SET WSL_GET_PARAMETER=wsl --exec bash --norc -c "echo $XDG_RUNTIME_DIR" + @REM SET WSL_GET_PARAMETER=wsl -d docker-desktop --exec ash -c "echo $XDG_RUNTIME_DIR" + FOR /F "USEBACKQ" %%i IN (`%WSL_GET_PARAMETER%`) DO ( SET "XDG_RUNTIME_DIR=%%i" ) :: Validate parameters :::::::::::::::::::::: @@ -98,20 +104,25 @@ SET CALL=call SET PARAMS=-d SET PARAMS=%PARAMS% --name %CONTAINER_NAME% - SET PARAMS=%PARAMS% -e PDK=%PDK% ::SET PARAMS=%PARAMS% --user %CONTAINER_USER%:%CONTAINER_GROUP% - ::SET PARAMS=%PARAMS% --security-opt seccomp=unconfined - SET PARAMS=%PARAMS% -p %JUPYTER_PORT%:8888 - SET PARAMS=%PARAMS% -v "%DESIGNS%":/home/designer/shared + SET PARAMS=%PARAMS% --security-opt seccomp=unconfined - IF NOT DEFINED ENABLE_VNC ( - SET PARAMS=%PARAMS% -v \\wsl.localhost\Ubuntu\mnt\wslg:/tmp - SET PARAMS=%PARAMS% -e DISPLAY=%DISPLAY% - SET PARAMS=%PARAMS% -e WAYLAND_DISPLAY=%WAYLAND_DISPLAY% - SET PARAMS=%PARAMS% -e XDG_RUNTIME_DIR=/mnt/wslg - ) ELSE ( - SET PARAMS=%PARAMS% -p %VNC_PORT%:8444 - ) + SET PARAMS=%PARAMS% -p %JUPYTER_PORT%:8888 + SET PARAMS=%PARAMS% -p %VNC_PORT%:8444 + + SET PARAMS=%PARAMS% -v "%DESIGNS%":/home/designer/shared + SET PARAMS=%PARAMS% -v "\\wsl.localhost\Ubuntu\mnt\wslg":/tmp + SET PARAMS=%PARAMS% -v "\\wsl.localhost\Ubuntu\mnt\wslg\runtime-dir":%XDG_RUNTIME_DIR% + @REM SET PARAMS=%PARAMS% -v "\\wsl.localhost\docker-desktop\mnt\host\wslg":/tmp + @REM SET PARAMS=%PARAMS% -v "\\wsl.localhost\docker-desktop\mnt\host\wslg\runtime-dir":%XDG_RUNTIME_DIR% + + SET PARAMS=%PARAMS% -e PDK=%PDK% + SET PARAMS=%PARAMS% -e DISPLAY=%DISPLAY% + SET PARAMS=%PARAMS% -e WAYLAND_DISPLAY=%WAYLAND_DISPLAY% + SET PARAMS=%PARAMS% -e XDG_RUNTIME_DIR=%XDG_RUNTIME_DIR% + @REM IF NOT DEFINED ENABLE_VNC ( + @REM ) ELSE ( + @REM ) IF NOT DEFINED IMAGE ( SET IMAGE=%DOCKER_USER%/%DOCKER_IMAGE% diff --git a/stacks/analog-tools/Dockerfile b/stacks/analog-tools/Dockerfile index c3b0b0a..28a1003 100644 --- a/stacks/analog-tools/Dockerfile +++ b/stacks/analog-tools/Dockerfile @@ -2,10 +2,12 @@ ARG BASE_IMG=analog-xk FROM $BASE_IMG as analog-tools # Add scripts -COPY --chown=designer:designer --chmod=755 scripts/* . - +COPY --chown=designer:designer --chmod=755 scripts/install-open-pdks.sh . RUN ./install-open-pdks.sh +COPY --chown=designer:designer --chmod=755 scripts/* . +RUN ./patch-open-pdks.sh + RUN rm *.sh # Initialize the enviroment keeping container alive diff --git a/stacks/analog-tools/scripts/install-open-pdks.sh b/stacks/analog-tools/scripts/install-open-pdks.sh index ef2ab48..719dff1 100644 --- a/stacks/analog-tools/scripts/install-open-pdks.sh +++ b/stacks/analog-tools/scripts/install-open-pdks.sh @@ -5,23 +5,11 @@ set -e export OPEN_PDKS_VERSION="dd7771c384ed36b91a25e9f8b314355fc26561be" export SCRIPT_DIR=$PWD -if [ -d xschemrc ]; then - echo File xschemrc not found - return -1 -fi - -if [ -d $SCRIPT_DIR/iic-spice-model-red.py ]; then - echo File iic-spice-model.red.py not found - return -1 -fi - ###################### # INSTALL GF180MCU PDK ###################### -export PDK=gf180mcu - -volare enable "${OPEN_PDKS_VERSION}" --pdk "${PDK}" +volare enable "${OPEN_PDKS_VERSION}" --pdk gf180mcu rm -rf $PDK_ROOT/volare/gf180mcu/versions/*/gf180mcuA rm -rf $PDK_ROOT/volare/gf180mcu/versions/*/gf180mcuB @@ -30,62 +18,16 @@ rm -rf $PDK_ROOT/gf180mcuA rm -rf $PDK_ROOT/gf180mcuB rm -rf $PDK_ROOT/gf180mcuD -export KLAYOUT_HOME="$PDK_ROOT/gf180mcuC/libs.tech/klayout" - -mv $KLAYOUT_HOME/pymacros temp -mkdir $KLAYOUT_HOME/pymacros -mv temp $KLAYOUT_HOME/pymacros/cells -mv $KLAYOUT_HOME/tech/gf180mcu.lym $KLAYOUT_HOME/pymacros - -mv "$SCRIPT_DIR/xschemrc" $PDK_ROOT/gf180mcuC/libs.tech/xschem/xschemrc - -rm -rf .scripts/klayout - - #################### # INSTALL SKY130 PDK #################### -# I don't know about pcell support, maybe with pip install sky130? -# pip install sky130 --upgrade --break-system-packages +pip install sky130 --upgrade --break-system-packages -# Still having troubles with this: -# ERROR: Reading /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/sky130.lym: XML parser error: invalid name for processing instruction in line 17, column 6 -# ERROR: Reading /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/sky130.lym: XML parser error: invalid name for processing instruction in line 17, column 6 -# ERROR: Reading /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/sky130.lym: XML parser error: invalid name for processing instruction in line 17, column 6 +volare enable "${OPEN_PDKS_VERSION}" --pdk sky130 -# Fixing the above, the cells indicates the following: -# ERROR: /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/cells/via_generator.py:23: ModuleNotFoundError: No module named 'gdsfactory.types' -# /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/cells/via_generator.py:23 -# /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/cells/vias.py:20 -# /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/cells/__init__.py:21 -# /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/sky130.lym:9 (class ModuleNotFoundError) - -export PDK=sky130 - -volare enable "${OPEN_PDKS_VERSION}" --pdk "${PDK}" +# ADD PCELL SUPPORT # remove version sky130B to save space (efabless TO use mostly sky130A) rm -rf "$PDK_ROOT"/volare/sky130/versions/*/sky130B rm -rf "$PDK_ROOT"/sky130B - -# apply SPICE mode file reduction (for the variants that exist) -# add custom IIC bind keys to magicrc - -cd "$PDK_ROOT/sky130A/libs.tech/ngspice" || exit 1 -"$SCRIPT_DIR/iic-spice-model-red.py" sky130.lib.spice tt -"$SCRIPT_DIR/iic-spice-model-red.py" sky130.lib.spice ss -"$SCRIPT_DIR/iic-spice-model-red.py" sky130.lib.spice ff - -# FIXME: Repair klayout tech file -sed -i 's/>sky130sky130A/c\ ' "$PDK_ROOT/sky130A/libs.tech/klayout/tech/sky130A.lyt" -# shellcheck disable=SC2016 -sed -i '//c\ $PDK_ROOT/$PDK/libs.tech/klayout' "$PDK_ROOT/sky130A/libs.tech/klayout/tech/sky130A.lyt" - -cd "$SCRIPT_DIR" - - - -rm -rf "$SCRIPT_DIR/iic-spice-model-red.py" \ No newline at end of file diff --git a/stacks/analog-tools/scripts/patch-open-pdks.sh b/stacks/analog-tools/scripts/patch-open-pdks.sh new file mode 100644 index 0000000..a06d0da --- /dev/null +++ b/stacks/analog-tools/scripts/patch-open-pdks.sh @@ -0,0 +1,131 @@ +#!/bin/bash +set -e + +SCRIPT_DIR=$PWD +DROPDOWN_REPO="https://github.com/mabrains/globalfoundries-pdk-libs-gf180mcu_fd_pr" + +# This files can be downloaded directly +# - sky130A_mr.drc +# - gf180mcuC_mr.drc +PRECHECK_REPO=https://raw.githubusercontent.com/efabless/mpw_precheck/main/checks/tech-files/ +PRECHECK_GF_FILE=gf180mcuC_mr.drc +PRECHECK_SKY_FILE=sky130A_mr.drc + +if [ -d $SCRIPT_DIR/iic-spice-model-red.py ]; then + echo File iic-spice-model.red.py not found + return -1 +fi + +sudo aur-install wget +pip install docopt --upgrade --break-system-packages + +###################### +# PATCH GF180MCU PDK +###################### + +function gf180_patch_xschemrc() { + FILEPATH=$PDK_ROOT/gf180mcuC/libs.tech/xschem/xschemrc + + ORIGINAL='append XSCHEM_LIBRARY_PATH :$env(PWD)' + REPLACE='append XSCHEM_LIBRARY_PATH :$env(PDK_ROOT)/$env(PDK)/libs.tech/xschem' + sed -i "s\\$ORIGINAL\\$REPLACE\g" $FILEPATH + + ORIGINAL='set 180MCU_MODELS ${PDK_ROOT}/models/ngspice' + REPLACE='set 180MCU_MODELS $env(PDK_ROOT)/$env(PDK)/libs.tech/ngspice' + sed -i "s\\$ORIGINAL\\$REPLACE\g" $FILEPATH +} + +function gf180_patch_klayout_pcells() { + KLAYOUT_HOME="$PDK_ROOT/gf180mcuC/libs.tech/klayout" + + mv $KLAYOUT_HOME/pymacros $KLAYOUT_HOME/cells + mkdir $KLAYOUT_HOME/pymacros + mv $KLAYOUT_HOME/cells $KLAYOUT_HOME/pymacros + mv $KLAYOUT_HOME/tech/gf180mcu.lym $KLAYOUT_HOME/pymacros + + rm -rf .scripts/klayout +} + +function gf180_patch_klayout_dropdown() { + # 27:00 & 36:40 + KLAYOUT_HOME="$PDK_ROOT/gf180mcuC/libs.tech/klayout" + DROPDOWN_DIRECTORY="globalfoundries" + + git clone $DROPDOWN_REPO $DROPDOWN_DIRECTORY + + cp -r $DROPDOWN_DIRECTORY/rules/klayout/macros $KLAYOUT_HOME + + # There's no directories + # cp -r $DROPDOWN_DIRECTORY/rules/klayout/drc/*.drc $KLAYOUT_HOME/drc + # cp -r $DROPDOWN_DIRECTORY/rules/klayout/lvs/*.lvs $KLAYOUT_HOME/lvs + + rm -rf $DROPDOWN_DIRECTORY +} + +function gf180_patch_klayout_precheck_drc() { + KLAYOUT_HOME="$PDK_ROOT/gf180mcuC/libs.tech/klayout" + #curl -o $KLAYOUT_HOME/drc/rule_decks/$PRECHECK_GF_FILE $PRECHECK_REPO/$PRECHECK_GF_FILE + wget -O $KLAYOUT_HOME/drc/rule_decks/$PRECHECK_GF_FILE $PRECHECK_REPO/$PRECHECK_GF_FILE +} + +#################### +# PATCH SKY130 PDK +#################### + +function sky130_patch_reduced_models() { + cd "$PDK_ROOT/sky130A/libs.tech/ngspice" || exit 1 + "$SCRIPT_DIR/iic-spice-model-red.py" sky130.lib.spice tt + "$SCRIPT_DIR/iic-spice-model-red.py" sky130.lib.spice ss + "$SCRIPT_DIR/iic-spice-model-red.py" sky130.lib.spice ff + + cd "$SCRIPT_DIR" + rm -rf "iic-spice-model-red.py" +} + +function sky130_patch_klayout_lyt() { + KLAYOUT_HOME="$PDK_ROOT/sky130A/libs.tech/klayout" + FILEPATH="$KLAYOUT_HOME/tech/sky130A.lyt" + + sed -i 's/>sky130sky130A/c\ ' $FILEPATH + sed -i '//c\ $PDK_ROOT/$PDK/libs.tech/klayout' $FILEPATH +} + +function sky130_patch_klayout_lym () { + KLAYOUT_HOME="$PDK_ROOT/sky130A/libs.tech/klayout" + # ERROR: Reading /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/sky130.lym: XML parser error: invalid name for processing instruction in line 17, column 6 + # ERROR: Reading /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/sky130.lym: XML parser error: invalid name for processing instruction in line 17, column 6 + # ERROR: Reading /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/sky130.lym: XML parser error: invalid name for processing instruction in line 17, column 6 + FILENAME="$KLAYOUT_HOME/pymacros/sky130.lym" + LINE=17 + ( sed -n ${LINE}' {p;q}' $FILENAME ; sed "${LINE}d" $FILENAME ) > $FILENAME +} + +function sky130_patch_klayout_pcells() { + KLAYOUT_HOME="$PDK_ROOT/sky130A/libs.tech/klayout" + # Fixing the above, the cells indicates the following: + # ERROR: /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/cells/via_generator.py:23: ModuleNotFoundError: No module named 'gdsfactory.types' + # /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/cells/via_generator.py:23 + # /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/cells/vias.py:20 + # /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/cells/__init__.py:21 + # /home/designer/.volare/sky130A/libs.tech/klayout/pymacros/sky130.lym:9 (class ModuleNotFoundError) + echo hola +} + +function sky130_patch_klayout_precheck_drc() { + KLAYOUT_HOME="$PDK_ROOT/sky130A/libs.tech/klayout" + wget -O $KLAYOUT_HOME/drc/$PRECHECK_SKY_FILE $PRECHECK_REPO/$PRECHECK_SKY_FILE +} + +gf180_patch_xschemrc +gf180_patch_klayout_pcells +gf180_patch_klayout_dropdown +gf180_patch_klayout_precheck_drc +sky130_patch_reduced_models +sky130_patch_klayout_lyt +sky130_patch_klayout_lym +sky130_patch_klayout_pcells +sky130_patch_klayout_precheck_drc + +aur-install gedit xterm gvim \ No newline at end of file diff --git a/stacks/analog-tools/scripts/xschemrc b/stacks/analog-tools/scripts/xschemrc deleted file mode 100644 index 193a5c4..0000000 --- a/stacks/analog-tools/scripts/xschemrc +++ /dev/null @@ -1,336 +0,0 @@ -#### xschemrc system configuration file - -#### values may be overridden by user's ~/.xschem/xschemrc configuration file -#### or by project-local ./xschemrc - -########################################################################### -#### XSCHEM INSTALLATION DIRECTORY: XSCHEM_SHAREDIR -########################################################################### -#### Normally there is no reason to set this variable if using standard -#### installation. Location of files is set at compile time but may be overridden -#### with following line: -# set XSCHEM_SHAREDIR $env(HOME)/share/xschem - -########################################################################### -#### XSCHEM SYSTEM-WIDE DESIGN LIBRARY PATHS: XSCHEM_LIBRARY_PATH -########################################################################### -#### If unset xschem starts with XSCHEM_LIBRARY_PATH set to the default, typically: -# /home/schippes/.xschem/xschem_library -# /home/schippes/share/xschem/xschem_library/devices -# /home/schippes/share/doc/xschem/examples -# /home/schippes/share/doc/xschem/ngspice -# /home/schippes/share/doc/xschem/logic -# /home/schippes/share/doc/xschem/xschem_simulator -# /home/schippes/share/doc/xschem/binto7seg -# /home/schippes/share/doc/xschem/pcb -# /home/schippes/share/doc/xschem/rom8k - -#### Flush any previous definition -set XSCHEM_LIBRARY_PATH {} -#### include devices/*.sym -append XSCHEM_LIBRARY_PATH ${XSCHEM_SHAREDIR}/xschem_library -#### include skywater libraries. Here i use [pwd]. This works if i start xschem from here. -append XSCHEM_LIBRARY_PATH :$env(PDK_ROOT)/$env(PDK)/libs.tech/xschem -# append XSCHEM_LIBRARY_PATH :/mnt/sda7/home/schippes/pdks/sky130A/libs.tech/xschem -#### add ~/.xschem/xschem_library (USER_CONF_DIR is normally ~/.xschem) -append XSCHEM_LIBRARY_PATH :$USER_CONF_DIR/xschem_library - -########################################################################### -#### SET CUSTOM COLORS FOR XSCHEM LIBRARIES MATCHING CERTAIN PATTERNS -########################################################################### -#### each line contains a dircolor(pattern) followed by a color -#### color can be an ordinary name (grey, brown, blue) or a hex code {#77aaff} -#### hex code must be enclosed in braces -array unset dircolor -set dircolor(xschem_examples$) blue -set dircolor(xschem_180MCU_PDK$) blue -set dircolor(xschem_library$) red -set dircolor(devices$) red - -########################################################################### -#### WINDOW TO OPEN ON STARTUP: XSCHEM_START_WINDOW -########################################################################### -#### Start without a design if no filename given on command line: -#### To avoid absolute paths, use a path that is relative to one of the -#### XSCHEM_LIBRARY_PATH directories. Default: empty -set XSCHEM_START_WINDOW {tests/0_top.sch} - -########################################################################### -#### DIRECTORY WHERE SIMULATIONS, NETLIST AND SIMULATOR OUTPUTS ARE PLACED -########################################################################### -#### If unset $USER_CONF_DIR/simulations is assumed (normally ~/.xschem/simulations) -# set netlist_dir $env(HOME)/.xschem/simulations - -########################################################################### -#### NETLIST AND HIERARCHICAL PRINT EXCLUDE PATTERNS -########################################################################### -#### xschem_libs is a list of patterns of cells to exclude from netlisting. -#### Matching is done as regular expression on full cell path -#### Example: -#### set xschem_libs { {/cmoslib/} {/analoglib/.*pass} buffer } -#### in this case all schematic cells of directory cmoslib and cells containing -#### /analoglib/...pass and buffer will be excluded from netlisting -#### default value: empty -# set xschem_libs {} -#### noprint_libs is a list with same rules as for xschem_libs. This -#### variable controls hierarchical print -#### default value: empty -# set noprint_libs {} - -########################################################################### -#### CHANGE DEFAULT [] WITH SOME OTHER CHARACTERS FOR BUSSED SIGNALS -#### IN SPICE NETLISTS (EXAMPLE: DATA[7] --> DATA<7>) -########################################################################### -#### default: empty (use xschem default, [ ]) -# set bus_replacement_char {<>} -#### for XSPICE: replace square brackets as the are used for XSPICE vector nodes. -# set bus_replacement_char {__} - -########################################################################### -#### SOME DEFAULT BEHAVIOR -########################################################################### -#### Allowed values: spice, verilog, vhdl, tedax, default: spice -# set netlist_type spice - -#### Some netlisting options (these are the defaults) -# set hspice_netlist 1 -# set verilog_2001 1 - -#### to use a fixed line with set change_lw to 0 and set some value to line_width -#### these are the defaults -# set line_width 0 -# set change_lw 1 - -#### allow color postscript and svg exports. Default: 1, enable color -# set color_ps 1 - -#### initial size of xschem window you can specify also position with (wxh+x+y) -#### this is the default: -# set initial_geometry {900x600} - -#### if set to 0, when zooming out allow the viewport do drift toward the mouse position, -#### allowing to move away by zooming / unzooming with mouse wheel -#### default setting: 0 -# set unzoom_nodrift 0 - -#### if set to 1 allow to place multiple components with same name. -#### Warning: this is normally not allowed in any simulation netlist. -#### default: 0, do not allow place multiple elements with same name (refdes) -# set disable_unique_names 0 - -#### if set to 1 continue drawing lines / wires after click -#### default: 0 -# set persistent_command 1 - -#### if set to 1 a wire is inserted when separating components that are -#### connected by pins. Default: not enabled (0) -# set connect_by_kissing 1 - -#### if set to 1 automatically join/trim wires while editing -#### this may slow down on rally big designs. Can be disabled via menu -#### default: 0 -# set autotrim_wires 0 - -#### set widget scaling (mainly for font display), this is useful on 4K displays -#### default: unset (tk uses its default) > 1.0 ==> bigger -# set tk_scaling 1.7 - -#### disable some symbol layers. Default: none, all layers are visible. -# set enable_layer(5) 0 ;# example to disable pin red boxes - -#### enable to scale grid point size as done with lines at close zoom, default: 0 -# set big_grid_points 0 - -########################################################################### -#### EXPORT FORMAT TRANSLATORS, PNG AND PDF -########################################################################### -#### command to translate xpm to png; (assumes command takes source -#### and dest file as arguments, example: gm convert plot.xpm plot.png) -#### default: {gm convert} -# set to_png {gm convert} - -#### command to translate ps to pdf; (assumes command takes source -#### and dest file as arguments, example: ps2pdf plot.ps plot.pdf) -#### default: ps2pdf -# set to_pdf ps2pdf -set to_pdf {ps2pdf -dAutoRotatePages=/None} - -########################################################################### -#### UNDO: SAVE ON DISK OR KEEP IN MEMORY -########################################################################### -#### Alloved: 'disk'or 'memory'. -#### Saving undo on disk is safer but slower on extremely big schematics. -#### In most cases you won't notice any delay. Undo on disk allows previous -#### state recovery in case of crashes. In-memory undo is extremely fast -#### but should a crash occur everything is lost. -#### It is highly recommended to keep undo on disk. -#### Default: disk -# set undo_type disk - -########################################################################### -#### CUSTOM GRID / SNAP VALUE SETTINGS -########################################################################### -#### Warning: changing these values will likely break compatibility -#### with existing symbol libraries. Defaults: grid 20, snap 10. -# set grid 20 -# set snap 10 - -########################################################################### -#### CUSTOM COLORS MAY BE DEFINED HERE -########################################################################### -# set cadlayers 22 -# set light_colors { -# "#ffffff" "#0044ee" "#aaaaaa" "#222222" "#229900" -# "#bb2200" "#00ccee" "#ff0000" "#888800" "#00aaaa" -# "#880088" "#00ff00" "#0000cc" "#666600" "#557755" -# "#aa2222" "#7ccc40" "#00ffcc" "#ce0097" "#d2d46b" -# "#ef6158" "#fdb200" } - -# set dark_colors { -# "#000000" "#00ccee" "#3f3f3f" "#cccccc" "#88dd00" -# "#bb2200" "#00ccee" "#ff0000" "#ffff00" "#ffffff" -# "#ff00ff" "#00ff00" "#0000cc" "#aaaa00" "#aaccaa" -# "#ff7777" "#bfff81" "#00ffcc" "#ce0097" "#d2d46b" -# "#ef6158" "#fdb200" } - -########################################################################### -#### CAIRO STUFF -########################################################################### -#### Scale all fonts by this number -# set cairo_font_scale 1.0 - -#### default for following two is 0.85 (xscale) and 0.88 (yscale) to -#### match cairo font spacing -# set nocairo_font_xscale 1.0 -#### set nocairo_font_yscale 1.0 - -#### Scale line spacing by this number -# set cairo_font_line_spacing 1.0 - -#### Specify a font -# set cairo_font_name {Sans-Serif} -# set svg_font_name {Sans-Serif} - -#### Lift up text by some zoom-corrected pixels for -#### better compatibility wrt no cairo version. -#### Useful values in the range [-1, 3] -# set cairo_vert_correct 0 -# set nocairo_vert_correct 0 - -########################################################################### -#### KEYBINDINGS -########################################################################### -#### General format for specifying a replacement for a keybind -#### Replace Ctrl-d with Escape (so you wont kill the program) -# set replace_key(Control-d) Escape - -#### swap w and W keybinds; Always specify Shift for capital letters -# set replace_key(Shift-W) w -# set replace_key(w) Shift-W - -########################################################################### -#### TERMINAL -########################################################################### -#### default for linux: xterm -# set terminal {xterm -geometry 100x35 -fn 9x15 -bg black -fg white -cr white -ms white } -#### lxterminal is not OK since it will not inherit env vars: -#### In order to reduce memory usage and increase the performance, all instances -#### of the lxterminal are sharing a single process. LXTerminal is part of LXDE - -########################################################################### -#### EDITOR -########################################################################### -#### editor must not detach from launching shell (-f mandatory for gvim) -#### default for linux: gvim -f -# set editor {gvim -f -geometry 90x28} -# set editor { xterm -geometry 100x40 -e nano } -# set editor { xterm -geometry 100x40 -e pico } - -#### For Windows -# set editor {notepad.exe} - -########################################################################### -#### SHOW ERC INFO WINDOW (erc errors, warnings etc) -########################################################################### -#### default: 0 (can be enabled by menu) -# set show_infowindow 0 - -########################################################################### -#### CONFIGURE COMPUTER FARM JOB REDIRECTORS FOR SIMULATIONS -########################################################################### -#### RTDA NC -# set computerfarm {nc run -Il} -#### LSF BSUB -# set computerfarm {bsub -Is} - -########################################################################### -#### TCP CONNECTION WITH GAW -########################################################################### -#### set gaw address for socket connection: {host port} -#### default: set to localhost, port 2020 -# set gaw_tcp_address {localhost 2020} - -########################################################################### -#### XSCHEM LISTEN TO TCP PORT -########################################################################### -#### set xschem listening port; default: not enabled -# set xschem_listen_port 2021 - -########################################################################### -#### BESPICE WAVE SOCKET CONNECTION -########################################################################### -#### set bespice wave listening port; default: not enabled -set bespice_listen_port 2022 - -########################################################################### -#### TCL FILES TO LOAD AT STARTUP -########################################################################### -#### list of tcl files to preload. -# lappend tcl_files ${XSCHEM_SHAREDIR}/change_index.tcl -lappend tcl_files ${XSCHEM_SHAREDIR}/ngspice_backannotate.tcl - -########################################################################### -#### XSCHEM TOOLBAR -########################################################################### -#### default: not enabled. -set toolbar_visible 1 -# set toolbar_horiz 1 - -########################################################################### -#### TABBED WINDOWS -########################################################################### -# default: not enabled. Interface can be changed runtime if only one window -# or tab is open. -set tabbed_interface 1 - -########################################################################### -#### SKYWATER PDK SPECIFIC VARIABLES -########################################################################### - -## check if env var PDK_ROOT exists, and use it for building open_pdks paths -if { [info exists env(PDK_ROOT)] && $env(PDK_ROOT) ne {} } { - ## found variable, set tcl PDK_ROOT var - if {![file isdir $env(PDK_ROOT)]} { - puts stderr "Warning: PDK_ROOT environment variable is set but path not found on the system." - } - set PDK_ROOT $env(PDK_ROOT) -} else { - ## not existing or empty. - puts stderr "Warning: PDK_ROOT env. var. not found or empty, trying to find a pdk install" - if {[file isdir [pwd]/..]} { - set PDK_ROOT [file normalize [pwd]/../..] - } else { - puts stderr {No pdk installation found, set PDK_ROOT env. var. and restart xschem} - } -} - -if {[info exists PDK_ROOT]} { - set 180MCU_MODELS $env(PDK_ROOT)/$env(PDK)/libs.tech/ngspice - puts stderr "pdk installation: using $PDK_ROOT" - puts stderr "180MCU_MODELS: $180MCU_MODELS" -} - -# allow a user-specific path add-on (https://github.com/iic-jku/iic-osic-tools/issues/7) -if { [info exists ::env(XSCHEM_USER_LIBRARY_PATH) ] } { - append XSCHEM_LIBRARY_PATH :$env(XSCHEM_USER_LIBRARY_PATH) -}