Skip to content

Commit

Permalink
Rewrite Fault Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
donn committed Oct 24, 2022
1 parent 6244298 commit c637bf0
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 147 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,8 @@ pdks/
/install

# Venv
/venv
/venv

# Pyverilog
parser.out
parsetab.py
3 changes: 2 additions & 1 deletion dependencies/python/run_time.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
click>=8.0.0,<9
pyyaml~=5.4.0
install~=1.3.5
XlsxWriter~=3.0.2
XlsxWriter~=3.0.2
pyverilog~=1.3.0
16 changes: 4 additions & 12 deletions dependencies/tool_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,8 @@
build: ''
in_install: false
pdk: true
- name: iverilog
repo: https://github.com/steveicarus/iverilog
commit: af2b952769b7358a094a336fe2d7c7104b871d9f
build: |
make clean
sh autoconf.sh
./configure --prefix=$PREFIX
make -j$(proc)
make install
- name: Fault
- name: fault
repo: https://github.com/AUCOHL/Fault
commit: 080f4be01d236af438566ce0b28089531f21a997
build: ""
commit: 296687f96be139daca9bfca4b1043f85aae12829
build: ''
in_install: false
100 changes: 0 additions & 100 deletions docker/Fault/Dockerfile

This file was deleted.

37 changes: 37 additions & 0 deletions docker/fault/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2020-2022 Efabless Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARG RUN_BASE_IMAGE=
ARG BUILD_BASE_IMAGE=
ARG FAULT_REPO=
ARG FAULT_COMMIT=

FROM ghcr.io/aucohl/fault:${FAULT_COMMIT} AS build

# ---
FROM ${RUN_BASE_IMAGE} AS runnable
ENV PATH /build/bin:$PATH

ENV LD_LIBRARY_PATH=/build/lib\
FAULT_IVL_BASE=/build/lib/ivl\
FAULT_IVERILOG=/build/bin/iverilog\
FAULT_VVP=/build/bin/vvp

RUN mkdir -p /build/version/
COPY --from=build /build /build
## Collisions with OpenLane Utilities
RUN rm -rf $(find /build/lib | grep python); rm -f /build/bin/python3
RUN rm -rf $(find /build/bin | grep yosys); rm -rf /build/share/yosys
RUN tar -czf /build.tar.gz /build
RUN date +"Build Timestamp: %Y-%m-%d_%H-%M-%S" > /build/version/fault.version
RUN echo ${FAULT_COMMIT} >> /build/version/fault.version
27 changes: 0 additions & 27 deletions docker/iverilog/Dockerfile

This file was deleted.

6 changes: 5 additions & 1 deletion docker/openlane/Dockerfile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ ENV OPENROAD=/build/
ENV PATH=$OPENLANE_ROOT:$OPENLANE_ROOT/scripts:$OPENROAD/bin:$OPENROAD/bin/Linux-x86_64:$OPENROAD/pdn/scripts:$PATH
ENV LD_LIBRARY_PATH=$OPENROAD/lib:$OPENROAD/lib/Linux-x86_64:$LD_LIBRARY_PATH
ENV MANPATH=$OPENROAD/share/man:$MANPATH
ENV PDK_ROOT /build/pdk

ENV PYTHON_LIBRARY=/lib64/libpython3.6m.so.1.0
ENV FAULT_IVL_BASE=/build/lib/ivl
ENV FAULT_IVERILOG=/build/bin/iverilog
ENV FAULT_VVP=/build/bin/vvp

# Locale
RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8
Expand Down
21 changes: 17 additions & 4 deletions scripts/tcl_commands/dft.tcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright 2022 Rameen Anwar
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
proc run_dft {args} {
if { $::env(DFT_ENABLE) } {
increment_index
Expand All @@ -19,7 +32,7 @@ proc run_dft {args} {
-clock $::env(CLOCK_PORT) \
-reset $::env(RESET_PORT) \
-output $::env(synthesis_results)/$::env(DESIGN_NAME).v

increment_index

fault_tap \
Expand All @@ -29,7 +42,7 @@ proc run_dft {args} {
-reset $::env(RESET_PORT) \
-output $::env(synthesis_results)/$::env(DESIGN_NAME).v
}

}


Expand All @@ -45,7 +58,7 @@ proc fault_chain {args} {
parse_key_args "fault_chain" args values $options
set tmp $::env(synthesis_tmpfiles)/$::env(DESIGN_NAME).v
file copy -force $values(-verilog) $tmp

try_catch $::env(DFT_BIN) chain \
--liberty $values(-liberty) \
--clock $values(-clock) \
Expand All @@ -67,7 +80,7 @@ proc fault_tap {args} {
parse_key_args "fault_tap" args values $options
set tmp $::env(synthesis_tmpfiles)/$::env(DESIGN_NAME).v.chained.v
file copy -force $values(-verilog) $tmp

try_catch $::env(DFT_BIN) tap \
--liberty $values(-liberty) \
--clock $values(-clock) \
Expand Down
2 changes: 1 addition & 1 deletion scripts/tcl_commands/pkgIndex.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

package ifneeded openlane 0.9 [list source [file join $dir all.tcl]]\n[list source [file join $dir checkers.tcl]]\n[list source [file join $dir cts.tcl]]\n[list source [file join $dir floorplan.tcl]]\n[list source [file join $dir init_design.tcl]]\n[list source [file join $dir lvs.tcl]]\n[list source [file join $dir magic.tcl]]\n[list source [file join $dir placement.tcl]]\n[list source [file join $dir routing.tcl]]\n[list source [file join $dir synthesis.tcl]]\n[list source [file join $dir dft.tcl]]\b[list source [file join $dir klayout.tcl]]\n[list source [file join $dir cvc_rv.tcl]]\n[list source [file join $dir eco.tcl]]\n[list source [file join $dir sta.tcl]]
package ifneeded openlane 0.9 [list source [file join $dir all.tcl]]\n[list source [file join $dir checkers.tcl]]\n[list source [file join $dir cts.tcl]]\n[list source [file join $dir floorplan.tcl]]\n[list source [file join $dir init_design.tcl]]\n[list source [file join $dir lvs.tcl]]\n[list source [file join $dir magic.tcl]]\n[list source [file join $dir placement.tcl]]\n[list source [file join $dir routing.tcl]]\n[list source [file join $dir synthesis.tcl]]\n[list source [file join $dir dft.tcl]]\n[list source [file join $dir klayout.tcl]]\n[list source [file join $dir cvc_rv.tcl]]\n[list source [file join $dir eco.tcl]]\n[list source [file join $dir sta.tcl]]

0 comments on commit c637bf0

Please sign in to comment.