3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-05-13 10:44:45 +00:00
Commit graph

379 commits

Author SHA1 Message Date
Akash Levy
57bf3a6f51
Merge branch 'YosysHQ:main' into main 2025-01-14 08:38:59 -08:00
Emil J. Tywoniak
4dbef95792 mark all hash_top methods nodiscard 2025-01-14 12:48:59 +01:00
Emil J. Tywoniak
a58481e9b7 mark all hash_into methods nodiscard 2025-01-14 12:39:15 +01:00
Akash Levy
4f41e01edc const modifier for pool of SigBit -> SigSpec conversion causing linkage errors on Mac 2024-12-20 11:56:10 -08:00
Akash Levy
1dcf75d175 Sync 2024-12-19 21:40:30 -08:00
Emil J. Tywoniak
026e9dae9d hashlib: fixes from jix 2024-12-18 15:09:25 +01:00
Emil J. Tywoniak
b9b9515bb0 hashlib: hash_eat -> hash_into 2024-12-18 15:09:25 +01:00
Emil J. Tywoniak
1df8a3e64b hashlib: legacy mkhash_add -> djb2_add 2024-12-18 15:09:25 +01:00
Emil J. Tywoniak
4e29ec1854 hashlib: acc -> eat 2024-12-18 15:09:25 +01:00
Emil J. Tywoniak
02a578365a hashlib: remove is_new from HasherDJB32, implement hash_top for IdString 2024-12-18 14:58:31 +01:00
Emil J. Tywoniak
52b0fc03b7 hash: solo hashing interface, override for SigBit 2024-12-18 14:58:31 +01:00
Emil J. Tywoniak
b7991ed1f5 hashlib: prevent naive hashing of IdString when hashing SigBit 2024-12-18 14:58:31 +01:00
Emil J. Tywoniak
4d14399749 hashlib: allow forcing Hasher state, use it for IdString trivial hashing 2024-12-18 14:58:31 +01:00
Emil J. Tywoniak
d071489ab1 hashlib: redo interface for flexibility 2024-12-18 14:49:25 +01:00
Akash Levy
dda4d9afce Use basename for filename in id 2024-12-13 13:32:34 -08:00
Akash Levy
4356eae4c9 Yosys sync 2024-12-04 14:16:55 -08:00
Akash Levy
6e88c689f2
Merge branch 'YosysHQ:main' into main 2024-12-01 12:32:07 -05:00
Krystine Sherwin
1de5d98ae2
Reduce comparisons of size_t and int
`Const::size()` returns int, so change iterators that use it to `auto` instead of `size_t`.
For cases where size is being explicitly cast to `int`, use the wrapper that we already have instead: `Yosys::GetSize()`.
2024-11-29 12:53:29 +13:00
KrystalDelusion
f428163252
Move get_blackbox_attribute method to Module instead of AttrObject 2024-11-28 11:19:16 +13:00
Alain Dargelas
43186b2c7a Returning unsigned int 2024-11-06 16:39:58 -08:00
Alain Dargelas
39c2d7aa60 RTLIL Module dump and hash 2024-11-06 15:48:24 -08:00
Akash Levy
7864c6dd34 vector fix for pyosys 2024-10-24 23:12:54 -07:00
Akash Levy
0ddf964554
Merge branch 'YosysHQ:main' into main 2024-10-18 05:33:40 -07:00
Emil J. Tywoniak
49d8a35c2e rtlil: appease py_wrap 2024-10-18 11:31:20 +02:00
Emil J. Tywoniak
e9e67f381c rtlil: remove trailing comma as pyosys workaround 2024-10-16 23:15:06 +02:00
Akash Levy
1be0a50185 Fix comma that pyosys hates 2024-10-15 03:20:54 -07:00
Akash Levy
469f5a707a
Merge branch 'YosysHQ:main' into main 2024-10-14 11:21:54 -07:00
Emil J. Tywoniak
785bd44da7 rtlil: represent Const strings as std::string 2024-10-14 06:28:12 +02:00
Akash Levy
8e6ac65dd8
Merge branch 'YosysHQ:main' into main 2024-10-13 10:59:19 -07:00
Philippe Sauter
c53c87e1f4 rtlil: add Const:: as_int_compressed function 2024-10-09 19:48:57 +02:00
Philippe Sauter
4cd2e04da4 rtlil: add Const::compress helper function
Compresses the current bits to the minimum
width representation by removing leading bits.
2024-10-09 19:48:57 +02:00
Akash Levy
03f740e2a4 Undo annoying commit bdc43c6592 2024-09-18 22:05:23 -07:00
Akash Levy
db0317afc5 Add support for int stuff 2024-09-18 16:46:53 -07:00
Martin Povišer
865df26fac Adjust buf-normalized mode 2024-09-17 10:46:20 +02:00
Claire Xenia Wolf
80119386c0 Add RTLIL "buffered-normalized mode" and improve "bufnorm" pass
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2024-09-17 10:46:20 +02:00
Claire Xenia Wolf
4d469f461b Add coarse-grain $buf buffer cell type
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2024-09-17 10:46:20 +02:00
N. Engelhardt
c8b42b7d48
Merge pull request #4538 from RCoeurjoly/verific_bounds 2024-09-12 13:04:04 +02:00
Roland Coeurjoly
bdc43c6592 Add left and right bound properties to wire. Add test. Fix printing
for signed attributes

