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

bump fork for version 0.46 #25

Merged
merged 249 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
249 commits
Select commit Hold shift + click to select a range
3f71bc4
check: Rephrase comment
povik Jul 18, 2024
e70b125
check: Adjust prints
povik Jul 18, 2024
0cefe8a
check: Skip detailed edge modeling if costly
povik Jul 18, 2024
0922142
Add generic topological sort and SCC detection
jix Apr 15, 2024
c73c8a3
kernel/log: Add log_str helper for custom log_* functions/overloads
jix Apr 15, 2024
f24e253
kernel/rtlil: Add `SigBit operator[](int offset)` to `SigChunk`
jix Apr 15, 2024
5657297
drivertools: Utility code for indexing and traversing signal drivers
jix Apr 15, 2024
68c3a47
WIP temporary drivertools example
jix Apr 15, 2024
f29422f
topo_scc: Add sources_first option
jix Apr 11, 2024
d4e3daa
ComputeGraph datatype for the upcoming functional backend
jix Apr 11, 2024
d90268f
fixup! drivertools: Utility code for indexing and traversing signal d…
jix Apr 17, 2024
dd5ec84
fix bugs in drivertools
aiju May 1, 2024
63dea89
add initial version of functional C++ backend
aiju May 1, 2024
7611dda
add initial version of functional smtlib backend
aiju May 23, 2024
720429b
Add test_cell tests for C++ functional backend
RCoeurjoly Jun 12, 2024
76371d1
Change assert to log_assert
RCoeurjoly Jun 12, 2024
7b29d17
add support for memories to c++ and smtlib functional backends
aiju Jun 12, 2024
3552a8a
sim.h cannot use log_assert because does not include yosys headers
RCoeurjoly Jun 12, 2024
dbf2bc3
need unsigned comparison when checking shift widths for overflow in f…
aiju Jun 12, 2024
248d5f7
add support for std::variant to hashlib
aiju Jun 20, 2024
6f9e212
add new generic compute graph and rewrite c++ functional backend to u…
aiju Jun 20, 2024
4e370f4
Initial functional SMT backend using functional IR
RCoeurjoly Jun 21, 2024
54225b5
Add test for SMT backend. Tests if SMT is valid and compares simulati…
RCoeurjoly Jun 21, 2024
c6e1126
Remove unused includes
RCoeurjoly Jun 23, 2024
547c546
Ignore smt2 files, generated by the execution of the tests
RCoeurjoly Jun 24, 2024
71aaa1c
Consolidate tests scripts into one
RCoeurjoly Jun 24, 2024
b98210d
Valid SMT is emitted, improved test script
RCoeurjoly Jun 26, 2024
94ddbc9
Fix reduce_or
RCoeurjoly Jun 26, 2024
4109fce
clang-format smtlib.cc
RCoeurjoly Jun 26, 2024
39bf4f0
Create VCD file from SMT file
RCoeurjoly Jun 26, 2024
eb2bb8c
tidy up generic functional backend, add generic scope class, tidy up …
aiju Jun 27, 2024
21bb1cf
rewrite functional c++ simulation library
aiju Jun 27, 2024
e235fc7
Create std::mt19937 only once
RCoeurjoly Jun 27, 2024
ee6bd59
Removed unnecesary nested_lets variable, use writer.print instead
RCoeurjoly Jun 27, 2024
32cdf25
Use FunctionalTools::Scope instead of replaceCharacters
RCoeurjoly Jun 27, 2024
9700df5
add generic writer class with formatting function to FunctionalTools
aiju Jul 4, 2024
cb5f083
´SMT success only if simulation is equivalent
RCoeurjoly Jul 3, 2024
73ed514
Check that there are not other solutions other than the first given
RCoeurjoly Jul 4, 2024
762f8dd
Add readme explaining how to create test files
RCoeurjoly Jul 4, 2024
50f487e
Added $ff test
RCoeurjoly Jul 4, 2024
1b2986f
add support for $mul, $div, $divfloor, $mod, $modfloor, $pow in funct…
aiju Jul 4, 2024
57af68a
include algorithm, needed for std::reverse
RCoeurjoly Jul 4, 2024
e296b88
Add Makefile helpers for coverage
mmicko Jul 5, 2024
f0f436c
Fix parenthesis for arithmetic_shift_right
RCoeurjoly Jul 5, 2024
5780357
Emit valid SMT for stateful designs, fix some cells
RCoeurjoly Jul 7, 2024
fad76ce
Fix memory leak
RCoeurjoly Jul 7, 2024
7cff8fa
Fix corner case of pos cell with input and output being same width
RCoeurjoly Jul 7, 2024
566e57d
Support $lut cells. Both C++ and SMT tests pass
RCoeurjoly Jul 7, 2024
80582ed
Check the existance of a different set of outputs. No need for (push …
RCoeurjoly Jul 8, 2024
9f660b1
rewrite smtlib pass to use SExpr class
aiju Jul 10, 2024
c659ef2
change smtlib backend to use list() function instead of SExpr{} const…
aiju Jul 10, 2024
00a6575
factor out SExpr/SExprWriter classes out of smtlib backend, and also …
aiju Jul 11, 2024
6e7ae88
fix bugs in smtlib backend
aiju Jul 12, 2024
9ad859f
add bwmux, bweqx, bmux, demux cells
aiju Jul 12, 2024
674e6d2
rewrite functional backend test code in python
aiju Jul 12, 2024
6922633
fix a few bugs in the functional backend and refactor the testing
aiju Jul 16, 2024
55c2c17
document functionalir.h and change visitors to derive from AbstractVi…
aiju Jul 17, 2024
7f8f21b
remove widths parameters from FunctionalIR factory methods and from f…
aiju Jul 17, 2024
c0c90c2
functional backend: require shift width == clog2(operand width)
aiju Jul 17, 2024
13bacc5
eliminate pmux in functional backend
aiju Jul 17, 2024
3cd5f4e
add support for RTLIL cells with multiple outputs to the functional b…
aiju Jul 17, 2024
4722f13
functional backend: reduce $lcu to $alu
aiju Jul 18, 2024
145af6f
fix memory handling in functional backend, add more error messages an…
aiju Jul 18, 2024
6d329e1
functional backend: error out if multiply driven or undriven signals …
aiju Jul 18, 2024
12a31a4
add MemContents class to mem.h
aiju Jul 24, 2024
bdb59ff
add -fst-noinit flag to sim for not initializing the state from the f…
aiju Jul 24, 2024
99effb6
add support for initializing registers and memories to the functional…
aiju Jul 24, 2024
95d28c2
functional backend: make Memory in the C++ simulation library read-on…
aiju Jul 24, 2024
7ac0e92
functional backend: rename get_input and get_current_state to input a…
aiju Jul 25, 2024
8c0f625
functional backend: topological sort starts with the output and next …
aiju Jul 25, 2024
850b3a6
convert class FunctionalIR to a namespace Functional, rename function…
aiju Jul 25, 2024
fbee310
add optional header and hashlib implementation for optional
aiju Jul 25, 2024
8f77494
silence some warnings
aiju Jul 25, 2024
79a1b69
silence some more warnings, undo mistaken addition
aiju Jul 25, 2024
50047d2
functional backend: add different types of input/output/state variables
aiju Aug 6, 2024
831da51
add picorv test to functional backend
aiju Aug 8, 2024
f456761
add sandia copyright notice to the functional backend
aiju Aug 13, 2024
9b5e81b
drivertools: fix C++20 "incomplete type" error by moving constructors…
aiju Aug 22, 2024
761eff5
functional backend: missing includes for stl containers
aiju Aug 22, 2024
459e6b9
add functional ir documentation
aiju Aug 27, 2024
b428bf4
functional backends: identifiers in c++/smtlib may not start with digits
aiju Aug 27, 2024
27efed2
functional backend: more documentation
aiju Aug 28, 2024
4eeb8d3
functional backend: rename "type" to either "kind" or "sort" to make …
aiju Aug 28, 2024
2b8db94
functional backend: add test to verify test_generic
aiju Aug 29, 2024
9c1bcb3
write_xaiger: Get by without endianness helpers
povik Sep 3, 2024
8b29629
smtr: Fork smtlib for rosette
KrystalDelusion Aug 22, 2024
7fe9157
smtr: Add rkt to functional tests
KrystalDelusion Aug 22, 2024
07b6908
smtr: Use rosette/safe
KrystalDelusion Aug 29, 2024
5a29b3e
smtr: More sanitization
KrystalDelusion Aug 29, 2024
a2abbcb
smtr: Use scope.unique_name
KrystalDelusion Sep 3, 2024
d6c5e13
smtr: Structs have local scope
KrystalDelusion Sep 3, 2024
75ed6d3
fix rst formatting in functional_ir.rst
aiju Sep 3, 2024
7de8be1
functional_ir.rst: fix typo, document SExprWriter::flush
aiju Sep 3, 2024
0ce7631
internal_stats: init, report current memory consumption on linux and mac
widlarizer Sep 3, 2024
68fbca8
Merge pull request #4554 from YosysHQ/emil/devstat
povik Sep 3, 2024
d567164
Bump version
github-actions[bot] Sep 4, 2024
5a476a8
functional tests: run from make tests but not smtlib/rkt tests
aiju Sep 4, 2024
21494d1
Makefile: Update coverage_functional
KrystalDelusion Sep 4, 2024
17ee367
Docs: Use Read the Docs SPHINXOPTS
KrystalDelusion Sep 5, 2024
bd6f7bb
ff: improve comments
widlarizer Sep 5, 2024
14b9155
internal_stats: fix doc build by adding a help string
widlarizer Sep 5, 2024
73a2d35
Merge pull request #4581 from YosysHQ/emil/ff-clk-comment
povik Sep 5, 2024
7e65b83
Merge pull request #4576 from povik/xaiger-drop-bswap
povik Sep 5, 2024
3b8f3c2
Merge pull request #4582 from YosysHQ/emil/internal_stats-help-string
povik Sep 5, 2024
e8951ab
Bump version
github-actions[bot] Sep 6, 2024
fc10a6e
Run functional tests on private runner only
mmicko Sep 6, 2024
0ad2431
Merge pull request #4585 from YosysHQ/functional_tests
mmicko Sep 6, 2024
b20df72
Merge pull request #4536 from YosysHQ/functional
mmicko Sep 6, 2024
dcf9f58
Bump version
github-actions[bot] Sep 7, 2024
c1205eb
Initialize area stats in stat pass
hnpl Sep 8, 2024
982fade
Merge pull request #4587 from hnpl/main
povik Sep 9, 2024
e64fcee
clockgate: prototype clock gating
widlarizer Sep 9, 2024
dc039d8
clockgate: test fine-grained cells
widlarizer Sep 9, 2024
7e47329
clockgate: bail on constant signals
widlarizer Sep 9, 2024
6937241
Bump version
github-actions[bot] Sep 10, 2024
bdc43c6
Add left and right bound properties to wire. Add test. Fix printing
RCoeurjoly Aug 21, 2024
ab35dff
Gowin. Add the EMCU primitive.
yrabbit Sep 11, 2024
8b46434
clockgate: no initvals
widlarizer Sep 11, 2024
1372c47
internal_stats: astnode (sizeof)
widlarizer Sep 11, 2024
3457270
Merge pull request #4595 from YosysHQ/emil/internal_stats-astnode
povik Sep 11, 2024
1e999a3
clockgate: EN can be a bit on a multi-bit wire
widlarizer Sep 11, 2024
38f9e6c
-y flag for libyosys Python scripts
donn Aug 27, 2024
738b5ee
Add dirname of script file to sys.path
donn Sep 10, 2024
8dac271
Typos
donn Sep 11, 2024
229d1ea
Bump version
github-actions[bot] Sep 12, 2024
c8b42b7
Merge pull request #4538 from RCoeurjoly/verific_bounds
nakengelhardt Sep 12, 2024
a8a92d3
clockgate: help string
widlarizer Sep 16, 2024
be7c93e
clockgate: 1-bit const 0
widlarizer Sep 16, 2024
f193bcf
clockgate: help string
widlarizer Sep 16, 2024
52382c6
Merge pull request #4583 from YosysHQ/emil/clock_gate
widlarizer Sep 16, 2024
f8ad371
Merge pull request #4594 from yrabbit/cpu-wip
widlarizer Sep 16, 2024
c884624
Bump version
github-actions[bot] Sep 17, 2024
d0b5dfa
Add bufnorm pass
clairexen Sep 27, 2023
32808a0
Improvements and fixes to "bufnorm" cmd
clairexen Sep 27, 2023
f4b7ea5
Improvements in "bufnorm" pass
clairexen Sep 28, 2023
4d469f4
Add coarse-grain $buf buffer cell type
clairexen Sep 29, 2023
d027ead
Improvements in "bufnorm" pass
clairexen Sep 29, 2023
8bb70ba
Improvements in "bufnorm" pass
clairexen Sep 29, 2023
8011938
Add RTLIL "buffered-normalized mode" and improve "bufnorm" pass
clairexen Sep 29, 2023
865df26
Adjust buf-normalized mode
povik May 21, 2024
38de018
Mark `bufnorm` experimental
povik Sep 11, 2024
e13ace6
dump: Update help after option removal
povik Sep 16, 2024
eeffca9
simlib: Add `$buf` disclaimer
povik Sep 17, 2024
a553b7c
Merge pull request #3967 from YosysHQ/claire/bufnorm
povik Sep 17, 2024
4cfdb7a
Adjust operation naming in aigmap test
povik Sep 10, 2024
fb26945
Start an 'aiger2' backend
povik Sep 10, 2024
fa39227
aiger2: Support `$pos`
povik Sep 11, 2024
5671c10
aiger2: Add strashing option
povik Sep 11, 2024
de8a2fb
aiger2: Fix duplicate symbols on multibit ports
povik Sep 11, 2024
e59387e
aiger2: Add `aigsize` as a second user of index
povik Sep 11, 2024
d7128cb
aiger2: Use shorthands
povik Sep 11, 2024
8e29675
aiger2: Support `$bwmux`, comparison operators
povik Sep 11, 2024
e4b24e8
aiger2: Fix literal typing
povik Sep 11, 2024
dbc937b
aiger2: Describe supported cells in help
povik Sep 11, 2024
9db1ca8
aiger2: Drop `empty_lit()` as a function
povik Sep 11, 2024
4d581a9
Bump version
github-actions[bot] Sep 18, 2024
4976abb
read_liberty: Optionally import unit delay arcs
povik Sep 18, 2024
31476e8
tests: Avoid temporary script file
povik Sep 18, 2024
d5756eb
tests: Add trivial liberty -unit_delay test
povik Sep 18, 2024
6c1fa45
aiger2: Ingest `$pmux`
povik Sep 16, 2024
1cfb902
aiger2: Use `REDUCE` for reduction ops
povik Sep 16, 2024
6cecf19
aiger2: Ingest `$bmux`
povik Sep 16, 2024
1ab7f29
Start read_xaiger2 -sc_mapping
povik Sep 18, 2024
72d6506
aiger2: Ignore benign cells
povik Sep 18, 2024
2a3e907
aiger2: Adjust typing
povik Sep 18, 2024
ea76568
aiger2: Adjust hierarchy/port handling
povik Sep 18, 2024
5f8d7ff
Start new write_xaiger2 backend for export w/ boxes
povik Sep 18, 2024
3a1b003
celltypes: Fix `$buf` eval
povik Sep 18, 2024
f168b2f
read_xaiger2: Update box handling
povik Sep 18, 2024
9018d06
quicklogic: Avoid carry chains in division mapping
povik Sep 19, 2024
8e1e2b9
Merge pull request #4495 from povik/check-avert-costly-detail
nakengelhardt Sep 23, 2024
b788de9
smtbmc: escape path identifiers
georgerennie Sep 24, 2024
3e3515e
log: Never silence `log_cmd_error`
povik Sep 24, 2024
ce7db66
Added cast to type support (#4284)
rherveille Sep 29, 2024
59404f8
Bump version
github-actions[bot] Sep 30, 2024
5fca9b8
Add Get vcd2fst step to test-yosys job
RCoeurjoly Sep 30, 2024
35c8ad6
cli/python: error-checking, python interpreter bugfix
donn Sep 30, 2024
500db6a
Merge pull request #4621 from RCoeurjoly/roland/get_vcd2fst
mmicko Sep 30, 2024
1bf908d
Bump version
github-actions[bot] Oct 1, 2024
997cb30
cxxrtl: test stream operator
widlarizer Oct 1, 2024
13ecbd5
quicklogic: test that dividing by a constant does not infer carry chains
Ravenslofty Oct 3, 2024
5841b44
docs: Simplify images generation to allow parallel build
tarikgraba Oct 6, 2024
d8038c1
Add -j flag to make docs CI
KrystalDelusion Oct 6, 2024
571d181
Fix top-level make docs prerequisites
KrystalDelusion Oct 6, 2024
3534e6b
Merge pull request #4632 from tarikgraba/main
KrystalDelusion Oct 6, 2024
6155c59
Bump version
github-actions[bot] Oct 7, 2024
2e1181a
ci: Run make docs on PRs
KrystalDelusion Oct 7, 2024
468a019
docs: Makefile tidying
KrystalDelusion Oct 7, 2024
0b1b94d
Docs: Clean example outputs
KrystalDelusion Oct 7, 2024
13d7b5f
Docs: Ignore example outputs
KrystalDelusion Oct 7, 2024
1f517d6
Merge pull request #4553 from donn/python_scriptfile
widlarizer Oct 7, 2024
3e6e8c8
Bump abc submodule
widlarizer Oct 7, 2024
edf29e7
Docs: Add functional_ir to index
KrystalDelusion Oct 7, 2024
33930e4
ci: Test build docs
KrystalDelusion Oct 7, 2024
f72d021
Update test-build.yml
KrystalDelusion Oct 7, 2024
d4e009f
aiger2: Add TODO
povik Oct 2, 2024
e58a9b6
abc9: Understand ASIC options similar to `abc`
povik Apr 9, 2024
2b1b565
Adjust `read_xaiger2` prints
povik Oct 4, 2024
8d12492
read_xaiger2: Fix detecting the end of extensions
povik Oct 4, 2024
f7c7371
aiger2: Fix relative ordering of PI/POs and box I/Os
povik Oct 5, 2024
4c0a8a1
aiger2: Add analysis step to order boxes
povik Oct 5, 2024
b8f3893
aiger2: Convert x-states to zeroes
povik Oct 5, 2024
e0a86d5
abc_new: Start new command for aiger2-based round trip
povik Oct 5, 2024
81688e3
aigsize: Remove
povik Oct 5, 2024
ac79a05
aiger2: Adjust help
povik Oct 5, 2024
3b6dcc7
abc9_exe: Remove `-genlib` option
povik Oct 5, 2024
2e587c8
abc9_exe: Document SC mapping options
povik Oct 5, 2024
ebe51e2
aiger2: Fix warnings
povik Oct 5, 2024
373e7a1
aiger2: Fix print
povik Oct 5, 2024
47fd2b9
aiger2: Update help
povik Oct 5, 2024
d0a11e2
aiger2: Add test of writing a flattened view
povik Oct 7, 2024
72f0fea
aiger2: Try to fix VS build
povik Oct 7, 2024
f44a418
read_xaiger2: Add casts to silence warnings
povik Oct 7, 2024
7989d53
read_xaiger2: Add help
povik Oct 7, 2024
b01b176
Add test of error not getting silenced
povik Oct 7, 2024
ca5c2fd
quicklogic: Relax the LUT number test
povik Oct 7, 2024
407343a
Pyosys Wheels
donn Aug 12, 2024
ab4ea84
wheels: more compatibility
donn Sep 28, 2024
ab84c10
Add test, shell for windows
donn Sep 28, 2024
67f17a1
wheels: symlink python3-config
donn Sep 29, 2024
08c23b7
wheels: skip musllinux for now
donn Sep 29, 2024
0bb1f89
wheels: convert versions to match pypa spec, add uploading
donn Oct 4, 2024
43128f6
wheels: move from postreleases to minor versions, remove authors
donn Oct 7, 2024
6c1450f
Merge pull request #4607 from povik/ql-nodiv
povik Oct 7, 2024
74e92d1
Merge pull request #4593 from povik/aiger2
povik Oct 7, 2024
0aab8b4
Merge pull request #4605 from povik/liberty-unit-delay
povik Oct 7, 2024
0556cb5
Merge pull request #4628 from povik/bump-abc
povik Oct 7, 2024
e46cc57
Merge pull request #4613 from povik/err-never-silence
povik Oct 7, 2024
a76bcdc
bufnorm: avoid remove warning. NFC
widlarizer Oct 7, 2024
9479d3b
Merge pull request #4637 from YosysHQ/emil/bufnorm-warning
povik Oct 7, 2024
d7cf023
wheels: properly migrate to artifact@v4
donn Oct 7, 2024
b3b88e5
Merge pull request #4609 from georgerennie/george/smtbmc_paths
jix Oct 7, 2024
b151036
ci: Switch test build docs to our runner
KrystalDelusion Oct 7, 2024
c160442
ci: Call make html directly
KrystalDelusion Oct 7, 2024
1e3973c
Explictly #include <variant> for std::variant usage.
mikesinouye Oct 7, 2024
408597b
Bump version
github-actions[bot] Oct 8, 2024
f079772
Add TODO for missing help messages
mmicko Oct 8, 2024
0be3b7d
Merge pull request #4635 from YosysHQ/krys/pr_docs_ci
KrystalDelusion Oct 8, 2024
535b330
Merge pull request #4534 from donn/test_wheels
mmicko Oct 8, 2024
380a425
Merge pull request #4639 from mikesinouye/hashlib
povik Oct 8, 2024
b4fd8e7
Bump version
github-actions[bot] Oct 9, 2024
e97731b
Release version 0.46
mmicko Oct 9, 2024
8893dad
Next dev cycle
mmicko Oct 9, 2024
c93c7f8
CI: lld is now separate brew package
mmicko Oct 9, 2024
a5968e4
Merge pull request #4642 from YosysHQ/fix_ci
mmicko Oct 9, 2024
a6ccf22
force brew formula update
mmicko Oct 9, 2024
eefd111
Merge pull request #4647 from YosysHQ/fix_macos_ci
mmicko Oct 9, 2024
038e262
Merge pull request #4624 from YosysHQ/emil/cxxrtl-smoke-test
widlarizer Oct 9, 2024
a761999
cxxrtl: fix formatting of UNICHAR
rroohhh Oct 9, 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
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = false

[*.yml]
indent_style = space
indent_size = 2
3 changes: 2 additions & 1 deletion .github/actions/setup-build-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ runs:
if: runner.os == 'macOS'
shell: bash
run: |
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install bison flex gawk libffi pkg-config bash autoconf llvm
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew update
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install bison flex gawk libffi pkg-config bash autoconf llvm lld

- name: Linux runtime environment
if: runner.os == 'Linux'
Expand Down
32 changes: 29 additions & 3 deletions .github/workflows/prepare-docs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
name: Build docs artifact with Verific

on: push
on: [push, pull_request]

jobs:
check_docs_rebuild:
runs-on: ubuntu-latest
outputs:
skip_check: ${{ steps.skip_check.outputs.should_skip }}
docs_export: ${{ steps.docs_var.outputs.docs_export }}
env:
docs_export: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/docs-preview') || startsWith(github.ref, 'refs/tags/') }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
paths_ignore: '["**/README.md"]'
# don't cancel in case we're updating docs
cancel_others: 'false'
# only run on push *or* pull_request, not both
concurrent_skipping: ${{ env.docs_export && 'never' || 'same_content_newer'}}
- id: docs_var
run: echo "docs_export=${{ env.docs_export }}" >> $GITHUB_OUTPUT

prepare-docs:
# docs builds are needed for anything on main, any tagged versions, and any tag
# or branch starting with docs-preview
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/docs-preview') || startsWith(github.ref, 'refs/tags/') }}
needs: check_docs_rebuild
if: ${{ needs.check_docs_rebuild.outputs.should_skip != 'true' }}
runs-on: [self-hosted, linux, x64, fast]
steps:
- name: Checkout Yosys
Expand All @@ -32,7 +52,7 @@ jobs:
- name: Prepare docs
shell: bash
run:
make docs/prep TARGETS= EXTRA_TARGETS=
make docs/prep -j${{ env.procs }} TARGETS= EXTRA_TARGETS=

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand All @@ -44,7 +64,13 @@ jobs:
docs/source/_images
docs/source/code_examples

- name: Test build docs
shell: bash
run: |
make -C docs html -j${{ env.procs }} TARGETS= EXTRA_TARGETS=

- name: Trigger RTDs build
if: ${{ needs.check_docs_rebuild.outputs.docs_export == 'true' }}
uses: dfm/[email protected]
with:
webhook_url: ${{ secrets.RTDS_WEBHOOK_URL }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ jobs:
cd iverilog
echo "IVERILOG_GIT=$(git rev-parse HEAD)" >> $GITHUB_ENV

- name: Get vcd2fst
shell: bash
run: |
git clone https://github.com/mmicko/libwave.git
mkdir -p ${{ github.workspace }}/.local/
cd libwave
cmake . -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/.local
make -j$procs
make install

- name: Cache iverilog
id: cache-iverilog
uses: actions/cache@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-verific.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
echo "ENABLE_VERIFIC_LIBERTY := 1" >> Makefile.conf
echo "ENABLE_VERIFIC_YOSYSHQ_EXTENSIONS := 1" >> Makefile.conf
echo "ENABLE_CCACHE := 1" >> Makefile.conf
echo "ENABLE_FUNCTIONAL_TESTS := 1" >> Makefile.conf
make -j${{ env.procs }} ENABLE_LTO=1

- name: Install Yosys
Expand Down
136 changes: 136 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: Build Wheels for PyPI
on:
workflow_dispatch:

jobs:
build_wheels:
strategy:
fail-fast: false
matrix:
os: [
{
name: "Ubuntu 22.04",
family: "linux",
runner: "ubuntu-22.04",
archs: "x86_64",
},
## Aarch64 is disabled for now: GitHub is committing to EOY
## for free aarch64 runners for open-source projects and
## emulation times out:
## https://github.com/orgs/community/discussions/19197#discussioncomment-10550689
# {
# name: "Ubuntu 22.04",
# family: "linux",
# runner: "ubuntu-22.04",
# archs: "aarch64",
# },
{
name: "macOS 13",
family: "macos",
runner: "macos-13",
archs: "x86_64",
},
{
name: "macOS 14",
family: "macos",
runner: "macos-14",
archs: "arm64",
},
## Windows is disabled because of an issue with compiling FFI as
## under MinGW in the GitHub Actions environment (SHELL variable has
## whitespace.)
# {
# name: "Windows Server 2019",
# family: "windows",
# runner: "windows-2019",
# archs: "AMD64",
# },
]
name: Build Wheels | ${{ matrix.os.name }} | ${{ matrix.os.archs }}
runs-on: ${{ matrix.os.runner }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- if: ${{ matrix.os.family == 'linux' }}
name: "[Linux] Set up QEMU"
uses: docker/setup-qemu-action@v3
- uses: actions/setup-python@v5
- name: Get Boost Source
shell: bash
run: |
mkdir -p boost
curl -L https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-b2-nodocs.tar.gz | tar --strip-components=1 -xzC boost
- name: Get FFI
shell: bash
run: |
mkdir -p ffi
curl -L https://github.com/libffi/libffi/releases/download/v3.4.6/libffi-3.4.6.tar.gz | tar --strip-components=1 -xzC ffi
## Software installed by default in GitHub Action Runner VMs:
## https://github.com/actions/runner-images
- if: ${{ matrix.os.family == 'macos' }}
name: "[macOS] Flex/Bison"
run: |
brew install flex bison
echo "PATH=$(brew --prefix flex)/bin:$PATH" >> $GITHUB_ENV
echo "PATH=$(brew --prefix bison)/bin:$PATH" >> $GITHUB_ENV
- if: ${{ matrix.os.family == 'windows' }}
name: "[Windows] Flex/Bison"
run: |
choco install winflexbison3
- if: ${{ matrix.os.family == 'macos' && matrix.os.archs == 'arm64' }}
name: "[macOS/arm64] Install Python 3.8 (see: https://cibuildwheel.pypa.io/en/stable/faq/#macos-building-cpython-38-wheels-on-arm64)"
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Build wheels
uses: pypa/[email protected]
env:
# * APIs not supported by PyPy
# * Musllinux disabled because it increases build time from 48m to ~3h
CIBW_SKIP: >
pp*
*musllinux*
CIBW_ARCHS: ${{ matrix.os.archs }}
CIBW_BUILD_VERBOSITY: "1"
# manylinux2014 (default) does not have a modern enough C++ compiler for Yosys
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
CIBW_BEFORE_ALL: bash ./.github/workflows/wheels/cibw_before_all.sh
CIBW_ENVIRONMENT: >
CXXFLAGS=-I./boost/pfx/include
LINKFLAGS=-L./boost/pfx/lib
PKG_CONFIG_PATH=./ffi/pfx/lib/pkgconfig
makeFlags='BOOST_PYTHON_LIB=./boost/pfx/lib/libboost_python*.a'
CIBW_ENVIRONMENT_MACOS: >
CXXFLAGS=-I./boost/pfx/include
LINKFLAGS=-L./boost/pfx/lib
PKG_CONFIG_PATH=./ffi/pfx/lib/pkgconfig
MACOSX_DEPLOYMENT_TARGET=11
makeFlags='BOOST_PYTHON_LIB=./boost/pfx/lib/libboost_python*.a CONFIG=clang'
CIBW_BEFORE_BUILD: bash ./.github/workflows/wheels/cibw_before_build.sh
CIBW_TEST_COMMAND: python3 -c "from pyosys import libyosys as ys;d=ys.Design();ys.run_pass('help', d)"
- uses: actions/upload-artifact@v4
with:
name: python-wheels-${{ matrix.os.runner }}
path: ./wheelhouse/*.whl
upload_wheels:
name: Upload Wheels
runs-on: ubuntu-latest
needs: build_wheels
steps:
- uses: actions/download-artifact@v4
with:
path: "."
pattern: python-wheels-*
merge-multiple: true
- run: |
ls
mkdir -p ./dist
mv *.whl ./dist
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
repository-url: ${{ vars.PYPI_INDEX || 'https://upload.pypi.org/legacy/' }}
44 changes: 44 additions & 0 deletions .github/workflows/wheels/_run_cibw_linux.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env python3
# Copyright (C) 2024 Efabless Corporation
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
"""
This runs the cibuildwheel step from the wheels workflow locally.
"""

import os
import yaml
import platform
import subprocess

__dir__ = os.path.dirname(os.path.abspath(__file__))


workflow = yaml.safe_load(open(os.path.join(os.path.dirname(__dir__), "wheels.yml")))

env = os.environ.copy()

steps = workflow["jobs"]["build_wheels"]["steps"]
cibw_step = None
for step in steps:
if (step.get("uses") or "").startswith("pypa/cibuildwheel"):
cibw_step = step
break

for key, value in cibw_step["env"].items():
if key.endswith("WIN") or key.endswith("MAC"):
continue
env[key] = value

env["CIBW_ARCHS"] = os.getenv("CIBW_ARCHS") or platform.machine()
subprocess.check_call(["cibuildwheel"], env=env)
23 changes: 23 additions & 0 deletions .github/workflows/wheels/cibw_before_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
set -e
set -x

# Build-time dependencies
## Linux Docker Images
if command -v yum &> /dev/null; then
yum install -y flex bison
fi

if command -v apk &> /dev/null; then
apk add flex bison
fi

## macOS/Windows -- installed in GitHub Action itself, not container

# Build Static FFI (platform-dependent but not Python version dependent)
cd ffi
## Ultimate libyosys.so will be shared, so we need fPIC for the static libraries
CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --prefix=$PWD/pfx
## Without this, SHELL has a space in its path which breaks the makefile
make install -j$(getconf _NPROCESSORS_ONLN 2>/dev/null || sysctl -n hw.ncpu)
## Forces static library to be used in all situations
sed -i.bak 's@-L${toolexeclibdir} -lffi@${toolexeclibdir}/libffi.a@' ./pfx/lib/pkgconfig/libffi.pc
34 changes: 34 additions & 0 deletions .github/workflows/wheels/cibw_before_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
set -e
set -x

# Don't use objects from previous compiles on Windows/macOS
make clean

# DEBUG: show python3 and python3-config outputs
if [ "$(uname)" != "Linux" ]; then
# https://github.com/pypa/cibuildwheel/issues/2021
ln -s $(dirname $(readlink -f $(which python3)))/python3-config $(dirname $(which python3))/python3-config
fi
python3 --version
python3-config --includes

# Build boost
cd ./boost
## Delete the artefacts from previous builds (if any)
rm -rf ./pfx
## Bootstrap bjam
./bootstrap.sh --prefix=./pfx
## Build Boost against current version of Python, only for
## static linkage (Boost is statically linked because system boost packages
## wildly vary in versions, including the libboost_python3 version)
./b2\
-j$(getconf _NPROCESSORS_ONLN 2>/dev/null || sysctl -n hw.ncpu)\
--prefix=./pfx\
--with-filesystem\
--with-system\
--with-python\
cxxflags="$(python3-config --includes) -std=c++17 -fPIC"\
cflags="$(python3-config --includes) -fPIC"\
link=static\
variant=release\
install
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,10 @@ __pycache__
/tests/unit/bintest/
/tests/unit/objtest/
/tests/ystests
/result
/result
/dist
/*.egg-info
/build
/venv
/boost
/ffi
25 changes: 24 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,32 @@
List of major changes and improvements between releases
=======================================================

Yosys 0.45 .. Yosys 0.46-dev
Yosys 0.46 .. Yosys 0.47-dev
--------------------------

Yosys 0.45 .. Yosys 0.46
--------------------------
* Various
- Added new "functional backend" infrastructure with three example
backends (C++, SMTLIB and Rosette).
- Added new coarse-grain buffer cell type "$buf" to RTLIL.
- Added "-y" command line option to execute a Python script with
libyosys available as a built-in module.
- Added support for casting to type in Verilog frontend.

* New commands and options
- Added "clockgate" pass for automatic clock gating cell insertion.
- Added "bufnorm" experimental pass to convert design into
buffered-normalized form.
- Added experimental "aiger2" and "xaiger2" backends, and an
experimental "abc_new" command
- Added "-force-detailed-loop-check" option to "check" pass.
- Added "-unit_delay" option to "read_liberty" pass.

* Verific support
- Added left and right bound properties to wires when using
specific VHDL types.

Yosys 0.44 .. Yosys 0.45
--------------------------
* Various
Expand Down
Loading
Loading