Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
c595a5d
chore: update from pairing
luisacicolini Aug 22, 2025
6be4167
chore: wip
luisacicolini Aug 24, 2025
924b182
bugfix
Aug 27, 2025
a7fab3a
fix crash
Aug 27, 2025
2b7eb47
fix bug
Sep 4, 2025
7827706
remove time
Sep 8, 2025
4432aa3
add arguments
Sep 18, 2025
2d8c50a
add concat
Sep 30, 2025
676bce3
chore: replicate
luisacicolini Oct 3, 2025
525962c
chore: replicate
luisacicolini Oct 3, 2025
b946d78
chore: replicate
luisacicolini Oct 3, 2025
79cde46
chore: thank you bea, my saviour
luisacicolini Oct 3, 2025
c703168
chore: getting a weird error
luisacicolini Oct 3, 2025
d0bce0d
chore: bitwise ops
luisacicolini Oct 6, 2025
5b2e8a8
chore: fix broken curly brackets
luisacicolini Oct 6, 2025
f8d732f
or is not and
TaoBi22 Oct 9, 2025
20e3558
add overflow
Oct 9, 2025
b5ec9a6
chore: overflow for mul, sub
luisacicolini Oct 10, 2025
7ce932e
chore: correct underflow
luisacicolini Oct 10, 2025
49d153f
xor is also not and
TaoBi22 Nov 21, 2025
040e8c5
chore: pass
luisacicolini Dec 22, 2025
2fd88c4
chore: undo removal
luisacicolini Dec 22, 2025
0b8037e
chore: update girmodules
luisacicolini Dec 22, 2025
2d16cee
chore: clang-format
luisacicolini Dec 22, 2025
611c6cd
chore: remove unused file
luisacicolini Dec 22, 2025
3ac7d1f
chore: correct llvm vers
luisacicolini Dec 23, 2025
7a29dbb
chore: clang-format
luisacicolini Dec 23, 2025
9aeed9a
chore: correct path
luisacicolini Dec 23, 2025
345e05d
chore: almost fixed
luisacicolini Dec 23, 2025
dde0458
chore: local build works
luisacicolini Dec 23, 2025
29c7a8c
chore: restore tests
luisacicolini Dec 23, 2025
9eddbac
chore: restore tests
luisacicolini Dec 23, 2025
5103f55
chore: add test folder
luisacicolini Dec 23, 2025
020c3d8
chore: first test
luisacicolini Dec 23, 2025
06977e2
chore: cleaning and polishing wip
luisacicolini Dec 23, 2025
34146a1
wip: removing inputs from state transition functions
luisacicolini Jan 7, 2026
40971ef
locally builds, removed inputs from f_state
luisacicolini Jan 7, 2026
77472a4
chore: wip works
luisacicolini Jan 8, 2026
9160209
chore: refactored and thoroughly commented initial assertion
luisacicolini Jan 8, 2026
9011a4f
fixed init state frfr
luisacicolini Jan 8, 2026
1ee55ab
chore: works wout inputs
luisacicolini Jan 8, 2026
626aed8
works frfr
luisacicolini Jan 8, 2026
5dedf50
chore: correct output values
luisacicolini Jan 8, 2026
70f3cba
before refactoring all the comb things to only use bvs
luisacicolini Jan 8, 2026
9d4cc11
chore: works!
luisacicolini Jan 8, 2026
845705a
chore: test
luisacicolini Jan 8, 2026
f690bc4
Merge branch 'main' into fsm-to-smt-assertions
luisacicolini Jan 8, 2026
9fb6d6e
chore: clangformat
luisacicolini Jan 8, 2026
07306ce
chore: format
luisacicolini Jan 8, 2026
57d6a0f
chore: hsmtosmt .h
luisacicolini Jan 11, 2026
444a7f2
chore: hsmtosmt .h eof
luisacicolini Jan 11, 2026
205cae0
eof cmakelists
luisacicolini Jan 11, 2026
1396e16
format cmakelists
luisacicolini Jan 11, 2026
9ea464f
format passes td
luisacicolini Jan 11, 2026
ff09944
format passes td
luisacicolini Jan 11, 2026
3f98951
eof tests
luisacicolini Jan 11, 2026
20c2dac
smaller tests
luisacicolini Jan 11, 2026
83f2f2d
chore: [asses format
luisacicolini Jan 11, 2026
ed899ae
chore: initial assertion
luisacicolini Jan 20, 2026
d6d2b79
chore: works
luisacicolini Jan 26, 2026
d75e32a
chore: remove silly prints
luisacicolini Jan 26, 2026
a066e76
chore: works
luisacicolini Jan 27, 2026
34c13cd
chore: assertions added
luisacicolini Jan 27, 2026
a60ce9b
floating ucc
luisacicolini Jan 27, 2026
e2ed96d
Merge branch 'main' into fsm-to-smt-assertions
luisacicolini Jan 27, 2026
8c9f7c3
chore: clang-format lowering
luisacicolini Jan 27, 2026
b8a07ca
chore: attempt at solving
luisacicolini Jan 27, 2026
3f1241b
chore: undo assertions
luisacicolini Jan 27, 2026
1ade930
chore: done
luisacicolini Jan 28, 2026
acea8dd
chore: clang format
luisacicolini Jan 28, 2026
6f6c973
chore: working version pre opt
luisacicolini Jan 28, 2026
5b62e3d
chore: clearer logic
luisacicolini Jan 28, 2026
2277e58
chorre: clang form + refactoring
luisacicolini Jan 28, 2026
8ef9014
chore: eof
luisacicolini Jan 28, 2026
d01bd62
chore: fix tests
luisacicolini Jan 28, 2026
fc1d2e2
chore: more tests
luisacicolini Jan 28, 2026
d4c859d
chore: syntax
luisacicolini Jan 28, 2026
0aa65c5
chore: format
luisacicolini Jan 28, 2026
46d074c
chore: error testing
luisacicolini Jan 28, 2026
7689ed0
chore: more fixes
luisacicolini Jan 28, 2026
6525b16
chore: format
luisacicolini Jan 28, 2026
9bbe938
chore: emit error
luisacicolini Jan 28, 2026
785d774
chore: appropriate error
luisacicolini Jan 28, 2026
83e4eac
chore: remove useless include
luisacicolini Jan 28, 2026
7a083d6
chore: clang format
luisacicolini Jan 28, 2026
3ca23e8
chore: fix
luisacicolini Jan 28, 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
26 changes: 26 additions & 0 deletions include/circt/Conversion/FSMToSMT.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//===- FSMToSMT.h - FSM to SMT-LIB conversions ------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef CIRCT_CONVERSION_FSMTOSMT_FSMTOSMT_H
#define CIRCT_CONVERSION_FSMTOSMT_FSMTOSMT_H

#include <memory>

namespace mlir {
class Pass;
} // namespace mlir

namespace circt {

#define GEN_PASS_DECL_CONVERTFSMTOSMT
#include "circt/Conversion/Passes.h.inc"

std::unique_ptr<mlir::Pass> createConvertFSMToSMTPass();
} // namespace circt

#endif // CIRCT_CONVERSION_FSMTOSMT_FSMTOSMT_H
1 change: 1 addition & 0 deletions include/circt/Conversion/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "circt/Conversion/ExportVerilog.h"
#include "circt/Conversion/FIRRTLToHW.h"
#include "circt/Conversion/FSMToCore.h"
#include "circt/Conversion/FSMToSMT.h"
#include "circt/Conversion/FSMToSV.h"
#include "circt/Conversion/HWArithToHW.h"
#include "circt/Conversion/HWToBTOR2.h"
Expand Down
14 changes: 14 additions & 0 deletions include/circt/Conversion/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,20 @@ def ConvertFSMToSV : Pass<"convert-fsm-to-sv", "mlir::ModuleOp"> {
];
}

