Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
da65160
Merge pull request #23 from keplertech/main
nanocoh Nov 27, 2025
ded48aa
Merge pull request #24 from keplertech/main
nanocoh Nov 29, 2025
73ee2de
yaml support
nanocoh Nov 29, 2025
8ba52c3
update testing
nanocoh Nov 29, 2025
5d3d957
update testing
nanocoh Nov 29, 2025
b3fcd18
yaml dep
nanocoh Nov 29, 2025
f27fe6e
spdlog dep
nanocoh Nov 29, 2025
12c5291
fix
nanocoh Nov 29, 2025
7b09ff1
fix
nanocoh Nov 29, 2025
cf00ac0
fix
nanocoh Nov 29, 2025
94c2e7f
fix
nanocoh Nov 29, 2025
daf8366
fix
nanocoh Nov 29, 2025
611bca8
fix
nanocoh Nov 29, 2025
28f4f77
fix
nanocoh Nov 29, 2025
eeee7d2
fix
nanocoh Nov 29, 2025
f590a8a
fix
nanocoh Nov 29, 2025
a6efcab
fix
nanocoh Nov 29, 2025
0374345
fix
nanocoh Nov 29, 2025
ec8a27d
fix
nanocoh Nov 29, 2025
9eb5809
fix
nanocoh Nov 29, 2025
29f304d
fix
nanocoh Nov 29, 2025
670f3ea
fix
nanocoh Nov 30, 2025
c707644
fix
nanocoh Nov 30, 2025
717078f
fix
nanocoh Nov 30, 2025
48a927e
fix
nanocoh Nov 30, 2025
ceaa20e
fix
nanocoh Nov 30, 2025
4c125b1
fix
nanocoh Nov 30, 2025
b1f97ce
fix
nanocoh Nov 30, 2025
8028637
test update
nanocoh Nov 30, 2025
301ddf6
update logs
nanocoh Nov 30, 2025
fe0dd45
Update README.md
nanocoh Nov 30, 2025
075dd2c
Update README with config file usage for kepler_formal
nanocoh Nov 30, 2025
b503974
Merge branch 'main' into verilog
nanocoh Nov 30, 2025
b04716a
Update README.md
nanocoh Nov 30, 2025
46a3b1c
Update regress.yml
nanocoh Nov 30, 2025
fe4a98e
regress update
nanocoh Nov 30, 2025
cb7dba3
regress update
nanocoh Nov 30, 2025
6b16bf1
wf update
nanocoh Nov 30, 2025
e5c7970
wf update
nanocoh Nov 30, 2025
bd78759
fix wf + const ref
nanocoh Nov 30, 2025
399526d
sync (#27)
nanocoh Nov 30, 2025
5c06eb7
ct
nanocoh Nov 30, 2025
7c0d0b9
Merge branch 'verilog' of https://github.com/keplertech/kepler-formal…
nanocoh Nov 30, 2025
fba276b
Merge branch 'main' into verilog
nanocoh Nov 30, 2025
d5108ae
sync (#29)
nanocoh Dec 5, 2025
b96bfcd
prints
nanocoh Dec 5, 2025
7899ca6
remove prints
nanocoh Dec 5, 2025
43ed29b
sync (#30)
nanocoh Dec 5, 2025
f7a0003
Merge pull request #31 from keplertech/main
nanocoh Dec 5, 2025
9153707
sync (#33)
nanocoh Dec 21, 2025
2aee0b8
scope extraction
nanocoh Dec 24, 2025
4724b34
scope extraction
nanocoh Dec 24, 2025
0bb27e9
Merge branch 'verilog' of https://github.com/keplertech/kepler-formal…
nanocoh Dec 24, 2025
6ad1f3d
sync (#38)
nanocoh Dec 24, 2025
c494544
Rename CmakeLists.txt to CMakeLists.txt
nanocoh Dec 26, 2025
c211258
Merge branch 'main' into se
nanocoh Jan 2, 2026
ded4e96
cleaning
nanocoh Jan 2, 2026
0050c65
updates
nanocoh Jan 2, 2026
d333456
cov
nanocoh Jan 3, 2026
6838ee4
cov
nanocoh Jan 3, 2026
45a2807
clean scopes
nanocoh Jan 4, 2026
a424efc
revert changes to example files
nanocoh Jan 4, 2026
3b4559e
revert changes to example files
nanocoh Jan 4, 2026
1e432f7
revert changes to example files
nanocoh Jan 4, 2026
7c17515
full scope extraction flow
nanocoh Jan 4, 2026
9f86cd2
fixes
nanocoh Jan 5, 2026
b9c000c
fixes
nanocoh Jan 5, 2026
63bb496
fix
nanocoh Jan 5, 2026
71aaa56
fix
nanocoh Jan 5, 2026
82cb1a6
comment
nanocoh Jan 5, 2026
2bdb74b
mt + fix + under a switch
nanocoh Jan 5, 2026
d15b92e
update (#63)
nanocoh Jan 5, 2026
5af2dfe
Merge pull request #64 from keplertech/main
nanocoh Jan 5, 2026
db4604d
testing se
nanocoh Jan 6, 2026
70ef5fe
Merge branch 'se' of https://github.com/keplertech/kepler-formal into se
nanocoh Jan 6, 2026
50b1bf9
testing se
nanocoh Jan 6, 2026
1517177
Merge branch 'main' of https://github.com/keplertech/kepler-formal in…
nanocoh Jan 11, 2026
3ddf9e5
merge
nanocoh Jan 12, 2026
bc673ec
unify work for logic cone
nanocoh Jan 12, 2026
d6ee90e
fixes
nanocoh Jan 12, 2026
a301714
fix POs and PIs ordering based on names instead of IDs that can be di…
nanocoh Jan 16, 2026
7171483
cache model analysis for PI and PO
nanocoh Jan 16, 2026
18c0725
removing prints
nanocoh Jan 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
sudo apt-get install -yq \
build-essential cmake ninja-build clang pkg-config \
libboost-dev libfl-dev libtbb-dev capnproto libcapnp-dev \
libgtest-dev libspdlog-dev libfmt-dev
libgtest-dev libspdlog-dev libfmt-dev libboost-iostreams-dev zlib1g-dev

- name: Configure CMake
working-directory: ${{github.workspace}}/
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: coverage

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

env:
BUILD_TYPE: Debug

jobs:
build:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
submodules: true

# install dependencies
- name: Install GoogleTest
run: sudo apt-get update && sudo apt-get install -y libgtest-dev cmake
- name: Checkout submodules
run: git submodule update --init --recursive

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -yq \
build-essential cmake ninja-build clang pkg-config \
libboost-dev libfl-dev libtbb-dev capnproto libcapnp-dev \
libgtest-dev libspdlog-dev libfmt-dev libboost-iostreams-dev zlib1g-dev lcov

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCODE_COVERAGE=ON -DLONG_TESTS=ON

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build -j 4 --config ${{env.BUILD_TYPE}}
env:
CC: clang
CXX: clang++

- name: Test
working-directory: ${{github.workspace}}/build
env:
PYTHONMALLOC: malloc
run: ctest -VV -E ".*[p|P]ython.*" -C ${{ env.BUILD_TYPE }}
- name: lcov
working-directory: ${{github.workspace}}/build
run: |
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info --output-file coverage.info '/usr/*' '*/test/*' '*/kepler-formal/thirdparty/*'

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
file: ${{github.workspace}}/build/coverage.info
disable_search: true
files: coverage.info
flags: unittests
name: codecov-umbrella
verbose: true
2 changes: 1 addition & 1 deletion .github/workflows/macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: git submodule update --init --recursive
# install dependencies
- name: Install dependencies
run: brew install cmake doxygen capnp tbb bison flex boost spdlog
run: brew install cmake doxygen capnp tbb bison flex boost spdlog zlib
- name: set env variable
run: |
echo "/usr/local/opt/flex/bin" >> $GITHUB_PATH; echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH;
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/regress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install boost & capnproto
run: sudo apt-get update && sudo apt-get install -y pkg-config libboost-dev libfl-dev capnproto libcapnp-dev ninja-build clang libtbb-dev libspdlog-dev
run: sudo apt-get update && sudo apt-get install -y pkg-config libboost-dev libfl-dev capnproto libcapnp-dev ninja-build clang libtbb-dev libspdlog-dev libboost-iostreams-dev zlib1g-dev

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -GNinja -DCMAKE_C_COMPILER=clang -DENABLE_SANITIZERS=ON -DPYTHON_INTERFACE=OFF -DCMAKE_CXX_STANDARD=20
Expand All @@ -51,7 +51,7 @@ jobs:
run: |
mkdir -p regress-output
# Run kepler-formal on the example files (files are in example/)
./build/src/bin/kepler_formal -naja_if \
./build/src/bin/kepler-formal -naja_if \
./example/tinyrocket_naja.if \
./example/tinyrocket_naja.if \
./example/NangateOpenCellLibrary_typical.lib \
Expand All @@ -63,7 +63,7 @@ jobs:
run: |
mkdir -p regress-output
# Run kepler-formal on the example files (files are in example/)
./build/src/bin/kepler_formal -verilog \
./build/src/bin/kepler-formal -verilog \
./example/tinyrocket.v \
./example/tinyrocket.v \
./example/NangateOpenCellLibrary_typical.lib \
Expand All @@ -82,14 +82,14 @@ jobs:
run: |
mkdir -p regress-output
# Run kepler-formal on the example files (files are in example/)
../build/src/bin/kepler_formal --config test_config_naja_if.yaml
../build/src/bin/kepler-formal --config test_config_naja_if.yaml

- name: Run on verilog edited
working-directory: ${{github.workspace}}/example
run: |
mkdir -p regress-output
# Run kepler-formal on the example files (files are in example/)
../build/src/bin/kepler_formal --config test_config_verilog.yaml
../build/src/bin/kepler-formal --config test_config_verilog.yaml



Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2024-2026 keplertech.io
# SPDX-License-Identifier: GPL-3.0-only
build

28 changes: 23 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,23 @@ set(CMAKE_CXX_STANDARD 20 CACHE STRING "C++ standard" FORCE)
add_subdirectory(src)
add_subdirectory(thirdparty)

option(ENABLE_UNIT_TESTS ON)
if(ENABLE_UNIT_TESTS)
include(CTest)
add_subdirectory(test)
endif()
# option(ENABLE_UNIT_TESTS ON)
# if(ENABLE_UNIT_TESTS)
include(CTest)
enable_testing()
add_subdirectory(test)
# endif()

option(CODE_COVERAGE "Enable coverage reporting" OFF)
if(CODE_COVERAGE)
# Add required flags (GCC & LLVM/Clang)
target_compile_options(coverage_config INTERFACE
-O0 # no optimization
-g # generate debug info
--coverage # sets all required flags
)
target_link_options(coverage_config INTERFACE --coverage)
endif(CODE_COVERAGE)

find_package(TBB REQUIRED)

Expand All @@ -42,3 +54,9 @@ target_include_directories(formal_structures
target_link_libraries(formal_structures
PRIVATE TBB::tbb
)

option(ENABLE_COVERAGE "Enable coverage flags" ON)
if(ENABLE_COVERAGE AND (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang"))
add_compile_options(--coverage -g)
add_link_options(--coverage)
endif()
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ The property of stable indices is employed to localize the scopes affected by ed
On Ubuntu:

```bash
sudo apt-get install g++ libboost-dev python3.9-dev capnproto libcapnp-dev libtbb-dev pkg-config bison flex doxygen libspdlog-dev
sudo apt-get install g++ libboost-dev python3.9-dev capnproto libcapnp-dev libtbb-dev pkg-config bison flex doxygen libspdlog-dev libfmt-dev libboost-iostreams-dev zlib1g-dev
```

On macOS, using [Homebrew](https://brew.sh/):

```bash
brew install cmake doxygen capnp tbb bison flex boost spdlog
brew install cmake doxygen capnp tbb bison flex boost spdlog zlib
```

Ensure the versions of `bison` and `flex` installed via Homebrew take precedence over the macOS defaults by modifying your $PATH environment variable as follows:
Expand All @@ -54,19 +54,21 @@ make
```

```bash
# For optimized performance use:
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS_RELEASE="-Ofast -march=native \
-ffast-math -flto" -DCMAKE_EXE_LINKER_FLAGS="-flto"
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_CXX_FLAGS="-O3 -march=native -ffast-math -flto -DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELEASE="-Ofast -march=native -ffast-math -flto -DNDEBUG" \
-DCMAKE_EXE_LINKER_FLAGS="-flto"
```

## Usage

```bash
# Classic
"build/src/bin/kepler_formal <-verilog/-naja_if> <netlist1> <netlist2> [<liberty-file>...]"
"build/src/bin/kepler-formal <-verilog/-naja_if> <netlist1> <netlist2> [<liberty-file>...]"
# Through yaml config file
"build/src/bin/kepler_formal --config <yaml file>"
"build/src/bin/kepler-formal --config <yaml file>"
```

## Example
Expand Down
8 changes: 4 additions & 4 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ cd example
pip install najaeda
python edit.py
# For naja_if
../build/src/bin/kepler_formal -naja_if tinyrocket_naja.if tinyrocket_naja_edited.if NangateOpenCellLibrary_typical.lib fakeram45_1024x32.lib fakeram45_64x32.lib
../build/src/bin/kepler-formal -naja_if tinyrocket_naja.if tinyrocket_naja_edited.if NangateOpenCellLibrary_typical.lib fakeram45_1024x32.lib fakeram45_64x32.lib
# For verilog
../build/src/bin/kepler_formal -verilog tinyrocket_pre_edited.v tinyrocket_edited.v NangateOpenCellLibrary_typical.lib fakeram45_1024x32.lib /example/fakeram45_64x32.lib
../build/src/bin/kepler-formal -verilog tinyrocket_pre_edited.v tinyrocket_edited.v NangateOpenCellLibrary_typical.lib fakeram45_1024x32.lib /example/fakeram45_64x32.lib
# Through config file
../build/src/bin/kepler_formal --config test_config_naja_if.yaml
../build/src/bin/kepler_formal --config test_config_verilog.yaml
../build/src/bin/kepler-formal --config test_config_naja_if.yaml
../build/src/bin/kepler-formal --config test_config_verilog.yaml
```
Loading