Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from YosysHQ:master #57

Open
wants to merge 315 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
315 commits
Select commit Hold shift + click to select a range
21dfd35
Adding new Getting started guide
May 9, 2022
fc9ff3d
Initial FIFO description
May 10, 2022
fedfae0
examples: Fix use of SVA value change expressions
jix May 11, 2022
d10e472
Merge pull request #159 from jix/fix-dpmem-example
jix May 11, 2022
ad2c33d
docs: add instructions for newer btorsim version required
nakengelhardt May 24, 2022
3f32deb
add test for yosys's $divfloor and $modfloor cells
programmerjake May 25, 2022
a87d21a
add depth 1
programmerjake May 25, 2022
de00dc7
Merge pull request #161 from programmerjake/add-div-mod-floor-tests
jix May 26, 2022
939e000
Makefile: Rename run_tests to test, update help, use .PHONY
jix May 30, 2022
dc22d97
Better checking of available solvers
jix May 30, 2022
206562e
Check for the tabby/oss cad suite before running make ci checks
jix May 30, 2022
8e87b0f
Suggest -f when the workdir already exists
jix May 30, 2022
b18f22c
Removing install details for optional engines
May 30, 2022
f525701
Specifying z3 to support minimum required install
May 30, 2022
41cd8e5
update install instructions for btorsim
nakengelhardt Jun 1, 2022
00efdec
tests: Check for btorsim --vcd
jix Jun 2, 2022
d398a3c
tests: Fail on CI when any required tool is missing
jix Jun 2, 2022
b4c1108
Test designs using $allconst
jix Jun 3, 2022
80eacf3
Don't fail tests when xmlschema is missing
jix Jun 3, 2022
aed5a33
Add init check
Jun 6, 2022
fef6d3a
Adding USE_VERIFIC flag
Jun 6, 2022
66ef51d
Verification properties in doc
Jun 6, 2022
a808a07
Merge branch 'master' into fifo_example
Jun 7, 2022
34d6adf
tests: Move required tool checks from rule generation to execution
jix Jun 7, 2022
2b1a588
Merge pull request #163 from jix/make_improvements
jix Jun 7, 2022
534ac21
Merge pull request #169 from jix/yices-forall
jix Jun 8, 2022
675dc03
tests: Remove unused tool list in test Makefile
jix Jun 8, 2022
4a9511b
Merge pull request #171 from jix/make-remove-unused-tool-list
jix Jun 8, 2022
d0da57f
Test that cvc4 and cvc5 can be used
jix Jun 8, 2022
41e4276
Adding noskip task
Jun 9, 2022
069197a
Add section on sby to newstart
Jun 9, 2022
d7686ca
Merge pull request #164 from jix/suggest_f_flag
jix Jun 10, 2022
1d21513
Merge pull request #173 from jix/test-cvc
jix Jun 10, 2022
4ef02d2
Regression test for smtbmc --unroll --noincr
jix Jun 8, 2022
499371f
Use the test Makefile for all examples
jix Jun 13, 2022
c50bd78
Merge pull request #175 from jix/more-test-improvements
jix Jun 13, 2022
a200043
Merge pull request #172 from jix/smtbmc-unroll-noincr-traces-fix
jix Jun 13, 2022
b42b644
tristate example
mattvenn Jun 13, 2022
7efabe8
expect fail
mattvenn Jun 13, 2022
687ee0f
remove unused module port
mattvenn Jun 13, 2022
b88d7a1
add makefile for test
mattvenn Jun 14, 2022
1e14024
Merge pull request #177 from mattvenn/tristate-example
jix Jun 14, 2022
05d963b
aiger: check supported modes and aigbmc fixes
jix Jun 14, 2022
98b0713
Merge pull request #178 from jix/aiger-aigbmc-fixes
jix Jun 14, 2022
141ffd3
btor pono: improve option handling
jix Jun 14, 2022
f131fe5
Merge pull request #179 from jix/btor-option-handling
jix Jun 15, 2022
e99884e
SbyProc: New error_callback instead of exit_callback for failing procs
jix Jun 15, 2022
d0c59a3
Don't use python asserts to handle unexpected solver output
jix Jun 14, 2022
0df73ea
Merge pull request #180 from jix/sby-fewer-asserts
jix Jun 15, 2022
d1c04f7
Use monotonic clock for timeouts
jix Apr 25, 2022
c944a9c
Merge pull request #181 from jix/monotonic
jix Jun 15, 2022
0fe8c22
Decouple taskloop from task
jix Apr 21, 2022
fb5705b
Merge pull request #182 from jix/taskloop
jix Jun 15, 2022
0308142
Use default prefix directory when no task is specified
georgerennie Jun 18, 2022
d8ebd1e
Reflect recent engine updates in the reference docs
jix Jun 20, 2022
db74083
switch to using hierarchy -smtcheck for smtlib2 solvers, allowing smt…
programmerjake Jun 23, 2022
3dcf776
smtbmc: Fix induction trace filename with --keep-going for the basecase
jix Jun 23, 2022
f66436c
Merge pull request #184 from jix/smtbmc-keepgoing-induction-trace-fix
jix Jun 23, 2022
0d90e29
Merge pull request #183 from jix/engine-option-docs
jix Jun 23, 2022
157bb15
Merge pull request #185 from georgerennie/prefix_empty_taskname
jix Jun 24, 2022
5014d74
sby_design: Extract total memory size and forall usage
jix Jun 14, 2022
b4458d4
Automatic engine selection
jix Apr 25, 2022
48a02f9
Test autotune
jix Jun 23, 2022
d038a7d
autotune: Initial documentation
jix Jun 27, 2022
abe0086
Merge pull request #158 from jix/autotune
jix Jun 29, 2022
907db48
Updating from feedback
Jun 30, 2022
6854579
docs: add missing autotune.rst
jix Jun 30, 2022
4d858a1
Merge pull request #189 from jix/autotune_docs
jix Jun 30, 2022
7ba67ef
Removing unnecessary underflow assertions
Jun 30, 2022
aab2c3c
New exercise section
Jun 30, 2022
de5b9b7
Changed phrasing to avoid confusion on witnesses
Jun 30, 2022
a5f67ed
Merge branch 'master' into fifo_example
Jun 30, 2022
e312328
Merge pull request #170 from programmerjake/add-simcheck-option
jix Jul 3, 2022
c9fbfa3
Adding makefile for fifo
Jul 3, 2022
cc27d27
More literalincludes
Jul 3, 2022
e01ac8b
tests: Test for invalid x-value FF init optimizations
jix Jun 29, 2022
9016031
Merge pull request #186 from jix/ff_xinit_opt
jix Jul 4, 2022
ff80208
test uninited FFs with const clks and fix btor script for this
jix Jun 29, 2022
ab98938
Merge pull request #187 from jix/const_clocks
jix Jul 4, 2022
ea7fc7d
tests: Windows fixes
jix Jul 5, 2022
ff1f87e
Merge pull request #190 from jix/windows_fixes
jix Jul 5, 2022
566edad
Read config before creating a workdir
jix Jul 5, 2022
b3b315a
Make SbyProc hide Windows differences in retcode handling
jix Jul 6, 2022
f42ed5e
Merge pull request #192 from jix/win_retcode
jix Jul 6, 2022
de43a4c
Merge pull request #191 from jix/early-readconfig
jix Jul 6, 2022
92e7eb2
abc pdr: Enable log output by default
jix Jul 8, 2022
bc2bb5c
docs: Don't use linebreaks within inline code spans.
jix Jul 8, 2022
cea760b
Merge pull request #194 from jix/autotune_rst_fixes
jix Jul 8, 2022
4ab610c
Update autotune.rst
mattvenn Jul 11, 2022
ca3429e
Autotune grammar/spelling check
KrystalDelusion Jul 11, 2022
5d3f784
Fix a race-condition SbyProc that could truncate output
jix Jul 13, 2022
b8a1bdd
Merge pull request #193 from jix/abc_pdr_v
jix Jul 13, 2022
07d19b2
Merge pull request #195 from jix/sbyproc-truncated-output
jix Jul 13, 2022
b4dd638
Merge pull request #197 from YosysHQ/Autotune-grammar-check
jix Jul 25, 2022
3ff2c9a
avoid erroring out when coarse-grain logic loops can be resolved by m…
nakengelhardt Jul 19, 2022
1cf206f
add cvc5 executable to required tool mapping
nakengelhardt Jul 25, 2022
a498e1e
Merge pull request #199 from nakengelhardt/add_cvc5_tool_rule
jix Jul 25, 2022
9293e66
example for autotune
jix Jul 26, 2022
0395b8a
Merge pull request #200 from jix/autotune_example
jix Jul 26, 2022
4ec278e
Autotune example in docs
jix Jul 26, 2022
672a559
Merge branch 'YosysHQ:master' into fifo_example
KrystalDelusion Aug 1, 2022
ed9b291
Remove redundancies in certain logic checks
Aug 1, 2022
b2d0368
Testing fifo things in CI
Aug 1, 2022
c200690
Merge pull request #201 from jix/autotune_example_in_docs
jix Aug 1, 2022
59dc27e
sby: core: config: cleaned up the error messages to make them less op…
lethalbit Jul 29, 2022
93d8ef9
Fixed bigtest
Aug 1, 2022
a76286e
Check output of fifo.sby
Aug 1, 2022
cfa4352
Changes to reset
Aug 2, 2022
523b7a2
Regression test for YosysHQ/yosys#3433
jix Aug 2, 2022
8d2fa9b
Merge pull request #207 from jix/fix_smt_shift
jix Aug 3, 2022
8133aaa
sby: core: changed how the sections and their arguments are handled a…
lethalbit Aug 2, 2022
10234fe
sby: core: changed how the split for the section header and arguments…
lethalbit Aug 2, 2022
9368f3f
sby: core: explicitly split the the entries for the `[options]` secti…
lethalbit Aug 4, 2022
46ca20f
sby: core: ensured to strip the line of any uneeded whitespace
lethalbit Aug 4, 2022
edb068b
Fix print_junit_results failure during some error conditions
jix Aug 2, 2022
5265a52
Refactor flow to use a common prep model
jix Jul 25, 2022
acaf6ef
Use new memory_map -formal for aiger/_nomem
jix Aug 2, 2022
d352003
Write native yosys witness traces
jix Aug 2, 2022
22585b3
Use 'rename -witness' instead of multiple 'rename -enumerate'
jix Aug 3, 2022
231f0b8
Add make_model option to generate models not required by the task
jix Aug 2, 2022
3412ea8
New "none" engine to be used with the "make_model" option
jix Aug 5, 2022
ad8730f
Fix typo
Aug 8, 2022
1d4716a
Add noverific task to test the non verific code
Aug 8, 2022
d6d7119
Rewrite of non verific underfill/overfill
Aug 8, 2022
0aebf0b
aig model: Call memory_map late to avoid performance issues
jix Aug 8, 2022
9a14f4d
Merge pull request #210 from jix/witness_flow
jix Aug 17, 2022
4cccbf7
sby: core: Added preliminary support for the `[setup]` section
lethalbit Mar 31, 2022
ed82c78
sby: core: Added preliminary support for `[stage]` sections
lethalbit Mar 31, 2022
0ab158e
sby: core: minor update to the stage parsing
lethalbit Jun 29, 2022
a0d366e
some cleanup, added some rough parser tests, and started altering the…
lethalbit Jul 29, 2022
f1a645b
sby: core: config: Updated the `[stage]` section to use commas for th…
lethalbit Jul 29, 2022
9293081
modified the mode runners to accept the modified engine layout in pre…
lethalbit Jul 29, 2022
204869b
sby: core: config: updated the error messages for the new setctions t…
lethalbit Jul 29, 2022
4abd8a7
tests: parser: updated the parser tests that caused a failure due to …
lethalbit Jul 29, 2022
987e439
tests: parser: added the stages option to the options test file
lethalbit Jul 29, 2022
e4a7f62
sby: core: config: fixed the engines section parsing where it was not…
lethalbit Jul 29, 2022
2f841e5
sby: core: updated the parsing to match the changes in PR #206
lethalbit Aug 2, 2022
ad4f506
sby: core: fixed up the `engines` section parser
lethalbit Aug 4, 2022
6c95957
sby: core: cleaned up the `[stage]` section parsing
lethalbit Aug 4, 2022
98fdcd7
sby: core: fixed up the `[setup]` section
lethalbit Aug 4, 2022
da56a3c
docs: started working on a rough draft of the docs for the new sectio…
lethalbit Aug 4, 2022
637095a
sby: fixed the sby task execution to accept the new engine internal l…
lethalbit Aug 4, 2022
841e0cb
sby: core: Added unsupported messages to the new sections
lethalbit Aug 4, 2022
a6c220d
docs: Cut out the in-progress docs in preperation for a merge
lethalbit Aug 5, 2022
e8b8816
docs: removed empty line
lethalbit Aug 17, 2022
8f55081
sby: core: minor error message cleanups for consistency
lethalbit Aug 17, 2022
41b4ce5
sby: fixed issue where engine index would be out of range
lethalbit Aug 18, 2022
de40cc4
sby: core: removed invalid None check in setup section
lethalbit Aug 18, 2022
ea84c67
tests: Ignore .sby files starting with skip_
jix Aug 18, 2022
de939e2
Run tasks in parallel
jix Jul 6, 2022
b0786ae
Make jobserver integration
jix Jul 13, 2022
e91977e
Use local jobslots as fallback on Windows.
jix Jul 13, 2022
8879a5d
Merge pull request #209 from YosysHQ/aki/sby_config
jix Aug 19, 2022
353fac4
Merge pull request #211 from jix/skip_tests
jix Aug 19, 2022
bd88454
Merge pull request #196 from jix/parallel_jobserver
jix Aug 19, 2022
df2610d
Fixes before merge
Aug 22, 2022
82a6edf
Moving newstart to replace quickstart
Aug 22, 2022
4adb99e
Merge pull request #174 from KrystalDelusion/fifo_example
nakengelhardt Aug 22, 2022
586be8b
tests: Fix test_rules.py after sby config parser changes
jix Sep 2, 2022
326247f
tests: Skip broken tests
jix Sep 2, 2022
17c3961
Merge pull request #213 from jix/fix_tests
jix Sep 5, 2022
168d667
Add vcd option to make VCD writing optional
jix Sep 5, 2022
9edb6ee
Merge pull request #214 from jix/no_vcd
jix Sep 5, 2022
37140e7
Fixing golden/fifo.sv
Sep 6, 2022
e97dd01
Merge pull request #215 from KrystalDelusion/master
jix Sep 8, 2022
a0e3dd3
Fix engine_list's return value
jix Sep 15, 2022
83a1aa2
Merge pull request #218 from jix/fix_engine_list
jix Sep 15, 2022
90616c2
tests: Do not run the same SBY task multiple times in parallel
jix Oct 20, 2022
6995aae
Merge pull request #219 from jix/fix-parallel-tests
jix Oct 20, 2022
966bdae
aigbmc: Convert aiw trace to yw trace and load that into smtbmc
jix Oct 20, 2022
50bdc76
Update CI script
mmicko Oct 24, 2022
54cb030
Merge pull request #220 from jix/aigbmc-use-yw
jix Oct 24, 2022
003ccf7
Add color handling via click.style and click.echo
clairexen Oct 31, 2022
e8d713c
Add colors to early and late log messages
clairexen Nov 2, 2022
c29a5bb
Add colors to engine header message
clairexen Nov 24, 2022
9c75e49
Merge pull request #221 from YosysHQ/claire/click
clairexen Nov 24, 2022
19109fd
jobserver: Only poll non-helper-process jobserver fd when ready to read
jix Dec 9, 2022
544a1cb
Merge pull request #224 from jix/jobserver-poll-fix
jix Dec 9, 2022
beb8b3c
Do not use fstring syntax that requires Python 3.8
jix Dec 19, 2022
4c44a10
Merge pull request #226 from jix/python36-fstrings
jix Dec 19, 2022
6d3b5aa
Unified trace generation using yosys's sim across all engines
jix Jan 10, 2023
06c36d5
Support "fifo:" make jobserver auth
jix Jan 10, 2023
6398938
Enable yosys sim support for clock signals in hierarchical designs
jix Jan 11, 2023
f14aaa5
avy: Fold aiger model using abc to support assumptions
jix Jan 11, 2023
7d3f0d5
Merge pull request #227 from jix/sim_traces
jix Jan 25, 2023
6d1ef8b
docs: Yices is still recommended
jix Feb 6, 2023
7a3b88c
docs: Document new sim related options
jix Feb 6, 2023
37d1234
Merge pull request #228 from jix/docs-updates
jix Feb 6, 2023
c5dce57
append_assume: Make `append_assume on` the default for now
jix Feb 8, 2023
466ab84
Merge pull request #230 from jix/append_assume_default
jix Feb 8, 2023
81ee5fd
update prerequisites
nakengelhardt Feb 8, 2023
8eaeca9
Update GH action
mmicko Feb 13, 2023
2cd0f6f
Try fixing GH action
mmicko Feb 13, 2023
fa5bc95
-f clean: QoL improvement on Windows concerning file/dir removal locking
dlmiles Feb 18, 2023
74f3388
Merge pull request #232 from dlmiles/win-qol-cleanopt
jix Feb 20, 2023
513d0d4
Change Sphinx theme to "furo"
jix May 3, 2023
cb968ea
Update .readthedocs.yaml
jix May 8, 2023
36e7a72
Adding prep mode and skip_prep option
KrystalDelusion May 16, 2023
f49c9eb
Make call to "witness -rename" optional (default=on)
clairexen Jun 2, 2023
81b9de9
Merge pull request #238 from YosysHQ/claire/nowitrename
clairexen Jun 2, 2023
7d60a3b
Add aigvmap and aigsyms options
clairexen Jun 3, 2023
c562d65
Merge pull request #239 from YosysHQ/claire/aigvmap
clairexen Jun 4, 2023
c027aea
Merge pull request #237 from jix/sphinx-theme
clairexen Jun 4, 2023
8b3ba68
Add aigfolds option
clairexen Jun 7, 2023
f692eff
Add support for "abc pdr -d" engine
clairexen Jun 7, 2023
27e20fd
Add sphinx-argparse to generate usage
KrystalDelusion Jun 12, 2023
0d6a70e
autotune: Fix crash on no-engine error path
jix Jun 19, 2023
1a4c2a5
Add sbysrc to path during docs build
KrystalDelusion Jun 19, 2023
c52acf2
docs: Make sphinx-argparse work independently of sphinx's cwd
jix Jun 19, 2023
28c053b
smtbmc: Allow using --keep-going in cover mode
jix Jun 23, 2023
4d1ac01
Merge pull request #244 from jix/smtbmc-cover-keepgoing
jix Jun 26, 2023
fbbbab2
Merge pull request #240 from YosysHQ/claire/aigfolds
clairexen Jun 28, 2023
edbc054
Fix deadlock with parallel SBY procs each with parallel tasks
jix Jul 17, 2023
79e6ecf
Merge pull request #245 from jix/fix-jobserver-deadlock
nakengelhardt Jul 17, 2023
df18dbf
Merge pull request #242 from jix/fix-autotune-crash
clairexen Jul 18, 2023
5ee5a78
Merge pull request #241 from YosysHQ/krys/argparse_docs
clairexen Jul 18, 2023
ffa53a3
Merge branch 'master' into krys/argparse_docs
clairexen Jul 18, 2023
8c4e2da
Merge pull request #243 from jix/krys/argparse_docs
clairexen Jul 18, 2023
4cddd7a
Merge branch 'master' into krys/scy_dev
clairexen Jul 18, 2023
cf0a761
Merge pull request #246 from YosysHQ/krys/scy_dev
clairexen Jul 18, 2023
884ef86
assume_early option to implement cross assumes in IVY
jix Aug 11, 2023
85dd50b
Merge pull request #248 from jix/ivy_wip
mmicko Aug 25, 2023
7415abf
Create codeql.yml
mmicko Sep 8, 2023
36f84b8
smtbmc: Use new -noinitstate option when simulating inductive cex
jix Sep 28, 2023
8581bd3
Add dft/data_diode example
jix Sep 28, 2023
5b1f26c
Merge pull request #249 from jix/inductive-cex-sim
jix Oct 2, 2023
9e35ec9
Merge pull request #250 from jix/dft-data-diode
jix Oct 2, 2023
040b8de
Add aigcxemin and cexenum.py tools
jix Nov 16, 2023
f0f140c
Merge pull request #252 from jix/cexenum
jix Nov 20, 2023
6e97cea
Fix PREFIX in makefile to accept environment variable, if set
davekeeshan Dec 2, 2023
130aa37
Merge pull request #254 from daxzio/prefix_fix
nakengelhardt Jan 15, 2024
6f0f264
tests: Support testing an installed SBY using the SBY_CMD make variable
jix Jan 19, 2024
1eeb6f3
Delete `$print` cells in the backend flows
jix Jan 22, 2024
881082c
sby_design: Discover properties represented using `$check` cells
jix Jan 22, 2024
bd9e218
Merge pull request #259 from jix/prepare-check
jix Jan 23, 2024
40bf8fc
sby_design: Also track fairness assumptions
jix Jan 24, 2024
44ccad3
Update workflows
mmicko Jan 29, 2024
056ced9
Merge pull request #261 from YosysHQ/workflows
mmicko Jan 29, 2024
cde9e57
Merge pull request #258 from jix/sby_cmd
jix Jan 29, 2024
5c649c8
Merge pull request #260 from jix/prepare-check
jix Feb 1, 2024
52184e5
Initial support for a multi-task property status database
jix Feb 19, 2024
6ba762d
Support for "abc --keep-going pdr" via new "pdr -X" mode
jix Feb 7, 2024
d3a6f2d
Emit status db update from aigsmt
jix Feb 20, 2024
b6e41a3
Support for the new anytime schedule in yosys-abc's pdr
jix Feb 27, 2024
0c84510
Merge pull request #263 from jix/pdr-X
jix Mar 6, 2024
fd381ad
Print an error message when using "--status" with no project specified
jix Mar 11, 2024
cba7708
Print a message when SBY is waiting for a config on stdin
jix Mar 11, 2024
c73cd3e
Merge pull request #267 from jix/sby-status-errormsg
jix Mar 11, 2024
6c8b838
Update sby_engine_abc.py
KrystalDelusion Mar 11, 2024
e30a0fe
Merge pull request #268 from YosysHQ/KrystalDelusion-patch-1
jix Mar 11, 2024
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
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: ci
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: YosysHQ/setup-oss-cad-suite@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run checks
run: pip install xmlschema && make ci
28 changes: 28 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "CodeQL"

