Skip to content

Commit 9fd2449

Browse files
committed
Initial attempt to restore fault
1 parent 5936eb8 commit 9fd2449

File tree

5 files changed

+83
-0
lines changed

5 files changed

+83
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Below is a list of the current tools already installed and ready to use (note th
8484
* [covered](https://github.com/hpretl/verilog-covered) Verilog code coverage
8585
* [cvc](https://github.com/d-m-bailey/cvc) circuit validity checker (ERC)
8686
* [edalize](https://github.com/olofk/edalize) Python abstraction library for EDA tools
87+
* [fault](https://github.com/AUCOHL/Fault) design-for-test (DFT) solution
8788
* [fusesoc](https://github.com/olofk/fusesoc) package manager and build tools for SoC
8889
* [gaw3-xschem](https://github.com/StefanSchippers/xschem-gaw.git) waveform plot tool for `xschem`
8990
* [gdsfactory](https://github.com/gdsfactory/gdsfactory) Python library for GDS generation

_build/Dockerfile

+14
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,19 @@ ARG CVC_RV_NAME="cvc_rv"
9292
RUN --mount=type=bind,source=images/cvc_rv,target=/images/cvc_rv \
9393
bash /images/cvc_rv/scripts/install.sh
9494

95+
#######################################################################
96+
# Compile fault
97+
#######################################################################
98+
# FIXME build dependencies clean as stand-alone stages
99+
FROM base as fault
100+
ARG FAULT_REPO_URL="https://github.com/AUCOHL/Fault.git"
101+
ARG FAULT_REPO_COMMIT="0d42398b287fa8ed755f8f5bb518c14b65be4d52"
102+
ARG FAULT_NAME="fault"
103+
RUN --mount=type=bind,source=images/fault,target=/images/fault \
104+
bash /images/fault/scripts/dependencies.sh
105+
RUN --mount=type=bind,source=images/fault,target=/images/fault \
106+
bash /images/fault/scripts/install.sh
107+
95108
#######################################################################
96109
# Compile gaw3-xschem
97110
#######################################################################
@@ -384,6 +397,7 @@ ENV OMPI_MCA_btl_vader_single_copy_mechanism=none
384397
COPY --from=open_pdks ${PDK_ROOT}/ ${PDK_ROOT}/
385398
COPY --from=covered ${TOOLS}/ ${TOOLS}/
386399
COPY --from=cvc_rv ${TOOLS}/ ${TOOLS}/
400+
COPY --from=fault ${TOOLS}/ ${TOOLS}/
387401
COPY --from=gaw3-xschem ${TOOLS}/ ${TOOLS}/
388402
COPY --from=gds3d ${TOOLS}/ ${TOOLS}/
389403
COPY --from=gds3d ${PDK_ROOT}/ ${PDK_ROOT}/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
UBUNTU_VERSION=$(lsb_release -r -s)
6+
7+
# Install Quaigh
8+
_install_quaigh () {
9+
echo "[INFO] Installing Quaigh."
10+
cd /tmp
11+
git clone --filter=blob:none https://github.com/coloquinte/Quaigh.git quaigh
12+
cd quaigh
13+
git checkout 1b690ebece60a0181df7af22546f13427914cf82
14+
cargo build
15+
make clear
16+
cd ..
17+
mv quaigh ${TOOLS}/${FAULT_NAME}/${REPO_COMMIT_SHORT}/quaigh
18+
}
19+
_install_quaigh
20+
21+
# Install nl2bench
22+
_install_nl2bench () {
23+
echo "Installing nl2bench."
24+
pip3 install --prefix ${TOOLS}/${FAULT_NAME}/${REPO_COMMIT_SHORT}/ nl2bench
25+
}
26+
_install_nl2bench
27+
28+
# Install Swift
29+
_install_swift () {
30+
echo "[INFO] Installing Swift."
31+
cd /tmp
32+
SWIFT_VERSION=5.9.2
33+
if [[ $UBUNTU_VERSION == 22.04 ]]; then
34+
if [ "$(arch)" == "x86_64" ]; then
35+
echo "[INFO] Platform is x86_64, 22.04"
36+
wget --no-verbose https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz
37+
tar xzf swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz
38+
mv swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04 /opt/swift
39+
elif [ "$(arch)" == "aarch64" ]; then
40+
echo "[INFO] Platform is aarch64, 22.04"
41+
wget --no-verbose https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204-aarch64/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04-aarch64.tar.gz
42+
tar xzf swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04-aarch64.tar.gz
43+
mv swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04-aarch64 /opt/swift
44+
else
45+
echo "[ERROR] Unknown platform"
46+
exit 1
47+
fi
48+
else
49+
echo "[ERROR] Unknown Ubuntu version"
50+
exit 1
51+
fi
52+
}
53+
_install_swift
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
REPO_COMMIT_SHORT=$(echo "$FAULT_REPO_COMMIT" | cut -c 1-7)
6+
7+
mkdir -p "${TOOLS}/${FAULT_NAME}/${REPO_COMMIT_SHORT}"
8+
git clone --filter=blob:none "${FAULT_REPO_URL}" "${FAULT_NAME}"
9+
cd "${FAULT_NAME}"
10+
git checkout "${FAULT_REPO_COMMIT}"
11+
echo "[INFO] Compiling Fault using Swift."
12+
export PATH=/opt/swift/usr/bin:$PATH
13+
swift build -c release --static-stdlib
14+
mv ./.build/release/fault ${TOOLS}/${FAULT_NAME}/${REPO_COMMIT_SHORT}/fault

_build/images/iic-osic-tools/skel/dockerstartup/scripts/env.sh

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ function _path_add_tool_python() {
3939
if [ -z ${FOSS_PATH_SET+x} ]; then
4040
_path_add_tool_bin "covered"
4141
_path_add_tool_bin "cvc_rv"
42+
_path_add_tool "fault"
4243
_path_add_tool_bin "gaw3-xschem"
4344
_path_add_tool_bin "gds3d"
4445
_path_add_tool_bin "ghdl"

0 commit comments

Comments
 (0)