File tree Expand file tree Collapse file tree 6 files changed +80
-3
lines changed
Expand file tree Collapse file tree 6 files changed +80
-3
lines changed Original file line number Diff line number Diff line change 77[submodule "tools/yosys-slang "]
88 path = tools/yosys-slang
99 url = https://github.com/povik/yosys-slang.git
10+ [submodule "tools/kepler-formal "]
11+ path = tools/kepler-formal
12+ url = https://github.com/keplertech/kepler-formal
Original file line number Diff line number Diff line change @@ -291,11 +291,38 @@ __local_build()
291291 # CMAKE_FLAGS added to work around yosys-slang#141 (unable to build outside of git checkout)
292292 ${NICE} make install -C tools/yosys-slang -j " ${PROC} " YOSYS_PREFIX=" ${INSTALL_PATH} /yosys/bin/" CMAKE_FLAGS=" -DYOSYS_SLANG_REVISION=unknown -DSLANG_REVISION=unknown"
293293
294+ echo " [INFO FLW-0031] Compiling kepler-formal"
295+ cd tools/kepler-formal
296+ git submodule update --init --recursive
297+
298+ # if build dir does not exist, create it
299+ if [ ! -d build ]; then
300+ mkdir build
301+ fi
302+
303+ cd build
304+
305+ if [[ " $OSTYPE " == " darwin" * ]]; then
306+ cmake .. \
307+ -DCMAKE_BUILD_TYPE=Release \
308+ -DCMAKE_CXX_FLAGS_RELEASE=" -Ofast -march=native -ffast-math -flto" \
309+ -DCMAKE_EXE_LINKER_FLAGS=" -flto" \
310+ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \
311+ -DCMAKE_INSTALL_RPATH=@executable_path/../lib
312+ else
313+ cmake .. \
314+ -DCMAKE_BUILD_TYPE=Release \
315+ -DCMAKE_CXX_FLAGS_RELEASE=" -Ofast -march=native -ffast-math -flto" \
316+ -DCMAKE_EXE_LINKER_FLAGS=" -flto" \
317+ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \
318+ -DCMAKE_INSTALL_RPATH=\$ ORIGIN/../lib
319+ fi
320+ make -j4 install
321+ cd ../../../
294322 if [ ${WITH_VERIFIC} -eq 1 ]; then
295323 echo " [INFO FLW-0032] Cleaning up Verific components."
296324 rm -rf verific
297325 fi
298-
299326}
300327
301328__update_openroad_app_remote ()
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ _installUbuntuPackages() {
286286
287287_installDarwinPackages () {
288288 brew install libffi tcl-tk ruby
289- brew install python libomp
289+ brew install python libomp doxygen capnp tbb bison flex boost spdlog zlib
290290 brew link --force libomp
291291 brew install --cask klayout
292292 brew install docker docker-buildx
@@ -300,7 +300,10 @@ _installCI() {
300300 coreutils \
301301 curl \
302302 python3 \
303- software-properties-common
303+ software-properties-common \
304+ clang pkg-config \
305+ libboost-dev libfl-dev libtbb-dev capnproto libcapnp-dev \
306+ libgtest-dev libspdlog-dev libfmt-dev libboost-iostreams-dev zlib1g-dev
304307}
305308
306309_help () {
Original file line number Diff line number Diff line change @@ -60,12 +60,18 @@ if { !$::env(SKIP_CTS_REPAIR_TIMING) } {
6060 if { $::env(EQUIVALENCE_CHECK) } {
6161 write_eqy_verilog 4_before_rsz.v
6262 }
63+ if { [env_var_exists_and_non_empty LEC_CHECK] } {
64+ write_lec_verilog 4_before_rsz_lec.v
65+ }
6366
6467 repair_timing_helper
6568
6669 if { $::env(EQUIVALENCE_CHECK) } {
6770 run_equivalence_test
6871 }
72+ if { [env_var_exists_and_non_empty LEC_CHECK] } {
73+ run_lec_test
74+ }
6975
7076 set result [catch { detailed_placement } msg]
7177 if { $result != 0 } {
Original file line number Diff line number Diff line change @@ -106,3 +106,40 @@ proc run_equivalence_test { } {
106106 puts " Repair timing output passed equivalence test"
107107 }
108108}
109+
110+ proc write_lec_verilog { filename } {
111+ if { [env_var_exists_and_non_empty REMOVE_CELLS_FOR_EQY] } {
112+ write_verilog -remove_cells $::env(REMOVE_CELLS_FOR_EQY) $::env(RESULTS_DIR) /$filename
113+ } else {
114+ write_verilog $::env(RESULTS_DIR) /$filename
115+ }
116+ }
117+
118+ proc write_lec_script { } {
119+ set outfile [open " $::env(OBJECTS_DIR) /4_lec_test.yml" w]
120+ puts $outfile " format: verilog"
121+ puts $outfile " input_paths:"
122+ puts $outfile " - $::env(RESULTS_DIR) /4_before_rsz_lec.v"
123+ puts $outfile " - $::env(RESULTS_DIR) /4_after_rsz_lec.v"
124+ # Gold netlist
125+ puts $outfile " liberty_files:"
126+ foreach libFile $::env(LIB_FILES) {
127+ puts $outfile " - $libFile "
128+ }
129+ puts $outfile " log_file: $::env(LOG_DIR) /4_lec_check.log"
130+ close $outfile
131+ }
132+
133+ proc run_lec_test { } {
134+ write_lec_verilog 4_after_rsz_lec.v
135+ write_lec_script
136+ # tclint-disable-next-line command-args
137+ eval exec kepler-formal --config $::env(OBJECTS_DIR) /4_lec_test.yml
138+ set count \
139+ [exec grep -c " Found difference" $::env(LOG_DIR) /4_lec_check.log]
140+ if { $count > 0 } {
141+ error " Repair timing output failed lec test"
142+ } else {
143+ puts " Repair timing output passed lec test"
144+ }
145+ }
You can’t perform that action at this time.
0 commit comments