on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: python
queries: security-extended,security-and-quality

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
5 changes: 5 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

version: 2

build:
os: ubuntu-22.04
tools:
python: '3.11'

formats:
- pdf

Expand Down
89 changes: 24 additions & 65 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

DESTDIR =
PREFIX = /usr/local
PREFIX ?= /usr/local
PROGRAM_PREFIX =

# On Windows, manually setting absolute path to Python binary may be required
Expand All @@ -10,6 +10,8 @@ ifeq ($(OS), Windows_NT)
PYTHON = $(shell cygpath -w -m $(PREFIX)/bin/python3)
endif

.PHONY: help install ci test html clean

help:
@echo ""
@echo "sudo make install"
Expand All @@ -19,7 +21,11 @@ help:
@echo " build documentation in docs/build/html/"
@echo ""
@echo "make test"
@echo " run examples"
@echo " run tests, skipping tests with missing dependencies"
@echo ""
@echo "make ci"
@echo " run all tests, failing tests with missing dependencies"
@echo " note: this requires a full Tabby CAD Suite or OSS CAD Suite install"
@echo ""
@echo "make clean"
@echo " cleanup"
Expand All @@ -39,17 +45,22 @@ else
chmod +x $(DESTDIR)$(PREFIX)/bin/sby
endif

