Upgrade-vlsi script

This commit is contained in:
ken_ho
2023-02-13 15:49:41 -08:00
parent b937a271c3
commit 4977d8fb49
2 changed files with 35 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ For example, for an imaginary process technology called tsmintel3:
cd -
./scripts/init-vlsi.sh tsmintel3
If submoduled plugins need to be updated, call the ``upgrade-vlsi.sh`` script. This will checkout and pull the latest master branch.
.. Note:: Some VLSI EDA tools are supported only on RHEL-based operating systems. We recommend using Chipyard on RHEL7 and above. However, many VLSI server still have old operating systems such as RHEL6, which have software packages older than the basic chipyard requirements. In order to build Chipyard on RHEL6, you will likely need to use tool packages such as devtoolset (for example, devtoolset-8) and/or build from source gcc, git, gmake, make, dtc, cc, bison, libexpat and liby.

34
scripts/upgrade-vlsi.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
# exit script if any command fails
set -e
set -o pipefail
# exit script if not in Chipyard conda env
if [[ `basename $CONDA_PREFIX` != .conda-env ]]; then
echo 'ERROR: Chipyard conda env not activated. Please source env.sh and run this script again.'
exit
fi
# Get hammer submodules
package_names=$(git ls-files --stage | grep 160000 | awk '$4 ~/vlsi\/hammer.*/ {print $4}')
package_list=(${package_names})
plen="${#package_list[@]}"
if [[ ${plen} -gt 0 ]]; then
for p in "${package_list[@]}"; do
cd ${p}
echo "Updating current directory: $PWD"
git checkout master
git pull
cd - > /dev/null
git add ${p}
pip install -e ${p} --upgrade
done
fi
# Upgrade hammer-vlsi separately.
pip install hammer-vlsi --upgrade