3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-22 08:35:32 +00:00
Commit graph

384 commits

Author SHA1 Message Date
Emil J. Tywoniak
fbdfff168b placement new, fix empty probably 2024-06-17 10:53:08 +02:00
Emil J. Tywoniak
65d50db4ef 100% 2024-06-14 17:26:48 +02:00
Emil J. Tywoniak
eeb15ea2a2 73% 2024-06-13 22:50:21 +02:00
Emil J. Tywoniak
4c9f68216a tiny fix 2024-06-13 21:37:22 +02:00
Emil J. Tywoniak
866b7a7121 conns and params from dict, oldcell no longer attrobject 2024-06-13 21:34:42 +02:00
Emil J. Tywoniak
193a43e82c erase, clear, fork replace, idk 2024-06-13 20:31:11 +02:00
Emil J. Tywoniak
61cf4b6fb6 look at all those chickens 2024-06-13 14:27:11 +02:00
Emil J. Tywoniak
8bdcc6987b consty stuff 2024-06-13 12:55:52 +02:00
Emil J. Tywoniak
36289ab208 consty stuff 2024-06-13 12:35:31 +02:00
Emil J. Tywoniak
2d6c45469f clean, not backtracking 2024-06-12 19:37:45 +02:00
Emil J. Tywoniak
919e2103c9 references - breaking 2024-06-12 19:12:01 +02:00
Emil J. Tywoniak
33910bcf82 iterator hell 2024-06-12 13:12:55 +02:00
Emil J. Tywoniak
d7251df9a9 wip 2024-06-11 00:06:52 +02:00
Emil J. Tywoniak
930a9f64ee add functions to new cell 2024-06-10 18:51:38 +02:00
Emil J. Tywoniak
2213b5d66d add functions to new cell 2024-06-10 18:51:29 +02:00
Emil J. Tywoniak
277c10e127 oldcell 2024-06-10 11:06:37 +02:00
Emil J. Tywoniak
b85062fcec fix stuff, don't strip 2024-06-05 22:21:31 +02:00
Emil J. Tywoniak
60bf00ea79 tracy: frame pointer, track memory allocations 2024-05-31 12:35:31 +02:00
Martin Povišer
178eceb32d rtlil: Replace the packed SigSpec::extract impl 2024-04-22 16:23:51 +02:00
Jannis Harder
0d30a4d479 rtlil: Add packed extract implementation for SigSpec
Previously `extract` on a `SigSpec` would always unpack it. Since a
significant amount of `SigSpec`s have one or few chunks, it's worth
having a dedicated implementation.

This is especially true, since the RTLIL frontend calls into this for
every `wire [lhs:rhs]` slice, making this `extract` take up 40% when
profiling `read_rtlil` with one of the largest coarse grained RTLIL
designs I had on hand.

With this change the `read_rtlil` profile looks like I would expect it
to look like, but I noticed that a lot of the other core RTLIL methods
also are a bit too eager with unpacking or implementing
`SigChunk`/`Const` overloads that just convert to a single chunk
`SigSpec` and forward to the implementation for that, when a direct
implementation would avoid temporary std::vector allocations. While not
relevant for `read_rtlil`, to me it looks like there might be a few easy
overall performance gains to be had by addressing this more generally.
2024-04-22 13:26:17 +02:00
Jannis Harder
f728927307 Add builtin celltype $scopeinfo
Only declares the cell interface, doesn't make anything use or
understand $scopeinfo yet.
2024-02-06 17:51:24 +01:00
Catherine
c7bf0e3b8f Add new $check cell to represent assertions with a message. 2024-02-01 20:10:39 +01:00
N. Engelhardt
027cb31e9d
Merge pull request #4161 from YosysHQ/nak/add_sig_extract_asserts
SigSpec/SigChunk::extract(): assert offset/length are not out of range
2024-01-29 16:11:01 +01:00
Martin Povišer
c035289383 rtlil: Do not create dummy wires when deleting wires in connections 2024-01-29 11:25:54 +01:00
Martin Povišer
d6600fb1d5 rtlil: Fix handling of connections on wire deletion 2024-01-29 11:25:54 +01:00
N. Engelhardt
efe4d6dbdc SigSpec/SigChunk::extract(): assert offset/length are not out of range 2024-01-25 12:28:17 +01:00
Martin Povišer
b894abf8b1
Merge pull request #3959 from rmlarsen/decode_string
Speed up RTLIL::Const::decode_string by 1.7x.
2023-10-02 16:38:43 +02:00
Rasmus Munk Larsen
12218a4c74 Unflip i and j. 2023-09-28 19:39:09 -07:00
Rasmus Munk Larsen
01a015747e Speed up RTLIL::Const::decode_string by 1.7x. 2023-09-27 17:16:13 -07:00
Martin Povišer
d641dfaec2 rtlil: Add helper to emit full-adder cells 2023-09-25 14:50:41 +02:00
Ethan Mahintorabi
aa06809d64 rtlil: Speeds up Yosys by 17%
This PR speeds up by roughly 17% across a wide spectrum of designs
tested at Google. Particularly for the mux generation pass.