ci: \
test_demo1 test_demo2 test_demo3 \
test_abstract_abstr test_abstract_props \
test_demos_fib_cover test_demos_fib_prove test_demos_fib_live \
test_multiclk_dpmem \
test_puzzles_djb2hash test_puzzles_pour853to4 test_puzzles_wolfgoatcabbage \
test_puzzles_primegen_primegen test_puzzles_primegen_primes_pass test_puzzles_primegen_primes_fail \
test_quickstart_demo test_quickstart_cover test_quickstart_prove test_quickstart_memory \
run_tests
.PHONY: check_cad_suite run_ci

ci: check_cad_suite
@$(MAKE) run_ci

run_ci:
$(MAKE) test NOSKIP=1
if yosys -qp 'read -verific' 2> /dev/null; then set -x; \
YOSYS_NOVERIFIC=1 $(MAKE) ci; \
YOSYS_NOVERIFIC=1 $(MAKE) run_ci; \
fi

check_cad_suite:
@if ! which tabbypip >/dev/null 2>&1; then \
echo "'make ci' requries the Tabby CAD Suite or the OSS CAD Suite"; \
echo "try 'make test' instead or run 'make run_ci' to proceed anyway."; \
exit 1; \
fi

test_demo1:
Expand All @@ -61,59 +72,7 @@ test_demo2:
test_demo3:
cd sbysrc && python3 sby.py -f demo3.sby

