Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
13461c39c6 | ||
|
6885bf1076 | ||
|
455c759f08 | ||
|
62fae6b2bd | ||
|
e9bba39379 | ||
|
167797effe | ||
|
2069040fe4 | ||
|
ffd56db136 | ||
|
594b3b13c3 | ||
|
b580b9d649 | ||
|
3d589f60d2 | ||
|
1e5601bb33 | ||
|
02bec29f55 | ||
|
961108837a |
@ -6,7 +6,7 @@ FROM greyltc/archlinux-aur:paru as osicstacks-base-desktop
|
||||
RUN pacman -Syuq --noconfirm
|
||||
|
||||
# Install packages
|
||||
RUN aur-install sudo git git-lfs python python-pip python-pipx xz gnu-free-fonts vim ngspice gedit jupyter-notebook xterm
|
||||
RUN aur-install sudo git git-lfs python python-pip python-pipx xz gnu-free-fonts vim ngspice gedit jupyter-notebook xterm wget
|
||||
ENV TERM=xterm EDITOR=gedit
|
||||
|
||||
# Clean cache
|
||||
|
57
run.ps1
57
run.ps1
@ -20,13 +20,29 @@ $global:STACK_OPTIONS = [ordered]@{
|
||||
$global:SELECTED_STACK='chipathon-tools'
|
||||
$global:CONTAINER_NAME=$global:SELECTED_STACK
|
||||
$global:EXECMODE='desktop'
|
||||
$global:PDK="gf180mcuC"
|
||||
$global:PDK="gf180mcuD"
|
||||
$global:DIRECTORY=Get-Location | Foreach-Object { $_.Path }
|
||||
$global:WSL_DISTRO="NO DISTRO"
|
||||
|
||||
$global:PARAMS = ""
|
||||
|
||||
New-Alias Call Invoke-Expression
|
||||
|
||||
function debug($fname, $message) {
|
||||
Write-Host "[$fname] $message" -ForegroundColor Green
|
||||
}
|
||||
|
||||
function get-ubuntu-distro() {
|
||||
# Identify if distro has (Predeterminado) or something like that
|
||||
Invoke-Expression "wsl --list" | ForEach-Object {
|
||||
if ($_ -match '\)' ) {
|
||||
$global:WSL_DISTRO=$_.split('(')[0].replace(" ","")
|
||||
}
|
||||
}
|
||||
|
||||
debug "get-ubuntu-distro" "Linux distribution: $global:WSL_DISTRO"
|
||||
}
|
||||
|
||||
function validate-environment() {
|
||||
Write-Host "Checking requirements and WSL updates" -ForegroundColor DarkGray
|
||||
|
||||
@ -120,9 +136,34 @@ function path-conversion() {
|
||||
echo "/mnt/$($drive.tolower())$($path.replace("\","/"))"
|
||||
}
|
||||
|
||||
function get-value-from-wsl () {
|
||||
function get-value-from-wsl() {
|
||||
$variable, $other = $args
|
||||
return "$(wsl -d Ubuntu bash -c "echo `$$variable")"
|
||||
|
||||
$cmd = "wsl bash -c `'echo `$$variable`'"
|
||||
|
||||
# Simple replacement
|
||||
#$cmd = "wsl -d $global:WSL_DISTRO bash -c `'echo `$$variable`'"
|
||||
#$cmd = "wsl -d `'$global:WSL_DISTRO`' bash -c `'echo `$$variable`'"
|
||||
|
||||
# Using parenthesis
|
||||
#$cmd = "wsl -d $($global:WSL_DISTRO) bash -c `'echo `$$variable`'"
|
||||
#$cmd = "wsl -d `'$($global:WSL_DISTRO)`' bash -c `'echo `$$variable`'"
|
||||
#$cmd = "wsl -d `"$($global:WSL_DISTRO)`" bash -c `'echo `$$variable`'"
|
||||
|
||||
# Using curly braces
|
||||
#$cmd = "wsl -d ${global:WSL_DISTRO} bash -c `'echo `$$variable`'"
|
||||
#$cmd = "wsl -d '${global:WSL_DISTRO}' bash -c `'echo `$$variable`'"
|
||||
|
||||
# Using here strings (Never worked)
|
||||
# @"
|
||||
# "wsl -d $global:WSL_DISTRO bash -c `'echo `$$variable`'"
|
||||
# "@
|
||||
|
||||
debug "get-value-from-wsl" "Command: $cmd"
|
||||
|
||||
$response = Invoke-Expression "$cmd"
|
||||
debug "get-value-from-wsl" "Response: $response"
|
||||
return $response
|
||||
}
|
||||
|
||||
function set-common-parameters () {
|
||||
@ -160,7 +201,8 @@ function run-docker-wsl() {
|
||||
$global:PARAMS += " -v /mnt/wslg:/mnt/wsl"
|
||||
$global:PARAMS += " -v ${global:DIRECTORY}:/home/designer/shared "
|
||||
|
||||
Call "wsl -d Ubuntu bash --noprofile --norc -ic `"docker run $global:PARAMS $global:IMAGE $global:COMMAND`""
|
||||
#Call "wsl -d $global:WSL_DISTRO bash --noprofile --norc -ic `"docker run $global:PARAMS $global:IMAGE $global:COMMAND`""
|
||||
Call "wsl bash --noprofile --norc -ic `"docker run $global:PARAMS $global:IMAGE $global:COMMAND`""
|
||||
|
||||
if ($?) {
|
||||
Write-Host "Container created successfully!" -ForegroundColor Green
|
||||
@ -173,9 +215,9 @@ function run-docker-wsl() {
|
||||
}
|
||||
|
||||
function run-docker-win() {
|
||||
$global:PARAMS += " -v '\\wsl.localhost\Ubuntu\mnt\wslg:/tmp'"
|
||||
$global:PARAMS += " -v '\\wsl.localhost\$global:WSL_DISTRO\mnt\wslg:/tmp'"
|
||||
$global:PARAMS += " -v ${global:DIRECTORY}:/home/designer/shared"
|
||||
#$global:PARAMS += " -v '\\wsl.localhost\Ubuntu\mnt\wslg\runtime-dir'%XDG_RUNTIME_DIR%"
|
||||
#$global:PARAMS += " -v '\\wsl.localhost\$global:WSL_DISTRO\mnt\wslg\runtime-dir'%XDG_RUNTIME_DIR%"
|
||||
|
||||
Call "docker run $global:PARAMS $global:IMAGE $global:COMMAND"
|
||||
|
||||
@ -193,7 +235,7 @@ function download-run-bat () {
|
||||
if (!$download) { return }
|
||||
|
||||
try {
|
||||
$response = Call "Invoke-WebRequest -URI https://git.1159.cl/Mario1159/osic-stacks/src/branch/main/run.ps1"
|
||||
$response = Call "Invoke-WebRequest -URI https://git.1159.cl/Mario1159/osic-stacks/raw/branch/main/run.ps1 -OutFile run.ps1"
|
||||
} catch {
|
||||
$StatusCode = $_.Exception.Response.StatusCode.value__
|
||||
Write-Host "Error downloading file :( ($($StatusCode))" -ForegroundColor Red
|
||||
@ -214,6 +256,7 @@ function run(){
|
||||
|
||||
download-run-bat
|
||||
validate-environment
|
||||
get-ubuntu-distro
|
||||
|
||||
if ($interactive) {
|
||||
select-stack
|
||||
|
@ -2,6 +2,8 @@ ARG BASE_IMG=heavy-desktop
|
||||
FROM $BASE_IMG as chipathon-tools
|
||||
|
||||
# Add scripts
|
||||
COPY --chown=designer:designer --chmod=755 stacks/chipathon-tools/scripts/global-variables.sh .
|
||||
|
||||
COPY --chown=designer:designer --chmod=755 stacks/chipathon-tools/scripts/install-open-pdks.sh .
|
||||
RUN ./install-open-pdks.sh
|
||||
|
||||
@ -12,4 +14,4 @@ RUN ./patch-open-pdks-sky130.sh
|
||||
RUN rm *.sh
|
||||
|
||||
# Initialize the enviroment keeping container alive
|
||||
CMD ["sleep", "infinity"]
|
||||
CMD ["sleep", "infinity"]
|
||||
|
@ -1,22 +1,33 @@
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
# ------------------
|
||||
# SET PDK PARAMETERS
|
||||
# ------------------
|
||||
|
||||
if [ "$PDK" == "" ]; then
|
||||
echo "PDK not defined, using default one (gf180mcuD)"
|
||||
PDK=gf180mcuD
|
||||
fi
|
||||
|
||||
case "$PDK" in
|
||||
gf180mcuC)
|
||||
export PDKPATH=$PDK_ROOT/$PDK
|
||||
export STD_CELL_LIBRARY=gf180mcu_fd_sc_mcu7t5v0
|
||||
;;
|
||||
sky130A)
|
||||
export PDKPATH=$PDK_ROOT/$PDK
|
||||
export STD_CELL_LIBRARY=sky130_fd_sc_hd
|
||||
;;
|
||||
*)
|
||||
echo "PDK not defined, using default one (gf180mcuC)"
|
||||
export PDK=gf180mcuC
|
||||
export PDKPATH=$PDK_ROOT/$PDK
|
||||
export STD_CELL_LIBRARY=gf180mcu_fd_sc_mcu7t5v0
|
||||
;;
|
||||
gf180mcuC) echo "gf180mcuC is not supported, only D variant [default one]" ;;
|
||||
gf180mcuD) export STD_CELL_LIBRARY=gf180mcu_fd_sc_mcu7t5v0 ;;
|
||||
sky130A) export STD_CELL_LIBRARY=sky130_fd_sc_hd ;;
|
||||
*) echo "PDK $PDK NOT RECOGNIZED";;
|
||||
esac
|
||||
|
||||
export PDKPATH=$PDK_ROOT/$PDK
|
||||
|
||||
export KLAYOUT_HOME=$PDK_ROOT/$PDK/libs.tech/klayout
|
||||
|
||||
alias xschem='xschem -b --rcfile $PDK_ROOT/$PDK/libs.tech/xschem/xschemrc'
|
||||
alias xschemtcl='xschem --rcfile $PDK_ROOT/$PDK/libs.tech/xschem/xschemrc'
|
||||
#alias magic='magic --rcfile $PDK_ROOT/$PDK/libs.tech/magic/*.magicrc'
|
||||
|
||||
# ------------------
|
||||
# SET PROMPT
|
||||
# ------------------
|
||||
|
||||
function git_branch {
|
||||
branch=$(git symbolic-ref --short HEAD 2>/dev/null)
|
||||
if [ "$branch" != "" ]; then
|
||||
@ -37,13 +48,12 @@ 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"
|
||||
# --------------------------------
|
||||
# USEFUL ENV VARIABLES AND ALIASES
|
||||
# --------------------------------
|
||||
|
||||
alias ls="ls --color=auto -XF"
|
||||
alias grep="grep --color=auto"
|
||||
|
||||
alias xschem='xschem -b --rcfile $PDK_ROOT/$PDK/libs.tech/xschem/xschemrc'
|
||||
alias xschemtcl='xschem --rcfile $PDK_ROOT/$PDK/libs.tech/xschem/xschemrc'
|
||||
|
||||
git config --global --add safe.directory $DESIGNS
|
||||
git config --global --add safe.directory /home/designer/shared
|
||||
git config --global --add safe.directory /workspaces/*
|
||||
|
2110
stacks/chipathon-tools/scripts/gf180mcu.lyp
Normal file
2110
stacks/chipathon-tools/scripts/gf180mcu.lyp
Normal file
File diff suppressed because it is too large
Load Diff
12
stacks/chipathon-tools/scripts/global-variables.sh
Normal file
12
stacks/chipathon-tools/scripts/global-variables.sh
Normal file
@ -0,0 +1,12 @@
|
||||
export PDK_ROOT=/home/designer/.volare
|
||||
#export OPEN_PDKS_COMMIT="cd1748bb197f9b7af62a54507de6624e30363943"
|
||||
export OPEN_PDKS_COMMIT="bdc9412b3e468c102d01b7cf6337be06ec6e9c9a"
|
||||
|
||||
# This files can be downloaded directly
|
||||
# - sky130A_mr.drc
|
||||
# - gf180mcuD_mr.drc
|
||||
export PRECHECK_REPO=https://raw.githubusercontent.com/efabless/mpw_precheck/main/checks/tech-files/
|
||||
export PRECHECK_GF_FILE=gf180mcuD_mr.drc
|
||||
export PRECHECK_SKY_FILE=sky130A_mr.drc
|
||||
|
||||
export SCRIPT_DIR=$PWD
|
@ -1,34 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
export OPEN_PDKS_VERSION="dd7771c384ed36b91a25e9f8b314355fc26561be"
|
||||
export SCRIPT_DIR=$PWD
|
||||
source ./global-variables.sh
|
||||
|
||||
#pip install git+https://github.com/gdsfactory/skywater130.git git+https://github.com/gdsfactory/gf180.git --upgrade --break-system-packages
|
||||
pip install gf180 --upgrade --break-system-packages
|
||||
pip install sky130 --upgrade --break-system-packages
|
||||
# pip install gf180 --upgrade --break-system-packages
|
||||
# pip install sky130 --upgrade --break-system-packages
|
||||
pip install gdsfactory[cad]==7.3.0 --break-system-packages
|
||||
|
||||
######################
|
||||
# INSTALL GF180MCU PDK
|
||||
######################
|
||||
|
||||
volare enable "${OPEN_PDKS_VERSION}" --pdk gf180mcu
|
||||
volare enable "${OPEN_PDKS_COMMIT}" --pdk gf180mcu
|
||||
|
||||
rm -rf $PDK_ROOT/volare/gf180mcu/versions/*/gf180mcuA
|
||||
rm -rf $PDK_ROOT/volare/gf180mcu/versions/*/gf180mcuB
|
||||
rm -rf $PDK_ROOT/volare/gf180mcu/versions/*/gf180mcuD
|
||||
rm -rf $PDK_ROOT/volare/gf180mcu/versions/*/gf180mcuC
|
||||
rm -rf $PDK_ROOT/gf180mcuA
|
||||
rm -rf $PDK_ROOT/gf180mcuB
|
||||
rm -rf $PDK_ROOT/gf180mcuD
|
||||
rm -rf $PDK_ROOT/gf180mcuC
|
||||
|
||||
####################
|
||||
# INSTALL SKY130 PDK
|
||||
####################
|
||||
|
||||
volare enable "${OPEN_PDKS_VERSION}" --pdk sky130
|
||||
|
||||
# ADD PCELL SUPPORT
|
||||
volare enable "${OPEN_PDKS_COMMIT}" --pdk sky130
|
||||
|
||||
# remove version sky130B to save space (efabless TO use mostly sky130A)
|
||||
rm -rf "$PDK_ROOT"/volare/sky130/versions/*/sky130B
|
||||
|
@ -1,82 +1,168 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
SCRIPT_DIR=$PWD
|
||||
function _gf180mcuD_clean_install() {
|
||||
# Re-installs gf180mcuD
|
||||
|
||||
# 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
|
||||
rm -rf $PDK_ROOT/gf180mcu*
|
||||
rm -rf $PDK_ROOT/volare/gf180mcu/versions/$OPEN_PDKS_COMMIT
|
||||
|
||||
sudo aur-install wget
|
||||
pip install docopt --upgrade --break-system-packages
|
||||
volare enable --pdk gf180mcu $OPEN_PDKS_COMMIT
|
||||
|
||||
rm -rf $PDK_ROOT/gf180mcuA
|
||||
rm -rf $PDK_ROOT/gf180mcuB
|
||||
rm -rf $PDK_ROOT/gf180mcuC
|
||||
|
||||
rm -rf $PDK_ROOT/volare/gf180mcu/versions/$OPEN_PDKS_COMMIT/gf180mcuA
|
||||
rm -rf $PDK_ROOT/volare/gf180mcu/versions/$OPEN_PDKS_COMMIT/gf180mcuB
|
||||
rm -rf $PDK_ROOT/volare/gf180mcu/versions/$OPEN_PDKS_COMMIT/gf180mcuC
|
||||
}
|
||||
|
||||
|
||||
function gf180_patch_xschemrc() {
|
||||
FILEPATH=$PDK_ROOT/gf180mcuC/libs.tech/xschem/xschemrc
|
||||
function gf180_delete_repos() {
|
||||
rm -rf globalfoundries-pdk-libs-gf180mcu_fd_pr
|
||||
rm -rf globalfoundries-pdk-libs-gf180mcu_fd_pv
|
||||
}
|
||||
|
||||
|
||||
function gf180_download_repos() {
|
||||
gf180_delete_repos
|
||||
|
||||
git clone --depth 1 https://github.com/efabless/globalfoundries-pdk-libs-gf180mcu_fd_pr.git
|
||||
git clone --depth 1 https://github.com/efabless/globalfoundries-pdk-libs-gf180mcu_fd_pv.git
|
||||
}
|
||||
|
||||
|
||||
function gf180_patch_ngspice_primitives() {
|
||||
NGSPICE_TECH=$PDK_ROOT/gf180mcuD/libs.tech/ngspice
|
||||
|
||||
rm -rf $NGSPICE_TECH
|
||||
mv globalfoundries-pdk-libs-gf180mcu_fd_pr/models/ngspice $NGSPICE_TECH
|
||||
}
|
||||
|
||||
|
||||
function gf180_patch_xyce_primitives() {
|
||||
XYCE_TECH=$PDK_ROOT/gf180mcuD/libs.tech/xyce
|
||||
|
||||
rm -rf $XYCE_TECH
|
||||
mv globalfoundries-pdk-libs-gf180mcu_fd_pr/models/xyce $XYCE_TECH
|
||||
}
|
||||
|
||||
function gf180_patch_xschem_primitives() {
|
||||
# Replace volare xschem dir with efabless one
|
||||
XSCHEM_TECH=$PDK_ROOT/gf180mcuD/libs.tech/xschem
|
||||
|
||||
rm -rf $XSCHEM_TECH
|
||||
mv globalfoundries-pdk-libs-gf180mcu_fd_pr/cells/xschem $XSCHEM_TECH
|
||||
}
|
||||
|
||||
function gf180_patch_xschem_xschemrc() {
|
||||
FILEPATH=$PDK_ROOT/gf180mcuD/libs.tech/xschem/xschemrc
|
||||
|
||||
# Add gf180mcuD symbols to xschem path
|
||||
ORIGINAL='append XSCHEM_LIBRARY_PATH :$env(PWD)'
|
||||
REPLACE='append XSCHEM_LIBRARY_PATH :$env(PDK_ROOT)/$env(PDK)/libs.tech/xschem'
|
||||
REPLACE='append XSCHEM_LIBRARY_PATH :$env(PDK_ROOT)/gf180mcuD/libs.tech/xschem'
|
||||
sed -i "s\\$ORIGINAL\\$REPLACE\g" $FILEPATH
|
||||
|
||||
# Update 180MCU_MODELS
|
||||
ORIGINAL='set 180MCU_MODELS ${PDK_ROOT}/models/ngspice'
|
||||
REPLACE='set 180MCU_MODELS $env(PDK_ROOT)/$env(PDK)/libs.tech/ngspice'
|
||||
REPLACE='set 180MCU_MODELS $env(PDK_ROOT)/gf180mcuD/libs.tech/ngspice'
|
||||
sed -i "s\\$ORIGINAL\\$REPLACE\g" $FILEPATH
|
||||
|
||||
# Allow setting of symbol paths with XSCHEM_USER_LIBRARY_PATH env variable
|
||||
echo '' >> $FILEPATH
|
||||
echo '# open_pdks-specific' >> $FILEPATH
|
||||
echo 'set XSCHEM_START_WINDOW ${PDK_ROOT}/gf180mcuD/libs.tech/xschem/tests/0_top.sch' >> $FILEPATH
|
||||
echo 'append XSCHEM_LIBRARY_PATH :${PDK_ROOT}/gf180mcuD/libs.tech/xschem' >> $FILEPATH
|
||||
echo '' >> $FILEPATH
|
||||
echo '# allow a user-specific path add-on' >> $FILEPATH
|
||||
echo 'if { [info exists ::env(XSCHEM_USER_LIBRARY_PATH) ] } {' >> $FILEPATH
|
||||
echo ' append XSCHEM_LIBRARY_PATH :$env(XSCHEM_USER_LIBRARY_PATH)' >> $FILEPATH
|
||||
echo '}' >> $FILEPATH
|
||||
}
|
||||
|
||||
function gf180_patch_klayout_pcells() {
|
||||
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
|
||||
# Delete old volare pymacros, use the pcells from efabless repo.
|
||||
|
||||
rm -rf .scripts/klayout
|
||||
rm -rf $KLAYOUT_HOME/pymacros
|
||||
mv globalfoundries-pdk-libs-gf180mcu_fd_pr/cells/klayout/pymacros $KLAYOUT_HOME
|
||||
}
|
||||
|
||||
function gf180_patch_klayout_tech_clean() {
|
||||
# DRC and LVS is obsolete, and the copy is made on $KLAYOUT_HOME/
|
||||
rm -rf $KLAYOUT_HOME/tech/drc
|
||||
rm -rf $KLAYOUT_HOME/tech/lvs
|
||||
|
||||
# .lym should be on $KLAYOUT_HOME/pymacros
|
||||
rm -rf $KLAYOUT_HOME/tech/gf180mcu.lym
|
||||
}
|
||||
|
||||
function gf180_patch_klayout_drc_lvs() {
|
||||
rm -rf $KLAYOUT_HOME/drc
|
||||
rm -rf $KLAYOUT_HOME/lvs
|
||||
|
||||
mv globalfoundries-pdk-libs-gf180mcu_fd_pv/klayout/drc $KLAYOUT_HOME
|
||||
mv globalfoundries-pdk-libs-gf180mcu_fd_pv/klayout/lvs $KLAYOUT_HOME
|
||||
}
|
||||
|
||||
function gf180_patch_klayout_dropdown() {
|
||||
# 27:00 & 36:40
|
||||
DROPDOWN_REPO="https://github.com/mabrains/globalfoundries-pdk-libs-gf180mcu_fd_pr"
|
||||
DROPDOWN_DIRECTORY="gf_dropdown"
|
||||
# dropdown menu should live on $KLAYOUT_HOME/macro
|
||||
# Depends on $KLAYOUT_HOME/drc $KLAYOUT_HOME/lvs
|
||||
mv globalfoundries-pdk-libs-gf180mcu_fd_pr/rules/klayout/macros $KLAYOUT_HOME
|
||||
|
||||
git clone $DROPDOWN_REPO $DROPDOWN_DIRECTORY
|
||||
# Make D the default variant in {drc lvs}_options.yml
|
||||
FILEPATH=$KLAYOUT_HOME/macros/*_options.yml
|
||||
|
||||
ORIGINAL='variant: C'
|
||||
REPLACE='variant: D'
|
||||
sed -i "s\\$ORIGINAL\\$REPLACE\g" $FILEPATH
|
||||
|
||||
cp -r $DROPDOWN_DIRECTORY/rules/klayout/macros $KLAYOUT_HOME
|
||||
# Make D default on .lym
|
||||
FILEPATH=$KLAYOUT_HOME/macros/gf180mcu_options.lym
|
||||
|
||||
rm -rf $DROPDOWN_DIRECTORY
|
||||
}
|
||||
ORIGINAL=';"C"'
|
||||
REPLACE=';"D"'
|
||||
sed -i "s\\$ORIGINAL\\$REPLACE\g" $FILEPATH
|
||||
|
||||
function gf180_patch_klayout_gf_drc() {
|
||||
# 27:00 & 36:40
|
||||
GF_VERIFICATION_REPO=https://github.com/efabless/globalfoundries-pdk-libs-gf180mcu_fd_pv
|
||||
VERIFICATION_DIR="gf_verification"
|
||||
|
||||
git clone $GF_VERIFICATION_REPO $VERIFICATION_DIR
|
||||
|
||||
# rm -rf $KLAYOUT_HOME/drc
|
||||
# rm -rf $KLAYOUT_HOME/lvs
|
||||
|
||||
cp -r $VERIFICATION_DIR/klayout/drc/* $KLAYOUT_HOME/drc
|
||||
cp -r $VERIFICATION_DIR/klayout/lvs/* $KLAYOUT_HOME/lvs
|
||||
|
||||
rm -rf $VERIFICATION_DIR
|
||||
ORIGINAL='], 2)'
|
||||
REPLACE='], 3)'
|
||||
sed -i "s\\$ORIGINAL\\$REPLACE\g" $FILEPATH
|
||||
}
|
||||
|
||||
function gf180_patch_klayout_precheck_drc() {
|
||||
#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
|
||||
wget -O $KLAYOUT_HOME/drc/$PRECHECK_GF_FILE $PRECHECK_REPO/$PRECHECK_GF_FILE
|
||||
}
|
||||
|
||||
function gf180_patch_klayout_lyp() {
|
||||
# If $KLAYOUT_HOME/tech is not modified, this has no dependencies
|
||||
mv gf180mcu.lyp $KLAYOUT_HOME/tech/gf180mcu.lyp
|
||||
}
|
||||
|
||||
function gf180_patch() {
|
||||
export KLAYOUT_HOME="$PDK_ROOT/gf180mcuC/libs.tech/klayout"
|
||||
gf180_patch_xschemrc
|
||||
# volare pdk should be installed with ./volare_install.sh
|
||||
export KLAYOUT_HOME="$PDK_ROOT/gf180mcuD/libs.tech/klayout"
|
||||
|
||||
gf180_download_repos
|
||||
|
||||
gf180_patch_ngspice_primitives
|
||||
|
||||
gf180_patch_xyce_primitives
|
||||
|
||||
gf180_patch_xschem_primitives
|
||||
gf180_patch_xschem_xschemrc
|
||||
|
||||
gf180_patch_klayout_pcells
|
||||
gf180_patch_klayout_precheck_drc
|
||||
gf180_patch_klayout_tech_clean
|
||||
gf180_patch_klayout_drc_lvs
|
||||
gf180_patch_klayout_dropdown
|
||||
gf180_patch_klayout_gf_drc
|
||||
gf180_patch_klayout_precheck_drc
|
||||
gf180_patch_klayout_lyp
|
||||
|
||||
gf180_delete_repos
|
||||
}
|
||||
|
||||
gf180_patch
|
||||
source ./global-variables.sh
|
||||
|
||||
sudo aur-install gedit xterm gvim
|
||||
#_gf180mcuD_clean_install
|
||||
pip install docopt --upgrade --break-system-packages
|
||||
gf180_patch
|
||||
|
@ -1,23 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
SCRIPT_DIR=$PWD
|
||||
|
||||
# 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
|
||||
|
||||
# TODO: DOWNLOAD WITH WGET, DONT HAVE IT STATIC
|
||||
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
|
||||
|
||||
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
|
||||
@ -69,6 +52,12 @@ function sky130_patch() {
|
||||
sky130_patch_klayout_precheck_drc
|
||||
}
|
||||
|
||||
sky130_patch
|
||||
source ./global-variables.sh
|
||||
|
||||
sudo aur-install gedit xterm gvim
|
||||
# TODO: DOWNLOAD WITH WGET, DONT HAVE IT STATIC
|
||||
if [ -d $SCRIPT_DIR/iic-spice-model-red.py ]; then
|
||||
echo File iic-spice-model.red.py not found
|
||||
return -1
|
||||
fi
|
||||
|
||||
sky130_patch
|
Loading…
Reference in New Issue
Block a user