Co-authored-by: N. Engelhardt <nak@yosyshq.com>
Co-authored-by: Roland Coeurjoly <rolandcoeurjoly@gmail.com>
2024-09-10 12:52:42 +02: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
d8687e87b1 kernel: Avoid including files outside include guards
This adjusts the way the headers kernel/{yosys,rtlil,register,log}.h
include each other to avoid the need of including headers outside of
include guards as well as avoiding the inclusion of rtlil.h in the
middle of yosys.h with rtlil.h depending on the prefix of yosys.h, and
the suffix of yosys.h depending on rtlil.h.

To do this I moved some of the declaration in yosys.h into a new header
yosys_common.h. I'm not sure if that is strictly necessary.

Including any of these files still results in the declarations of all
these headers being included, so this shouldn't be a breaking change for
any passes or external plugins.

My main motivation for this is that ccls's (clang based language server)
include guard handling gets confused by the previous way the includes
were done. It often ends up treating the include guard as a generic
disabled preprocessor conditional, breaking navigation and highlighting
for the core RTLIL data structures.

Additionally I think avoiding cyclic includes in the middle of header
files that depend on includes being outside of include guards will also
be less confusing for developers reading the code, not only for tools
like ccls.
2024-04-02 16:53:56 +02:00
Martin Povišer
f5013d035e rtlil: Fix Const hashing omission 2024-02-19 15:45:54 +01:00
Martin Povišer
d6600fb1d5 rtlil: Fix handling of connections on wire deletion 2024-01-29 11:25:54 +01:00
Martin Povišer
80b8cd19c4 rtlil: Fix value type for iterator over SigSpec
When we are iterating over a `SigSpec`, the visited values will be of
type `SigBit` (as is the return type of `operator*()`). Account for that
in the publicly declared types.
2023-12-09 19:01:39 +01:00
Martin Povišer
189064b8da rtlil, hashlib: Remove deprecated std::iterator usage
`std::iterator` has been deprecated in C++17. Yosys is being compiled
against the C++11 standard but plugins can opt to compile against a
newer one. To silence some deprecation warnings when those plugins are
being compiled, replace the `std::iterator` inheritance with the
equivalent type declarations.
2023-12-09 19:01:39 +01:00
Martin Povišer
84568453f8 rtlil: Add lsb() msb() SigSpec helpers 2023-11-22 12:46:15 +01:00
N. Engelhardt
3e22791810
Merge pull request #3975 from rmlarsen/optmerge 2023-10-09 17:05:19 +02:00
Rasmus Munk Larsen
058973faee Undo formatting change. 2023-10-02 16:15:47 -07:00
Rasmus Munk Larsen
bce984fa60 Speed up OptMergePass by 1.7x.
The main speedup comes from swithing from using a SHA1 hash to std::hash<std::string>. There is no need to use an expensive cryptographic hash for fingerprinting in this context.
2023-10-02 15:57:18 -07:00
Martin Povišer
d641dfaec2 rtlil: Add helper to emit full-adder cells 2023-09-25 14:50:41 +02:00
Jannis Harder
62b4df4989 dft_tag: Implement $overwrite_tag and $original_tag
This does not correctly handle an `$overwrite_tag` on a module output,
but since we currently require the user to flatten the design for
cross-module dft, this cannot be observed from within the design, only
by manually inspecting the signals in the design.
2023-09-13 11:32:36 +02:00