test_abstract_abstr:
@if yosys -qp 'read -verific' 2> /dev/null; then set -x; \
cd docs/examples/abstract && python3 ../../../sbysrc/sby.py -f abstr.sby; \
else echo "skipping $@"; fi

test_abstract_props:
if yosys -qp 'read -verific' 2> /dev/null; then set -x; \
cd docs/examples/abstract && python3 ../../../sbysrc/sby.py -f props.sby; \
else echo "skipping $@"; fi

test_demos_fib_cover:
cd docs/examples/demos && python3 ../../../sbysrc/sby.py -f fib.sby cover

test_demos_fib_prove:
cd docs/examples/demos && python3 ../../../sbysrc/sby.py -f fib.sby prove

test_demos_fib_live:
cd docs/examples/demos && python3 ../../../sbysrc/sby.py -f fib.sby live

test_multiclk_dpmem:
cd docs/examples/multiclk && python3 ../../../sbysrc/sby.py -f dpmem.sby

test_puzzles_djb2hash:
cd docs/examples/puzzles && python3 ../../../sbysrc/sby.py -f djb2hash.sby

test_puzzles_pour853to4:
cd docs/examples/puzzles && python3 ../../../sbysrc/sby.py -f pour_853_to_4.sby

test_puzzles_wolfgoatcabbage:
cd docs/examples/puzzles && python3 ../../../sbysrc/sby.py -f wolf_goat_cabbage.sby

