From 263f80554689ab225766814c2990b264b89249a4 Mon Sep 17 00:00:00 2001 From: Cole Poirier Date: Thu, 23 Jul 2020 17:23:48 -0700 Subject: [PATCH] Fix minor bugs, give better name to yosys install script --- coriolis2-chroot | 7 ++-- hdl-tools-yosys | 42 ++++++++++++++++++++++ yosys-et-al | 90 ------------------------------------------------ 3 files changed, 46 insertions(+), 93 deletions(-) create mode 100755 hdl-tools-yosys delete mode 100755 yosys-et-al diff --git a/coriolis2-chroot b/coriolis2-chroot index e61d3b4..7684633 100755 --- a/coriolis2-chroot +++ b/coriolis2-chroot @@ -113,9 +113,6 @@ git checkout devel $CHU_HOME/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py > $CHU_HOME/coriolisenv source $CHU_HOME/.bash_profile source $CHU_HOME/coriolisenv -# Popup coriolis2 window to test that it was installed correctly and works -#cd ~/coriolis-2.x/Linux.x86_64/Release.Shared/install/bin -#./cgt EOF' # Install alliance from source @@ -153,5 +150,9 @@ EOG source $CHU_HOME/.bash_profile cd alliance-check-toolkit/benchs/ARM/cmos make lvx +echo -e " +\e[1;91mSelect File -> Open Cell or press CTRL + o then enter as the cell name 'arm_chip_cts_r' without the single quotation marks.\e[0m +" make cgt EOF' + diff --git a/hdl-tools-yosys b/hdl-tools-yosys new file mode 100755 index 0000000..7a13bb7 --- /dev/null +++ b/hdl-tools-yosys @@ -0,0 +1,42 @@ +#!/bin/bash +if [ "$EUID" -ne 0 ] + then echo "Please run as root" + exit +fi + +apt-get update -y +apt-get build-dep yosys -y +apt-get remove yosys -y + +cd $CHU_HOME +mkdir hdl_tools +cd hdl_tools + +git clone https://github.com/cliffordwolf/yosys.git +git clone https://github.com/YosysHQ/SymbiYosys.git sby +git clone https://github.com/SRI-CSL/yices2.git +git clone https://github.com/Z3Prover/z3.git + +cd yosys +make config-clang +make -j$(nproc) +make install + +cd ../sby +make install + +cd ../yices2 +autoconf +./configure +make -j$(nproc) +make install + +cd ../z3 +python scripts/mk_make.py +cd build +make -j$(nproc) +make install + +cd $CHU_HOME/hdl_tools +chown -R $MYNAME hdl_tools +chgrp -R $MYNAME hdl_tools diff --git a/yosys-et-al b/yosys-et-al deleted file mode 100755 index e214c59..0000000 --- a/yosys-et-al +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash -if [ "$EUID" -ne 0 ] - then echo "Please run as root" - exit -fi - -export MYNAME=`id 1000 | awk '{print $1}' | sed 's/.*(\(.*\))/\1/'` -export MYHOME=/home/$MYNAME - -runuser $MYNAME --preserve-environment -c ' -cd /home/$MYNAME -mkdir hdl_tools -cd hdl_tools - -git clone https://github.com/cliffordwolf/yosys.git -git clone https://github.com/YosysHQ/SymbiYosys.git sby -git clone https://github.com/SRI-CSL/yices2.git -git clone https://github.com/Z3Prover/z3.git -' -cd /home/$MYNAME/hdl_tools/yosys -make config-clang -make -j$(nproc) -make install - -cd ../sby -make install - -cd ../yices2 -autoconf -./configure -make -j$(nproc) -make install - -cd ../z3 -python scripts/mk_make.py -cd build -make -j$(nproc) -make install - -#cd ../../ -#hg clone https://bitbucket.org/sterin/super_prove_build -#cd super_prove_build -#patch -u abc-zz/MetaSat/MiniSat2/System.cc <(echo "diff -r bde167bca3cd MetaSat/MiniSat2/System.cc -#--- a/MetaSat/MiniSat2/System.cc Thu Sep 14 01:44:08 2017 -0700 -#+++ b/MetaSat/MiniSat2/System.cc Thu May 14 20:10:24 2020 +0000 -#@@ -20,6 +20,7 @@ -# -# #include -# #include -#+#include -# -# #include "System.hh" -# -#@@ -27,7 +28,6 @@ -# -# #if defined(__linux__) -# -#-#include -# -# static inline int memReadStat(int field) -# { -#") -#patch -u abc-zz/Bip/Main_bip.cc <(echo "diff -r bde167bca3cd Bip/Main_bip.cc -#--- a/Bip/Main_bip.cc Thu Sep 14 01:44:08 2017 -0700 -#+++ b/Bip/Main_bip.cc Thu May 14 20:08:52 2020 +0000 -#@@ -508,8 +508,8 @@ -# void writeCex(Out& out, NetlistRef N, const Cex& cex, uint orig_num_pis) -# { -# Vec > ffs, pis; -#- For_Gatetype(N, gate_Flop, w) ffs.push(tuple(attr_Flop(w).number, w)); -#- For_Gatetype(N, gate_PI , w) pis.push(tuple(attr_PI (w).number, w)); -#+ For_Gatetype(N, gate_Flop, w) ffs.push(ZZ::tuple(attr_Flop(w).number, w)); -#+ For_Gatetype(N, gate_PI , w) pis.push(ZZ::tuple(attr_PI (w).number, w)); -# sort(ffs); -# sort(pis); -# -#") -#mkdir build && cd build -#cmake -DCMAKE_BUILD_TYPE=Release -G Ninja .. -#ninja -#ninja package -#SPBIN=`find . -maxdepth 1 -name "super_prove*-Release.tar.gz"` -#tar xvf $SPBIN -C /usr/local/bin/ -#cat << "EOF" > /usr/local/bin/suprove -##!/bin/bash -#tool=super_prove; if [ "$1" != "${1#+}" ]; then tool="${1#+}"; shift; fi -#exec /usr/local/bin/super_prove/bin/${tool}.sh "$@" -#EOF -#chmod +x /usr/local/bin/suprove -#suprove -- 2.30.2