Emily Schmidt
6922633b0b
fix a few bugs in the functional backend and refactor the testing
2024-08-21 11:03:29 +01:00
Emily Schmidt
674e6d201d
rewrite functional backend test code in python
2024-08-21 11:03:29 +01:00
Emily Schmidt
9ad859fc0a
add bwmux, bweqx, bmux, demux cells
2024-08-21 11:03:29 +01:00
Emily Schmidt
6e7ae88c6a
fix bugs in smtlib backend
2024-08-21 11:03:29 +01:00
Emily Schmidt
00a65754bb
factor out SExpr/SExprWriter classes out of smtlib backend, and also tidy them up/document them
2024-08-21 11:03:27 +01:00
Emily Schmidt
c659ef29f4
change smtlib backend to use list() function instead of SExpr{} constructor (leads to weird constructor overloading resolution issues)
2024-08-21 11:02:31 +01:00
Emily Schmidt
9f660b1e4b
rewrite smtlib pass to use SExpr class
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
80582ed3af
Check the existance of a different set of outputs. No need for (push 1) nor (pop 1)
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
566e57d24f
Support $lut cells. Both C++ and SMT tests pass
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
7cff8fa3a3
Fix corner case of pos cell with input and output being same width
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
fad76ce677
Fix memory leak
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
5780357cd9
Emit valid SMT for stateful designs, fix some cells
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
f0f436cbe7
Fix parenthesis for arithmetic_shift_right
2024-08-21 11:02:31 +01:00
Miodrag Milanovic
e296b884d5
Add Makefile helpers for coverage
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
57af68af96
include algorithm, needed for std::reverse
2024-08-21 11:02:31 +01:00
Emily Schmidt
1b2986f7fb
add support for $mul, $div, $divfloor, $mod, $modfloor, $pow in functional backend
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
50f487e08c
Added $ff test
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
762f8dd822
Add readme explaining how to create test files
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
73ed514623
Check that there are not other solutions other than the first given
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
cb5f08364c
´SMT success only if simulation is equivalent
2024-08-21 11:02:31 +01:00
Emily Schmidt
9700df50d6
add generic writer class with formatting function to FunctionalTools
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
32cdf25838
Use FunctionalTools::Scope instead of replaceCharacters
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
ee6bd59436
Removed unnecesary nested_lets variable, use writer.print instead
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
e235fc704d
Create std::mt19937 only once
2024-08-21 11:02:31 +01:00
Emily Schmidt
21bb1cf1bc
rewrite functional c++ simulation library
2024-08-21 11:02:31 +01:00
Emily Schmidt
eb2bb8c45b
tidy up generic functional backend, add generic scope class, tidy up c++ functional backend
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
39bf4f04f7
Create VCD file from SMT file
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
4109fcedcf
clang-format smtlib.cc
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
94ddbc9577
Fix reduce_or
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
b98210d8ac
Valid SMT is emitted, improved test script
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
71aaa1c80d
Consolidate tests scripts into one
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
547c5466ec
Ignore smt2 files, generated by the execution of the tests
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
c6e112686c
Remove unused includes
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
54225b5c42
Add test for SMT backend. Tests if SMT is valid and compares simulation with yosys sim
2024-08-21 11:02:31 +01:00
Roland Coeurjoly
4e370f4426
Initial functional SMT backend using functional IR
2024-08-21 11:02:31 +01:00
Emily Schmidt
6f9e21219b
add new generic compute graph and rewrite c++ functional backend to use it
2024-08-21 11:02:29 +01:00
Emily Schmidt
248d5f72d4
add support for std::variant to hashlib
2024-08-21 11:01:09 +01:00
Emily Schmidt
dbf2bc3b1d
need unsigned comparison when checking shift widths for overflow in functional backend
2024-08-21 11:01:09 +01:00
Roland Coeurjoly
3552a8a2b2
sim.h cannot use log_assert because does not include yosys headers
2024-08-21 11:01:09 +01:00
Emily Schmidt
7b29d177ac
add support for memories to c++ and smtlib functional backends
2024-08-21 11:01:09 +01:00
Roland Coeurjoly
76371d177f
Change assert to log_assert
2024-08-21 11:01:09 +01:00
Roland Coeurjoly
720429b1fd
Add test_cell tests for C++ functional backend
2024-08-21 11:01:09 +01:00
Emily Schmidt
7611dda2eb
add initial version of functional smtlib backend
2024-08-21 11:01:09 +01:00
Emily Schmidt
63dea89fac
add initial version of functional C++ backend
2024-08-21 11:01:09 +01:00
Emily Schmidt
dd5ec84a26
fix bugs in drivertools
2024-08-21 11:01:09 +01:00
Jannis Harder
d90268f610
fixup! drivertools: Utility code for indexing and traversing signal drivers
2024-08-21 11:01:09 +01:00
Jannis Harder
d4e3daa9d0
ComputeGraph datatype for the upcoming functional backend
2024-08-21 11:01:09 +01:00
Jannis Harder
f29422f745
topo_scc: Add sources_first option
2024-08-21 11:01:09 +01:00
Jannis Harder
68c3a47945
WIP temporary drivertools example
2024-08-21 11:01:08 +01:00
Jannis Harder
56572978f5
drivertools: Utility code for indexing and traversing signal drivers
...
It adds `DriveBit`, `DriveChunk` and `DriveSpec` types which are similar
to `SigBit`, `SigChunk` and `SigSpec` but can also directly represent
cell ports, undriven bits and multiple drivers. For indexing an RTLIL
module and for querying signal drivers it comes with a `DriverMap` type
which is somewhat similar to a `SigMap` but is guaranteed to produce
signal drivers as returned representatives.
A `DriverMap` can also optionally preserve connections via intermediate
wires (e.g. querying the driver of a cell input port will return a
connected intermediate wire, querying the driver of that wire will
return the cell output port that's driving the wire).
2024-08-21 11:00:21 +01:00