test_puzzles_primegen_primegen:
cd docs/examples/puzzles && python3 ../../../sbysrc/sby.py -f primegen.sby primegen

test_puzzles_primegen_primes_pass:
cd docs/examples/puzzles && python3 ../../../sbysrc/sby.py -f primegen.sby primes_pass

test_puzzles_primegen_primes_fail:
cd docs/examples/puzzles && python3 ../../../sbysrc/sby.py -f primegen.sby primes_fail

test_quickstart_demo:
cd docs/examples/quickstart && python3 ../../../sbysrc/sby.py -f demo.sby

test_quickstart_cover:
cd docs/examples/quickstart && python3 ../../../sbysrc/sby.py -f cover.sby

test_quickstart_prove:
cd docs/examples/quickstart && python3 ../../../sbysrc/sby.py -f prove.sby

test_quickstart_memory:
cd docs/examples/quickstart && python3 ../../../sbysrc/sby.py -f memory.sby

run_tests:
test:
$(MAKE) -C tests test

html:
Expand Down
3 changes: 3 additions & 0 deletions docs/examples/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SUBDIR=../docs/examples
TESTDIR=../../tests
include $(TESTDIR)/make/subdir.mk
3 changes: 3 additions & 0 deletions docs/examples/abstract/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SUBDIR=../docs/examples/abstract
TESTDIR=../../../tests
include $(TESTDIR)/make/subdir.mk
30 changes: 30 additions & 0 deletions docs/examples/autotune/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Autotune demo

