| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This results in a slight ~0.22% total speedup synthesizing vexriscv
|
| |
|
|
|
|
| |
Co-authored-by: Eddie Hung <eddie@fpgeh.com>
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
| |
This will enable other features to use same core logic for replacing an
existing AstModule with a newly elaborated version.
|
| |
|
|
|
|
| |
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code now takes the AST nodes of type AST_BIND and generates a
representation in the RTLIL for them.
This is a little tricky, because a binding of the form:
bind baz foo_t foo_i (.arg (1 + bar));
means "make an instance of foo_t called foo_i, instantiate it inside
baz and connect the port arg to the result of the expression 1+bar".
Of course, 1+bar needs a cell for the addition. Where should that cell
live?
With this patch, the Binding structure that represents the construct
is itself an AST::AstModule module. This lets us put the adder cell
inside it. We'll pull the contents out and plonk them into 'baz' when
we actually do the binding operation as part of the hierarchy pass.
Of course, we don't want RTLIL::Binding to contain an
AST::AstModule (since kernel code shouldn't depend on a frontend), so
we define RTLIL::Binding as an abstract base class and put the
AST-specific code into an AST::Binding subclass. This is analogous to
the AST::AstModule class.
|
| |
|
| |
|
|
|
|
|
|
| |
- add a backlink to module from Process
- make constructor and destructor protected, expose Module functions
to add and remove processes
|
|
|
|
|
| |
No change in behaviour, but use range-based for loops instead of
iterators.
|
|
|
|
|
| |
The previous code, in addition to being needlessly limitted to 32 bits
in the first place, also had UB for the 31th bit (doing 1 << 31).
|
|
|
|
|
|
|
|
| |
s/((Claire|Xen|Xenia|Clifford)\s+)+(Wolf|Xen)\s+<(claire|clifford)@(symbioticeda.com|clifford.at|yosyshq.com)>/Claire Xenia Wolf <claire@yosyshq.com>/gi;
s/((Nina|Nak|N\.)\s+)+Engelhardt\s+<nak@(symbioticeda.com|yosyshq.com)>/N. Engelhardt <nak@yosyshq.com>/gi;
s/((David)\s+)+Shah\s+<(dave|david)@(symbioticeda.com|yosyshq.com|ds0.me)>/David Shah <dave@ds0.me>/gi;
s/((Miodrag)\s+)+Milanovic\s+<(miodrag|micko)@(symbioticeda.com|yosyshq.com)>/Miodrag Milanovic <micko@yosyshq.com>/gi;
s,https?://www.clifford.at/yosys/,http://yosyshq.net/yosys/,g;
|
|
|
|
|
|
| |
There will soon be more (versioned) memory cells, so handle passes that
only care if a cell is memory-related by a simple helper call instead of
a hardcoded list.
|
| |
|
|
|
|
| |
Signed-off-by: gatecat <gatecat@ds0.me>
|
|
|
|
|
|
|
|
|
| |
Among other problems, this also fixes equality comparisons between
SigSpec by enforcing a canonical form.
Also fix another minor issue with possible non-canonical SigSpec.
Fixes #2623.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The only difference between "RTLIL" and "ILANG" is that the latter is
the text representation of the former, as opposed to the in-memory
graph representation. This distinction serves no purpose but confuses
people: it is not obvious that the ILANG backend writes RTLIL graphs.
Passes `write_ilang` and `read_ilang` are provided as aliases to
`write_rtlil` and `read_rtlil` for compatibility.
|
|
|
|
|
| |
It has no effect on the output ($shiftx doesn't perform any sign
extension whatsoever), so an attempt to use it should be caught early.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new types include:
- FFs with async reset and enable (`$adffe`, `$_DFFE_[NP][NP][01][NP]_`)
- FFs with sync reset (`$sdff`, `$_SDFF_[NP][NP][01]_`)
- FFs with sync reset and enable, reset priority (`$sdffs`, `$_SDFFE_[NP][NP][01][NP]_`)
- FFs with sync reset and enable, enable priority (`$sdffce`, `$_SDFFCE_[NP][NP][01][NP]_`)
- FFs with async reset, set, and enable (`$dffsre`, `$_DFFSRE_[NP][NP][NP][NP]_`)
- latches with reset or set (`$adlatch`, `$_DLATCH_[NP][NP][01]_`)
The new FF types are not actually used anywhere yet (this is left
for future commits).
|
| |
|
| |
|
|
|
|
|
| |
The only difference in behavior is that this removes the attribute
when the pool becomes empty.
|
|\
| |
| | |
Split `flatten` from `techmap` and simplify it
|
| | |
|
|\ \
| |/
|/| |
Preserve 'signed'-ness of a verilog wire through RTLIL
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As per suggestion made in https://github.com/YosysHQ/yosys/pull/1987, now:
RTLIL::wire holds an is_signed field.
This is exported in JSON backend
This is exported via dump_rtlil command
This is read in via ilang_parser
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The $div and $mod cells use truncating division semantics (rounding
towards 0), as defined by e.g. Verilog. Another rounding mode, flooring
(rounding towards negative infinity), can be used in e.g. VHDL. The
new $divfloor cell provides this flooring division.
This commit also fixes the handling of $div in opt_expr, which was
previously optimized as if it was $divfloor.
|
|/
|
|
|
|
|
|
|
|
|
| |
The $div and $mod cells use truncating division semantics (rounding
towards 0), as defined by e.g. Verilog. Another rounding mode, flooring
(rounding towards negative infinity), can be used in e.g. VHDL. The
new $modfloor cell provides this flooring modulo (also known as "remainder"
in several languages, but this name is ambiguous).
This commit also fixes the handling of $mod in opt_expr, which was
previously optimized as if it was $modfloor.
|
|
|
|
| |
As it did before #1945
|
|
|
|
| |
Fixes #1822.
|
|
|
|
| |
Fixes #1819, #1820.
|
| |
|
|
|
|
| |
And make {get,set}_src_attribute use those functions.
|
|\
| |
| | |
kernel: Design::remove(RTLIL::Module *) to check refcount_modules_
|
| | |
|
|/ |
|
|\
| |
| | |
kernel: include "kernel/constids.inc"
|
| | |
|
|/
|
|
|
|
|
|
|
| |
A few passes included the same list of FF cell types. Make it a global
const instead.
The zinit pass also seems to include a list like that, but given that
it seems to be completely broken at the time (see #1568 discussion),
I'm going to pretend I didn't see that.
|