| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This guards against access to bits outside of struct/union
members via dynamic indexing.
|
|
|
|
| |
Currently, only constant indices are checked.
|
|
|
|
| |
For now, $bits, $left, $right, $low, $high, and $size are supported.
|
|\
| |
| | |
Handle range offsets in packed arrays within packed structs
|
| |
| |
| |
| |
| |
| |
| | |
This brings the metadata for packed arrays in packed structs
in line with the metadata for unpacked arrays, and correctly
handles the case when both lsb and msb in an address range are
non-zero.
|
|/
|
|
| |
* Resolve package types in interfaces
* Added test for resolving of package types in interfaces
|
| |
|
| |
|
|\
| |
| | |
simplify: Do not recursively simplify AST_CELL within AST_CELLARRAY
|
| |
| |
| |
| |
| |
| | |
Otherwise the AST_CELL simplification uses the wrong celltype before the
AST_CELLARRAY simplification has a chance to unroll it and change it to
the $array celltype.
|
| | |
|
|/ |
|
|\
| |
| | |
Support for arrays with swapped ranges within structs
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
This also corrects the implementation of C type arrays within structs.
Fixes #3550
|
|/
|
|
|
|
|
|
| |
This is primarily intended to enable the standard-permitted use of
module-scoped identifiers to refer to tasks and non-constant functions.
As a side-effect, this also adds support for the non-standard use of
module-scoped identifiers referring to constant functions, a feature
that is supported in some other tools, including Iverilog.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
genrtlil.cc and simplify.cc had inconsistent and slightly broken
handling of signedness for array querying functions. These functions are
defined to return a signed result. Simplify always produced an unsigned
and genrtlil always a signed 32-bit result ignoring the context.
Includes tests for the the relvant edge cases for context dependent
conversions.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* Add support for accessing whole struct
* Update tests
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
|
| |
|
| |
|
| |
|
|
|
|
|
| |
If a local variable is always assigned before it is used, then adding
nosync prevents latches from being needlessly generated.
|
| |
|
| |
|
|
|
|
|
| |
I also removed the unnecessary shadowing of `width_hint` and `sign_hint`
in the corresponding case in `simplify()`.
|
|
|
| |
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
|
|
|
|
| |
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.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.
|
|
|
|
|
|
|
|
| |
- Root AST_PREFIX nodes are now subject to genblk expansion to allow
them to refer to a locally-visible generate block
- Part selects on AST_PREFIX member leafs can now refer to generate
block items (previously would not resolve and raise an error)
- Add source location information to AST_PREFIX nodes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Fixes #2447.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This doesn't do anything useful yet: the patch just adds support for
the syntax to the lexer and parser and adds some tests to check the
syntax parses properly. This generates AST nodes, but doesn't yet
generate RTLIL.
Since our existing hierarchical_identifier parser doesn't allow bit
selects (so you can't do something like foo[1].bar[2].baz), I've also
not added support for a trailing bit select (the "constant_bit_select"
non-terminal in "bind_target_instance" in the spec). If we turn out to
need this in future, we'll want to augment hierarchical_identifier and
its other users too.
Note that you can't easily use the BNF from the spec:
bind_directive ::=
"bind" bind_target_scope [ : bind_target_instance_list]
bind_instantiation ;
| "bind" bind_target_instance bind_instantiation ;
even if you fix the lookahead problem, because code like this matches
both branches in the BNF:
bind a b b_i (.*);
The problem is that 'a' could either be a module name or a degenerate
hierarchical reference. This seems to be a genuine syntactic
ambiguity, which the spec resolves (p739) by saying that we have to
wait until resolution time (the hierarchy pass) and take whatever is
defined, treating 'a' as an instance name if it names both an instance
and a module.
To keep the parser simple, it currently accepts this invalid syntax:
bind a.b : c d e (.*);
This is invalid because we're in the first branch of the BNF above, so
the "a.b" term should match bind_target_scope: a module or interface
identifier, not an arbitrary hierarchical identifier.
This will fail in the hierarchy pass (when it's implemented in a
future patch).
|
|
|
|
|
| |
- preserve signedness of struct members
- fix initial width detection of struct members (e.g., in case expressions)
|
|
|
|
|
|
| |
- add a backlink to module from Process
- make constructor and destructor protected, expose Module functions
to add and remove processes
|
| |
|
| |
|
| |
|
|
|
|
|
| |
type2str returns a string that doesn't start with $ or \, so it can't be
assigned to an IdString.
|
|\
| |
| | |
Fixing old e-mail addresses and deadnames
|
| |
| |
| |
| |
| |
| |
| |
| | |
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;
|
| |
| |
| |
| |
| |
| |
| |
| | |
The recent fix for case expression width detection causes the width of
the expressions to be queried before they are simplified. Because the
logic supporting module scope identifiers only existed in simplify,
looking them up would fail during width detection. This moves the logic
to a common helper used in both simplify() and detectSignWidthWorker().
|