This directory contains a simple sequential integer divider circuit. The
verilog implementation in [divider.sv](divider.sv) comes with assertions that
this circuit will always produce the correct result and will always finish
within a fixed number of cycles. The circuit has the divider bit-width as
parameter.

Increasing the WIDTH parameter quickly turns proving those assertions into a
very difficult proof for fully autmated solvers. This makes it a good example
for the `--autotune` option which tries different backend engines to find the
best performing engine configuration for a given verification task.

The [divider.sby](divider.sby) file defines 3 tasks named `small`, `medium` and
`large` which configure the divider with different bit-widths. To verify the
`small` divider using the default engine run:

sby -f divider.sby small

To automatically try different backend engines using autotune, run

sby --autotune -f divider.sby small

The `small` task should finish quickly using both the default engine and using
autotune. The `medium` and `large` tasks take significantly longer and show
greater differences between engine configurations. Note that the `large` tasks
can take many minutes to hours, depending on the machine you are using.

You can learn more about Sby's autotune feature from [Sby's
documentation](https://symbiyosys.readthedocs.io/en/latest/autotune.html).
24 changes: 24 additions & 0 deletions docs/examples/autotune/divider.sby
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[tasks]
small default
medium
large

[options]
mode prove
small: depth 11
medium: depth 15
large: depth 19

[engines]
smtbmc

[script]
small: read -define WIDTH=8
medium: read -define WIDTH=12
large: read -define WIDTH=16

read -formal divider.sv
prep -top divider

[files]
divider.sv
85 changes: 85 additions & 0 deletions docs/examples/autotune/divider.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
`ifndef WIDTH
`define WIDTH 4
`endif

module divider #(
parameter WIDTH=`WIDTH
) (
input wire clk,
input wire start,
input wire [WIDTH-1:0] dividend,
input wire [WIDTH-1:0] divisor,

output reg done,
output reg [WIDTH-1:0] quotient,
output wire [WIDTH-1:0] remainder
);

