File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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,33 @@ __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+ cd build
303+
304+ cmake .. \
305+ -DCMAKE_BUILD_TYPE=Release \
306+ -DCMAKE_CXX_FLAGS_RELEASE=" -Ofast -march=native -ffast-math -flto" \
307+ -DCMAKE_EXE_LINKER_FLAGS=" -flto" \
308+ -DCMAKE_BUILD_RPATH=" ${DIR} /tools/kepler-formal/build/thirdparty/naja/src/dnl:${DIR} /tools/kepler-formal/build/thirdparty/naja/src/nl/nl:${DIR} /tools/kepler-formal/build/thirdparty/naja/src/optimization" \
309+ -DCMAKE_INSTALL_RPATH=" ${INSTALL_PATH} /kepler-formal/lib" \
310+ -DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF \
311+ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF \
312+ -DCMAKE_INSTALL_PREFIX=" ${INSTALL_PATH} /kepler-formal"
313+
314+ make -j" ${PROC} " install
315+
316+ cd ../../../
294317 if [ ${WITH_VERIFIC} -eq 1 ]; then
295318 echo " [INFO FLW-0032] Cleaning up Verific components."
296319 rm -rf verific
297320 fi
298-
299321}
300322
301323__update_openroad_app_remote ()
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ function __setpaths() {
1313 # developer settings go in ./dev_env.sh
1414 export PATH=${DIR} /tools/install/OpenROAD/bin:$PATH
1515 export PATH=${DIR} /tools/install/yosys/bin:$PATH
16+ export PATH=${DIR} /tools/install/kepler-formal/bin:$PATH
1617
1718 if [[ " $OSTYPE " == " darwin" * ]]; then
1819 export PATH=" /Applications/KLayout/klayout.app/Contents/MacOS:$PATH "
Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ _installUbuntuPackages() {
257257
258258_installDarwinPackages () {
259259 brew install libffi tcl-tk ruby
260- brew install python libomp
260+ brew install python libomp doxygen capnp tbb bison flex boost spdlog zlib
261261 brew link --force libomp
262262 brew install --cask klayout
263263 brew install docker docker-buildx
@@ -271,7 +271,10 @@ _installCI() {
271271 coreutils \
272272 curl \
273273 python3 \
274- software-properties-common
274+ software-properties-common \
275+ clang pkg-config \
276+ libboost-dev libfl-dev libtbb-dev capnproto libcapnp-dev \
277+ libgtest-dev libspdlog-dev libfmt-dev libboost-iostreams-dev zlib1g-dev
275278}
276279
277280_help () {
Original file line number Diff line number Diff line change 11utl::set_metrics_stage " cts__{}"
22source $::env(SCRIPTS_DIR) /load.tcl
3+ source $::env(SCRIPTS_DIR) /lec_check.tcl
34erase_non_stage_variables cts
45load_design 3_place.odb 3_place.sdc
56
@@ -60,12 +61,19 @@ if { !$::env(SKIP_CTS_REPAIR_TIMING) } {
6061 if { $::env(EQUIVALENCE_CHECK) } {
6162 write_eqy_verilog 4_before_rsz.v
6263 }
64+ if { [env_var_exists_and_non_empty LEC_CHECK] } {
65+ write_lec_verilog 4_before_rsz_lec.v
66+ }
6367
6468 repair_timing_helper
6569
6670 if { $::env(EQUIVALENCE_CHECK) } {
6771 run_equivalence_test
6872 }
73+ if { [env_var_exists_and_non_empty LEC_CHECK] } {
74+ write_lec_verilog 4_after_rsz_lec.v
75+ run_lec_test 4_rsz 4_before_rsz_lec.v 4_after_rsz_lec.v
76+ }
6977
7078 set result [catch { detailed_placement } msg]
7179 if { $result != 0 } {
Original file line number Diff line number Diff line change 1+ proc write_lec_verilog { filename } {
2+ if { [env_var_exists_and_non_empty REMOVE_CELLS_FOR_EQY] } {
3+ write_verilog -remove_cells $::env(REMOVE_CELLS_FOR_EQY) $::env(RESULTS_DIR) /$filename
4+ } else {
5+ write_verilog $::env(RESULTS_DIR) /$filename
6+ }
7+ }
8+
9+ proc write_lec_script { step file1 file2 } {
10+ set outfile [open " $::env(OBJECTS_DIR) /${step} _lec_test.yml" w]
11+ puts $outfile " format: verilog"
12+ puts $outfile " input_paths:"
13+ puts $outfile " - $::env(RESULTS_DIR) /${file1} "
14+ puts $outfile " - $::env(RESULTS_DIR) /${file2} "
15+ puts $outfile " liberty_files:"
16+ foreach libFile $::env(LIB_FILES) {
17+ puts $outfile " - $libFile "
18+ }
19+ puts $outfile " log_file: $::env(LOG_DIR) /${step} _lec_check.log"
20+ close $outfile
21+ }
22+
23+ proc run_lec_test { step file1 file2 } {
24+ write_lec_script $step $file1 $file2
25+ # tclint-disable-next-line command-args
26+ eval exec kepler-formal --config $::env(OBJECTS_DIR) /${step} _lec_test.yml
27+ try {
28+ set count [exec grep -c " Found difference" $::env(LOG_DIR) /${step} _lec_check.log]]
29+ } trap CHILDSTATUS {results options} {
30+ # This block executes if grep returns a non-zero exit code
31+ set count 0
32+ }
33+ if { $count > 0 } {
34+ error " Repair timing output failed lec test"
35+ } else {
36+ puts " Repair timing output passed lec test"
37+ }
38+ }
You can’t perform that action at this time.
0 commit comments