Skip to content

Commit

Permalink
added corners to the pdk
Browse files Browse the repository at this point in the history
tried to add qflow with no luck
  • Loading branch information
mkkassem committed Feb 21, 2022
1 parent 88349f1 commit 055e53b
Show file tree
Hide file tree
Showing 26 changed files with 197 additions and 56 deletions.
2 changes: 1 addition & 1 deletion build-all.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
virtualenv -p python3 venv
source venv/bin/activate
pip3 install -r requirements.txt
python3 run.py recipe --csv recipes/recipe.csv
python3 run.py recipe --csv $1

2 changes: 1 addition & 1 deletion images/cvc/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ git checkout ${REPO_COMMIT}
cd src
make -f makefile.cvc64
cd ..
cp src/cvc64 bin/cvc
cp src/cvc64 bin/cvc64
5 changes: 4 additions & 1 deletion images/foss-asic-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ FROM base
#FROM dv as dv


COPY --from=pdk /foss/pdks/ /foss/pdks/
COPY --from=pdk /foss/pdks/share/pdk/ /foss/pdks/
COPY --from=openlane /foss/tools/openlane /foss/tools/openlane
COPY --from=openlane /foss/tools/openlane_tools /foss/tools/openlane_tools
COPY --from=gtkwave /foss/tools/ /foss/tools/
Expand All @@ -84,6 +84,9 @@ ADD ./addons/sak /foss/tools/sak
COPY ./addons/.klayout/ /headless/.klayout/
COPY ./addons/.gaw/ /headless/.gaw/
COPY ./addons/examples /foss/examples
COPY ./addons/.spiceinit /headless/.spiceinit
COPY ./addons/spice.rc /headless/spice.rc