reg [WIDTH-1:0] acc;

reg [WIDTH*2-1:0] sub;
reg [WIDTH-1:0] pos;

assign remainder = acc;

always @(posedge clk) begin
if (start) begin
acc <= dividend;
quotient <= 0;
sub <= divisor << (WIDTH - 1);
pos <= 1 << (WIDTH - 1);
done <= 0;
end else if (!done) begin
if (acc >= sub) begin
acc <= acc - sub[WIDTH-1:0];
quotient <= quotient + pos;
end

sub <= sub >> 1;
{pos, done} <= pos;
end
end


`ifdef FORMAL
reg [WIDTH-1:0] start_dividend = 0;
reg [WIDTH-1:0] start_divisor = 0;

reg started = 0;
reg finished = 0;
reg [$clog2(WIDTH + 1):0] counter = 0;

always @(posedge clk) begin
// Bound the number of cycles until the result is ready
assert (counter <= WIDTH);

if (started) begin
if (finished || done) begin
finished <= 1;
// Make sure result stays until we start a new division
assert (done);

// Check the result
if (start_divisor == 0) begin
assert (&quotient);
assert (remainder == start_dividend);
end else begin
assert (quotient == start_dividend / start_divisor);
assert (remainder == start_dividend % start_divisor);
end
end else begin
counter <= counter + 1'b1;
end
end

// Track the requested inputs
if (start) begin
start_divisor <= divisor;
start_dividend <= dividend;
started <= 1;
counter <= 0;
finished <= 0;
end
end
`endif
endmodule
3 changes: 3 additions & 0 deletions docs/examples/demos/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SUBDIR=../docs/examples/demos
TESTDIR=../../../tests
include $(TESTDIR)/make/subdir.mk
File renamed without changes.
25 changes: 25 additions & 0 deletions docs/examples/demos/picorv32_axicheck.sby
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[tasks]
yices
boolector
z3
abc

[options]
mode bmc
depth 10

[engines]
yices: smtbmc yices
boolector: smtbmc boolector -ack
z3: smtbmc --nomem z3
abc: abc bmc3

[script]
read_verilog -formal -norestrict -assume-asserts picorv32.v
read_verilog -formal axicheck.v
prep -top testbench

[files]
picorv32.v ../../../extern/picorv32.v
axicheck.v ../../../extern/axicheck.v

9 changes: 6 additions & 3 deletions sbysrc/demo2.sby → docs/examples/demos/up_down_counter.sby
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[tasks]
suprove
avy

[options]
mode prove
wait on

[engines]
aiger suprove
aiger avy
suprove: aiger suprove
avy: aiger avy

[script]
read_verilog -formal demo.v
Expand Down
Loading