From 96f560492393c9ae27bfac2bf0c62a4eb5dcd995 Mon Sep 17 00:00:00 2001 From: Aquiles Viza Date: Fri, 22 Sep 2023 14:10:10 -0300 Subject: [PATCH] Fixed klayout home, added vimrc --- stacks/analog-tools/scripts/.bashrc | 32 +++++++++++++++---- stacks/analog-tools/scripts/.vimrc | 26 +++++++++++++++ .../analog-tools/scripts/install-open-pdks.sh | 15 +++++++++ 3 files changed, 67 insertions(+), 6 deletions(-) create mode 100644 stacks/analog-tools/scripts/.vimrc diff --git a/stacks/analog-tools/scripts/.bashrc b/stacks/analog-tools/scripts/.bashrc index bb92fd1..511b22f 100644 --- a/stacks/analog-tools/scripts/.bashrc +++ b/stacks/analog-tools/scripts/.bashrc @@ -17,13 +17,33 @@ sky130A) ;; esac +function git_branch { + branch=$(git symbolic-ref --short HEAD 2>/dev/null) + if [ "$branch" != "" ]; then + echo "[$branch]" + fi +} -alias ls="ls --color=auto -XA" +c_res='\[\033[00m\]' # Reset +c_bla='\[\033[01;30m\]' # Black +c_red='\[\033[01;31m\]' # Red +c_gre='\[\033[01;32m\]' # Green +c_yel='\[\033[01;33m\]' # Yellow +c_blu='\[\033[01;34m\]' # Blue +c_pur='\[\033[01;35m\]' # Purple +c_cya='\[\033[01;36m\]' # Cyan +c_whi='\[\033[01;37m\]' # White + +# export PS1="${c_pur}\w $(git_branch)\n${c_res}\$ " ## This dont work :( +PS1="${c_pur}\w \n${c_res}\$ " ## This dont work :( + +export KLAYOUT_HOME=$PDK_ROOT/$PDK/libs.tech/klayout +export DESIGNS="/home/designer/shared" + +alias ls="ls --color=auto -XF" alias grep="grep --color=auto" -PS1="[\u@\h \W]\$ " +alias xschem='xschem -b --rcfile $PDK_ROOT/$PDK/libs.tech/xschem/xschemrc' +alias xschemtcl='xschem --rcfile $PDK_ROOT/$PDK/libs.tech/xschem/xschemrc' -## Tools Support - -alias xschem='xschem -b --rcfile $PDKPATH/libs.tech/xschem/xschemrc' -alias xschemtcl='xschem --rcfile $PDKPATH/libs.tech/xschem/xschemrc' \ No newline at end of file +git config --global --add safe.directory $DESIGNS \ No newline at end of file diff --git a/stacks/analog-tools/scripts/.vimrc b/stacks/analog-tools/scripts/.vimrc new file mode 100644 index 0000000..bc9b26a --- /dev/null +++ b/stacks/analog-tools/scripts/.vimrc @@ -0,0 +1,26 @@ +set nocompatible +filetype plugin on +filetype indent on +syntax on + +set number relativenumber +set autoindent expandtab tabstop=4 shiftwidth=4 +set cursorline +set mouse=a +set showcmd +set showmatch +set lazyredraw +set ttyfast + + +set clipboard="unnamedplus" +set showmatch +set wildmenu +set backspace=indent,eol,start + + +let &t_SI="\e[6 q" +let &t_EI="\e[2 q" +let &t_ut='' + + diff --git a/stacks/analog-tools/scripts/install-open-pdks.sh b/stacks/analog-tools/scripts/install-open-pdks.sh index 423b8b7..ef2ab48 100644 --- a/stacks/analog-tools/scripts/install-open-pdks.sh +++ b/stacks/analog-tools/scripts/install-open-pdks.sh @@ -46,6 +46,21 @@ 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 + +# 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 + +# 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}"