Co-authored-by: Rasmus Larsen <rmlarsen@google.com>
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
2023-09-21 10:46:11 +01: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
Miodrag Milanovic
27ac912709 Support import of $future_ff 2023-09-13 11:32:36 +02:00
Miodrag Milanovic
54050a8c16 Basic support for tag primitives 2023-09-13 11:32:36 +02:00
Charlotte
f9d38253c5 ast: add PRIORITY to $print cells 2023-08-11 04:46:52 +02:00
whitequark
d5c9953c09 ast: translate $display/$write tasks in always blocks to new $print cell. 2023-08-11 04:46:52 +02:00
dragonmux
b59c717245
kernel/rtlil: Fixed the destruction guard for IdString
The guard is optimised out on some compilers under certain conditions (eg: LTO on GCC) as constant under C++ lifetime rules.
This is because the guard type's member is invalid to access (UB) after the type has been destroyed, resulting in
`destruct_guard.ok` being unable to be `false` according to the optimiser, based on the lifetime rules.

This patch still invokes UB (all accesses to the destroyed IdString instance are), but at least the optimiser
can't reason that destruct_guard_ok cannot be false and therefore it's safe to optimise out from its guard role.
2023-07-26 20:46:56 +01:00
Jannis Harder
b08a880704 backends/rtlil: Do not shorten a value with z bits to 'x 2023-01-29 14:02:25 +01:00
Jannis Harder
7203ba7bc1 Add bitwise $bweqx and $bwmux cells
The new bitwise case equality (`$bweqx`) and bitwise mux (`$bwmux`)
cells enable compact encoding and decoding of 3-valued logic signals
using multiple 2-valued signals.
2022-11-30 18:24:35 +01:00
Jannis Harder
c0063288d6 Add the $anyinit cell and the formalff pass
These can be used to protect undefined flip-flop initialization values
from optimizations that are not sound for formal verification and can
help mapping all solver-provided values in witness traces for flows that
use different backends simultaneously.
2022-08-16 13:37:30 +02:00
Marcelina Kościelnicka
a681904237 Assorted microoptimization speedups in core data structures. 2022-07-27 17:05:30 +02:00
Marcelina Kościelnicka
6b7efe12b7 Add a check for packed memory MEMID uniqueness 2022-06-13 19:23:55 +02:00
Henner Zeller
9c41b43191 Use compiler-generated default constructor for RTLIL::Const::Const
No need for a manual implementation.
While at it: have the constructor that takes a string take a
const string reference instead to avoid a copy.
2022-06-09 16:07:45 +01:00
NotAFile
349c0ff0a7 Add some more reserve calls to RTLIL::Const
This results in a slight ~0.22% total speedup synthesizing vexriscv
2022-03-25 18:38:00 +00:00
Marcelina Kościelnicka
93508d58da Add $bmux and $demux cells. 2022-01-28 23:34:41 +01:00
Lofty
77327b2544 sta: very crude static timing analysis pass
Co-authored-by: Eddie Hung <eddie@fpgeh.com>
2021-11-25 17:20:27 +01:00
Zachary Snow
e833c6a418 verilog: use derived module info to elaborate cell connections
- Attempt to lookup a derived module if it potentially contains a port
  connection with elaboration ambiguities
- Mark the cell if module has not yet been derived
- This can be extended to implement automatic hierarchical port
  connections in a future change
2021-10-25 18:25:50 -07:00
Rupert Swarbrick
bd16d01c0e Split out logic for reprocessing an AstModule
This will enable other features to use same core logic for replacing an
existing AstModule with a newly elaborated version.
2021-10-25 18:25:50 -07:00
Marcelina Kościelnicka
ec2b5548fe Add $aldff and $aldffe: flip-flops with async load. 2021-10-02 18:12:52 +02:00
Claire Xenia Wolf
4708907be8 Add additional check to SigSpec
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2021-09-10 16:51:34 +02:00