//===----------------------------------------------------------------------===//
// FSMToSMT
//===----------------------------------------------------------------------===//

def ConvertFSMToSMT : Pass<"convert-fsm-to-smt", "mlir::ModuleOp"> {
let summary = "Convert FSM to SMT - Safety Properties";
let constructor = "circt::createConvertFSMToSMTPass()";
let dependentDialects = ["circt::comb::CombDialect", "mlir::smt::SMTDialect",
"circt::verif::VerifDialect"];
let options = [Option<"withTime", "with-time", "bool", "false",
"whether to include a time paramter in the relation">,
];
}

//===----------------------------------------------------------------------===//
// CoreToFSM
//===----------------------------------------------------------------------===//
Expand Down
1 change: 1 addition & 0 deletions lib/CAPI/Conversion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ add_circt_public_c_api_library(CIRCTCAPIConversion
CIRCTExportVerilog
CIRCTFIRRTLToHW
CIRCTFSMToSV
CIRCTFSMToSMT
CIRCTFSMToCore
CIRCTHandshakeToDC
CIRCTHandshakeToHW
Expand Down
1 change: 1 addition & 0 deletions lib/CAPI/Dialect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ add_circt_public_c_api_library(CIRCTCAPIFSM
CIRCTFSM
CIRCTFSMTransforms
CIRCTFSMToSV
CIRCTFSMToSMT
CIRCTCoreToFSM
CIRCTFSMToCore
)
Expand Down
1 change: 1 addition & 0 deletions lib/CAPI/Dialect/FSM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ using namespace circt::fsm;
void registerFSMPasses() {
registerPasses();
circt::registerConvertFSMToSVPass();
circt::registerConvertFSMToSMTPass();
circt::registerConvertFSMToCorePass();
}
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(FSM, fsm, FSMDialect)
1 change: 1 addition & 0 deletions lib/Conversion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ add_subdirectory(ExportVerilog)
add_subdirectory(FIRRTLToHW)
add_subdirectory(FSMToCore)
add_subdirectory(FSMToSV)
add_subdirectory(FSMToSMT)
add_subdirectory(HandshakeToDC)
add_subdirectory(HandshakeToHW)
add_subdirectory(HWArithToHW)
Expand Down
19 changes: 19 additions & 0 deletions lib/Conversion/FSMToSMT/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
add_circt_conversion_library(CIRCTFSMToSMT
FSMToSMT.cpp

DEPENDS
CIRCTConversionPassIncGen

LINK_COMPONENTS
Core

LINK_LIBS PUBLIC
MLIRSMT
CIRCTComb
CIRCTVerif
CIRCTHW
CIRCTEmit
CIRCTFSM
CIRCTSupport
MLIRTransforms
)
Loading