Commit Graph

13777 Commits

Author SHA1 Message Date
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
Jannis Harder f24e2536c6 kernel/rtlil: Add `SigBit operator[](int offset)` to `SigChunk`
This is already supported by `SigSpec` and since both `SigChunk` and
`SigSpec` implement `extract` which is the multi-bit variant of this,
there is no good reason for `SigChunk` to not support
`SigBit operator[](int offset)`.
2024-08-21 10:58:39 +01:00
Jannis Harder c73c8a39cf kernel/log: Add log_str helper for custom log_* functions/overloads
When implementing custom log_... functions or custom overloads for the
core log functions like log_signal it is necessary to return `char *`
that are valid long enough.

The log_... functions implemented in log.cc use either `log_id_cache` or
`string_buf` which both are cleared on log_pop.

This commit adds a public `log_str` function which stores its argument
in the `log_id_cache` and returns the stored copy, such that custom
log functions outside of log.cc can also create strings that remain
valid until the next `log_pop`.
2024-08-21 10:58:39 +01:00
Jannis Harder 0922142567 Add generic topological sort and SCC detection
This adds a generic non-recursive implementation of Tarjan's linear time
SCC algorithm that produces components in topological order. It can be
instantiated to work directly on any graph representation for which the
enumerate_nodes and enumerate_successors interface can be implemented.
2024-08-21 10:58:39 +01:00
github-actions[bot] 4cddc19994 Bump version 2024-08-20 00:18:24 +00:00
Miodrag Milanović e4c8bb0ac5
Merge pull request #4552 from YosysHQ/krys/rtd_on_main
docs: Only trigger RTDs on main
2024-08-19 20:11:55 +02:00
Krystine Sherwin 7d779c64a3
docs: Only trigger RTDs on main 2024-08-20 04:26:58 +12:00
Emil J d901b28d2c
Merge pull request #4546 from NachtSpyder04/main
[Docs]:Add new cell type help messages
2024-08-19 15:50:41 +02:00
Emil J 9de534892e
Merge pull request #4515 from RCoeurjoly/nix_on_macos
Run nix build also on macos. Build with more logs
2024-08-19 15:49:23 +02:00
Emil J e0d3bbf3c3
Merge pull request #4452 from phsauter/shiftadd-underflow-fix
peepopt: avoid shift-amount underflow
2024-08-19 15:45:46 +02:00
Emil J 0dfa4962d1
Merge pull request #4547 from leviathanch/fix_apicula1
Add DQS and related primitives to Gowin tech files
2024-08-19 15:44:48 +02:00
Krystine Sherwin 6df0c3d9ec
docs: Fix synth_flow generation 2024-08-19 21:25:51 +12:00
Krystine Sherwin 8773cf7721
test-verific: Use fast runner 2024-08-19 21:24:48 +12:00
N. Engelhardt 7f08a298a4
Merge pull request #4542 from YosysHQ/krys/rtd
Local readthedocs
2024-08-19 10:04:38 +02:00
David Lanzendörfer d1b767ea8b Adding missing to Gowin tech files
Without OSER4_MEM, IDES4_MEM and DQS the synthesis of my Rocket Chip
design for my Sipeed Tang FPGA fails.
2024-08-18 19:38:31 +01:00
NachtSpyder04 aa60255e0e update help messages that went beyond line length limit 2024-08-18 20:27:35 +05:30
Saish Karole 34aabd56cc
Apply suggestions from code review
Co-authored-by: Martin Povišer <povik@cutebit.org>
2024-08-18 20:12:53 +05:30
Saish Karole d80d4dc51c
[Docs]:Add new cell type help messages (#1)
* add shift operators description

* update shift operations' descriptions, add desciptions for add, sub, logic_*, tribuf, mux, demux, concat, pow and comparison operators
2024-08-17 15:47:00 +05:30
github-actions[bot] 5fb3c0b1d9 Bump version 2024-08-17 00:17:44 +00:00
KrystalDelusion 3dd32d741a Stop unconditionally building abc
_What are the reasons/motivation for this change?_
abc builds unconditional because `check-git-abc` is a phony prerequisite and therefore always runs, and since it always runs it will always trigger abc to rebuild.

_Explain how this is achieved._
Convert `check-git-abc` to an order-only prerequisite.  It still runs as before, but no longer triggers yosys-abc to rebuild when it does.

_If applicable, please suggest to reviewers how they can test the change._
2024-08-17 11:04:17 +12:00
Krystine Sherwin 7bd3c7b968
Fix test-verific.yml 2024-08-16 10:43:51 +12:00
Krystine Sherwin 3b63ab07ae
docs: Build RTD artifacts directly
Use rtds-action instead of yosys-cmd-ref repo.
Add rtds_action to docs configuration.
Add `.readthedocs.yaml`.
Update `DOCS_USAGE_` make target to be able to use pre-generated executables without forcing a remake.
2024-08-16 10:43:51 +12:00
Miodrag Milanović ceba889641
Merge pull request #4540 from YosysHQ/clang-11
Replace test-compile (ubuntu-22.04, clang-11)
2024-08-15 17:39:42 +02:00
github-actions[bot] 1eaf4e0790 Bump version 2024-08-15 00:17:57 +00:00
Krystine Sherwin d709177770
test-compile: Downgrade to focal 2024-08-15 09:44:20 +12:00
Martin Povišer a854903ff0
Merge pull request #4537 from povik/libparse-cleanup
Liberty parsing cleanup
2024-08-14 18:24:51 +02:00
Martin Povišer ab5d6b06b4 read_liberty: Fix omitted helper change 2024-08-13 20:12:38 +02:00
Martin Povišer 309d80885b read_liberty: Use available gate creation helpers 2024-08-13 18:47:36 +02:00
Martin Povišer 3057c13a66 Improve libparse encapsulation 2024-08-13 18:47:36 +02:00
Martin Povišer c35f5e379c Extend liberty tests 2024-08-13 18:47:36 +02:00
Martin Povišer 78382eaa6f libparse: Adjust whitespace 2024-08-13 18:47:36 +02:00
github-actions[bot] 4b9f452735 Bump version 2024-08-13 00:19:11 +00:00
Martin Povišer 8ce6219a34
Merge pull request #4528 from povik/bump-abc
Bump ABC
2024-08-12 15:53:16 +02:00
Martin Povišer bcb995b506 Sync with yosys-experimental branch 2024-08-08 17:33:54 +02:00
github-actions[bot] 77b2ae2e39 Bump version 2024-08-08 00:18:08 +00:00
Martin Povišer 4b5beb635f Pull ABC fix 2024-08-07 17:31:34 +02:00
Martin Povišer ebffe37e4c Bump ABC 2024-08-07 15:54:03 +02:00
Martin Povišer b1569de537
Merge pull request #4527 from povik/exec-newline
exec: Add missing newline
2024-08-07 13:04:48 +02:00