ADD ./scripts/env.sh $HOME/.bashrc
RUN bash $HOME/.bashrc
Expand Down
3 changes: 3 additions & 0 deletions images/foss-asic-tools/addons/.spiceinit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set num_threads=16
set ngbehavior=hsa
set ng_nomodcheck
3 changes: 3 additions & 0 deletions images/foss-asic-tools/addons/spice.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set num_threads=16
set ngbehavior=hsa
set ng_nomodcheck
4 changes: 2 additions & 2 deletions images/foss-asic-tools/scripts/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export LD_LIBRARY_PATH=$(realpath $base_path/klayout/*/ )
export LC_ALL=en_US.utf-8 && export LANG=en_US.utf-8


export PDK_ROOT=/foss/pdks
export PDK_ROOT=/foss/pdk
export TOOLS=/foss/tools
export DESIGNS=/foss/designs
export PDK=sky130A
Expand All @@ -52,7 +52,7 @@ alias kf='klayout -c $SAK/klayout/tech/sky130A/sky130A.krc -nn $PDK_ROOT/$PD

alias tt='cd /foss/tools'
alias dd='cd /foss/designs'
alias pp='cd /foss/pdks'
alias pp='cd /foss/pdk'
alias destroy='sudo \rm -rf'
alias cp='cp -i'
alias egrep='egrep '
Expand Down
20 changes: 11 additions & 9 deletions images/foss-asic-tools/scripts/miscellaneous.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
#!/bin/bash


############### Openlane / openroad

###############
pip install click pyyaml panda

###############
yum install -y libQt5Widgets.so*
yum install -y libtclreadline-2.1.0.*
yum install -y hub


###############

mkdir -p $DESIGNS
chmod -R 777 $DESIGNS
mkdir -p /foss/designs
mkdir -p /foss/pdks

###############
mkdir -p /foss/tools/bin
cd /foss/tools/bin
ln -s ../*/*/bin/* .


ln -s $TOOLS/xschem/*/* $TOOLS/xschem/

###############
groupmod -n designers games

chown -R default:designers /headless
chown -R default:designers /foss/designs

###############
ln -s $TOOLS/xschem/*/* $TOOLS/xschem/

###############
mkdir $STARTUPDIR/logs


2 changes: 1 addition & 1 deletion images/klayout/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"BASE_IMAGE": "base",
"NAME": "klayout",
"REPO_URL": "https://github.com/KLayout/klayout",
"REPO_COMMIT": "0132ad08f7623e9fe39d614dae7134814a404d33"
"REPO_COMMIT": "cee33a00991a70d39f7c0094c5494956be60f77a"
}
}
2 changes: 1 addition & 1 deletion images/open_pdks/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"MAGIC_IMAGE": "magic",
"NAME": "open_pdks",
"REPO_URL": "https://github.com/RTimothyEdwards/open_pdks",
"REPO_COMMIT": "1bb26d935f86dbe4a385442e73ac073cf1e1a1fe",
"REPO_COMMIT": "7519dfb04400f224f140749cda44ee7de6f5e095",
"SKYWATER_IMAGE": "skywater-pdk"
}
}
33 changes: 13 additions & 20 deletions images/open_pdks/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,24 @@ git checkout master
git pull
git checkout -qf ${REPO_COMMIT}

./configure --enable-sky130-pdk=$pdk_path/skywater-pdk --enable-alpha-sky130 --enable-xschem-sky130 \
--enable-sram-sky130 --with-sky130-variants=all




#make veryclean
# deletes the staging areas vs. make clean which doesnt delete the staging areas

# make prerequisites
make
./configure --enable-sky130-pdk=$pdk_path/skywater-pdk --enable-alpha-sky130 --enable-xschem-sky130 \
--enable-sram-sky130 --with-sky130-variants=all --with-sky130-local-path=$pdk_path

make -j$(nproc)
make SHARED_PDKS_PATH=$pdk_path install
make distclean


#touch $pdk_path/sky130A/SOURCES
#printf "skywater-pdk " >> $pdk_path/sky130A/SOURCES
#cd $pdk_path/skywater-pdk && git rev-parse HEAD >> $pdk_path/sky130A/SOURCES
#printf "open_pdks " >> $pdk_path/sky130A/SOURCES
#cd $pdk_path/open_pdks && git rev-parse HEAD >> $pdk_path/sky130A/SOURCES
#printf "magic $magic_version" >> $pdk_path/sky130A/SOURCES

touch $pdk_path/sky130A/SOURCES
printf "skywater-pdk " >> $pdk_path/sky130A/SOURCES
cd $pdk_path/skywater-pdk && git rev-parse HEAD >> $pdk_path/sky130A/SOURCES
printf "open_pdks " >> $pdk_path/sky130A/SOURCES
cd $pdk_path/open_pdks && git rev-parse HEAD >> $pdk_path/sky130A/SOURCES
printf "magic $magic_version" >> $pdk_path/sky130A/SOURCES

cp $pdk_path/sky130A/SOURCES $pdk_path/sky130B/SOURCES
#cp $pdk_path/sky130A/SOURCES $pdk_path/sky130B/SOURCES

cd $pdk_path
\rm -rf skywater-pdk open_pdks share
#\rm -rf skywater-pdk open_pdks
#\rm -rf skywater-pdk open_pdks share

13 changes: 9 additions & 4 deletions images/openlane/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ ARG REPO_COMMIT
ARG REPO_URL
ARG NAME

RUN mkdir -p /foss/tools/${NAME}_tools/${REPO_COMMIT}
RUN mkdir -p /foss/tools/${NAME}/${REPO_COMMIT}
COPY --from=openlane /build /foss/tools/${NAME}_tools/${REPO_COMMIT}
RUN git clone ${REPO_URL} --branch=${REPO_COMMIT} /foss/tools/${NAME}/${REPO_COMMIT}
#RUN mkdir -p /foss/tools/${NAME}_tools/${REPO_COMMIT}
#RUN mkdir -p /foss/tools/${NAME}/${REPO_COMMIT}
#COPY --from=openlane /build /foss/tools/${NAME}_tools/${REPO_COMMIT}
#RUN git clone ${REPO_URL} --branch=${REPO_COMMIT} #/foss/tools/${NAME}/${REPO_COMMIT}RUN mkdir -p

RUN mkdir -p /foss/tools/${NAME}_tools/
RUN mkdir -p /foss/tools/${NAME}/
COPY --from=openlane /build /foss/tools/${NAME}_tools/
RUN git clone ${REPO_URL} --branch=${REPO_COMMIT} /foss/tools/${NAME}/
2 changes: 1 addition & 1 deletion images/openlane/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"BASE_IMAGE": "base",
"NAME": "openlane",
"REPO_URL": "https://github.com/The-OpenROAD-Project/OpenLane",
"REPO_COMMIT": "2022.02.18_02.15.00"
"REPO_COMMIT": "2022.02.19_02.27.52"
}
}
10 changes: 10 additions & 0 deletions images/qflow/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ARG BASE_IMAGE
FROM ${BASE_IMAGE} as builder

ARG REPO_URL
ARG REPO_COMMIT
ARG NAME

ADD scripts/install.sh install.sh
RUN bash install.sh

9 changes: 9 additions & 0 deletions images/qflow/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"args": {
"GIT": "true",
"BASE_IMAGE": "base",
"NAME": "qflow",
"REPO_URL": "https://github.com/rtimothyedwards/qflow",
"REPO_COMMIT": "e1f692f"
}
}
11 changes: 11 additions & 0 deletions images/qflow/scripts/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

source scl_source enable devtoolset-8

git clone ${REPO_URL} ${NAME}
cd ${NAME}
git checkout ${REPO_COMMIT}
./configure --prefix=/foss/tools/${NAME}/${REPO_COMMIT}
make -j$(nproc)
make install

3 changes: 3 additions & 0 deletions images/skywater-pdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ ARG REPO_URL
ARG REPO_COMMIT
ARG NAME

COPY corners/corners.yml /foss/pdks/corners.yml
COPY corners/make_timing.py /foss/pdks/make_timing.py

ADD scripts/dependencies.sh dependencies.sh
RUN bash dependencies.sh

Expand Down
11 changes: 11 additions & 0 deletions images/skywater-pdk/corners/corners.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
sky130_fd_sc_hd:
- tt_025C_1v80
- ff_n40C_1v95
- ss_100C_1v60
sky130_fd_sc_hvl:
- tt_025C_3v30
- tt_025C_3v30_lv1v80
- ff_n40C_5v50
- ff_n40C_4v40_lv1v95
- ss_100C_1v65
- ss_100C_1v65_lv1v40
28 changes: 28 additions & 0 deletions images/skywater-pdk/corners/corners.yml.all
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
sky130_fd_sc_hd:
- tt_025C_1v80
- ff_n40C_1v95
- ss_100C_1v60
sky130_fd_sc_hvl:
- tt_025C_3v30
- tt_025C_3v30_lv1v80
- ff_n40C_5v50
- ff_n40C_4v40_lv1v95
- ss_100C_1v65
- ss_100C_1v65_lv1v40
sky130_fd_sc_hs:
- tt_025C_1v80
- ff_n40C_1v95
- ss_100C_1v60
sky130_fd_sc_hdll:
- tt_025C_1v80
- ff_n40C_1v95
- ss_100C_1v60
sky130_fd_sc_ms:
- tt_025C_1v80
- ff_n40C_1v95
- ss_100C_1v60
sky130_fd_sc_ls:
- tt_025C_1v80
- ff_n40C_1v95
- ss_100C_1v60

11 changes: 11 additions & 0 deletions images/skywater-pdk/corners/corners.yml.reduced
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
sky130_fd_sc_hd:
- tt_025C_1v80
- ff_n40C_1v95
- ss_100C_1v60
sky130_fd_sc_hvl:
- tt_025C_3v30
- tt_025C_3v30_lv1v80
- ff_n40C_5v50
- ff_n40C_4v40_lv1v95
- ss_100C_1v65
- ss_100C_1v65_lv1v40
27 changes: 27 additions & 0 deletions images/skywater-pdk/corners/make_timing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import os
import yaml
import multiprocessing
import subprocess

if __name__ == "__main__":
corners_str = open("./corners.yml").read()
corners_by_scl = yaml.safe_load(corners_str)

def make_timing_on_scl(scl: str, *corners):
print(f"Starting on {scl}: {corners}...", flush=True)
subprocess.check_output(
[
"python3",
"-m",
"skywater_pdk.liberty",
f"libraries/{scl}/latest",
*corners,
]
)
print(f"{scl} done.", flush=True)

pool = multiprocessing.Pool()
for scl, corners in corners_by_scl.items():
pool.apply_async(make_timing_on_scl, (scl, *corners))
pool.close()
pool.join()
2 changes: 1 addition & 1 deletion images/skywater-pdk/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"BASE_IMAGE": "base",
"NAME": "skywater-pdk",
"REPO_URL": "https://github.com/google/skywater-pdk.git",
"REPO_COMMIT": "f70d8ca46961ff92719d8870a18a076370b85f6c"
"REPO_COMMIT": "c094b6e83a4f9298e47f696ec5a7fd53535ec5eb"
}
}
3 changes: 3 additions & 0 deletions images/skywater-pdk/scripts/dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/bin/bash

python3 -m pip install pyyaml



14 changes: 6 additions & 8 deletions images/skywater-pdk/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,21 @@ source scl_source enable devtoolset-8
mkdir -p /foss/pdks
git clone ${REPO_URL} /foss/pdks/${NAME}/
cd /foss/pdks/${NAME}/ && \

git checkout main && git submodule init && git pull --no-recurse-submodules && \
git checkout main && \
git checkout -qf ${REPO_COMMIT} && \
git submodule update --init libraries/sky130_fd_sc_hd/latest && \
git submodule update --init libraries/sky130_fd_io/latest && \
git submodule update --init libraries/sky130_fd_sc_hvl/latest && \
git submodule update --init libraries/sky130_fd_pr/latest && \
##########
git submodule update --init libraries/sky130_fd_pr_reram/latest && \
git submodule update --init libraries/sky130_fd_sc_lp/latest && \
git submodule update --init libraries/sky130_fd_sc_hs/latest && \
git submodule update --init libraries/sky130_fd_sc_ms/latest && \
git submodule update --init libraries/sky130_fd_sc_ls/latest && \
git submodule update --init libraries/sky130_fd_sc_hdll/latest && \
git submodule update --init libraries/sky130_fd_pr_reram/latest && \
git submodule update

make -j$(nproc) timing



python3 -m pip install -e scripts/python-skywater-pdk
mv /foss/pdks/make_timing.py .
mv /foss/pdks/corners.yml .
python3 ./make_timing.py
2 changes: 1 addition & 1 deletion images/xschem/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"BASE_IMAGE": "base",
"NAME": "xschem",
"REPO_URL": "https://github.com/StefanSchippers/xschem.git",
"REPO_COMMIT": "492dd756ed7c2bc19c957377fadc0fff6ba269e5"
"REPO_COMMIT": "d457565c2d63b9acf5a48c843ca244fad14bdd16"
}
}
21 changes: 21 additions & 0 deletions recipes/recipe-openlane-compatible.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Name,Version
base,alpha
magic,7d601628e4e05fd17fcb80c3552dacb64e9f6e7b
skywater-pdk,c094b6e83a4f9298e47f696ec5a7fd53535ec5eb
open_pdks,7519dfb04400f224f140749cda44ee7de6f5e095
openlane,2022.02.19_02.27.52
klayout,cee33a00991a70d39f7c0094c5494956be60f77a
gtkwave,48c6409ed001f28eae9dc5fe87bb0b6b1a7c1217
iverilog,cc0a8c8dd2fef69c4f7fb8219542b1c03a71a3b4
netgen,bfb01e032f668c09ff43e889f35d611ef0e4a317
riscv-gnu-toolchain-rv32i,217e7f3debe424d61374d31e33a091a630535937
gaw3-xschem,a3239fdcc700e7b33331051eb22f47904112e849
ngscope,0.9.5
ngspice,1a6a9e6bb60ad8d07ecbfb3f35dea22379fb73e9
xschem,d457565c2d63b9acf5a48c843ca244fad14bdd16
xyce,b7c684f988381a391b36619d716419b83163078b
covered,93bee2e0d89c1beb5943a329109dcf24d59498e6
irsim,3813495e55a21a024e62e21bd6993fac068a61b9
opensta,3481d3c48bdb02bc3fd6271c62daf582a522bfd0
cvc,d01c4abd446aaac3fe7f9465611d654536a20a7a
foss-asic-tools,alpha
Loading

0 comments on commit 055e53b

Please sign in to comment.