| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Fixes #2729.
|
| |
|
| |
|
|
|
|
|
| |
Fixes #2710.
Fixes #2711.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was actually a ticking UB bomb: after running the parser, the type
maps contain pointers to children of the current AST, which is
recursively deleted after the pass has executed. This leaves the
pointers in user_type_stack dangling, which just happened to never be a
problem due to another bug that causes typedefs from higher-level type
maps to never be considered.
Rebuilding the type stack from the design's globals ensures the AstNode
pointers are valid.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Calling log_signal is problematic for several reasons:
- with recent changes, empty string is serialized as { }, which violates
the "no spaces in IdString" rule
- the type (plain / real / signed / string) is dropped, wrongly conflating
functionally different values and potentially introducing a subtle
elaboration bug
Instead, use a custom simple serialization scheme.
|
|
|
|
|
|
|
| |
This breaks the ability to use a global typename as a standard
identifier in a subsequent input file. This is otherwise backwards
compatible, including for sources which previously included conflicting
typedefs in each input file.
|
|
|
|
|
|
|
|
|
|
|
|
| |
From IEEE1364-2005, section 7.3 buf and not gates:
> These two logic gates shall have one input and one or more outputs.
> The last terminal in the terminal list shall connect to the input of the
> logic gate, and the other terminals shall connect to the outputs of
> the logic gate.
yosys does not follow this and instead interprets the first argument as
the output, the second as the input and ignores the rest.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, memories were silently discarded by the JSON backend, making
round-tripping modules with them crash.
Since there are already some users using JSON to implement custom
external passes that use memories (and infer width/size from memory
ports), let's fix this by just making JSON backend and frontend support
memories as first-class objects.
Processes are still not supported, and will now cause a hard error.
Fixes #1908.
|
|
|
|
|
|
| |
This defers the simplification of globals so that globals in one file
may depend on globals in other files. Adds a simplify() call downstream
because globals are appended at the end.
|
|
|
|
|
|
| |
It was previously possible to override global parameters on a
per-instance basis. This could be dangerous when using positional
parameter bindings, hiding oversupplied parameters.
|
|\
| |
| | |
Fix param without default log line
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
sv: support for parameters without default values
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Modules with a parameter without a default value will be automatically
deferred until the hierarchy pass
- Allows for parameters without defaults as module items, rather than
just int the `parameter_port_list`, despite being forbidden in the LRM
- Check for parameters without defaults that haven't been overriden
- Add location info to parameter/localparam declarations
|
|\ \
| | |
| | | |
verilog: impose limit on maximum expression width
|
| | |
| | |
| | |
| | |
| | | |
Designs with unreasonably wide expressions would previously get stuck
allocating memory forever.
|
|/ /
| |
| |
| |
| |
| | |
- Fix explicit size cast of unbased unsized literals
- Fix unbased unsized literal bound directly to port
- Output `is_unsized` flag in `dumpAst`
|
|/ |
|
|
|
|
|
|
| |
Declaring the ports as standard module items already worked as expected.
This adds a missing usage of `checkRange()` so that headers such as
`module m(output integer x);` now work correctly.
|
|
|
|
|
| |
- track depth so we know whether to consider higher-level elsifs
- error on unmatched endif/elsif/else
|
|\
| |
| | |
Add -nosynthesis flag for read_verilog command
|
| | |
|
| | |
|
|\ \
| | |
| | | |
genrtlil: improve name conflict error messaging
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Standard data declarations can now use any integer type
- Parameters and localparams can now use any integer type
- Function returns types can now use any integer type
- Fix `parameter logic`, `localparam reg`, etc. to be 1 bit (previously 32 bits)
- Added longint type (64 bits)
- Unified parser source for integer type widths
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fix digit-formatting calculation for small numbers.
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Henner Zeller <h.zeller@acm.org>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Calling log10() on zero causes a non-sensical value to be calculated. On some
compile options, I've observed yosys crashing with an illegal
instruction (SIGILL).
To make it safe, fix the calculation to do a range check; wrap it a
decimal_digits() function, and use it where the previous ceil(log10(n)) call
was used. As a side, it also improves readability.
Signed-off-by: Henner Zeller <h.zeller@acm.org>
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Basically:
- priority converts to (* full_case *)
- unique0 converts to (* parallel_case *)
- unique converts to (* parallel_case, full_case *)
Fixes #2596.
|
| | |
| | |
| | |
| | | |
turn-off (#2566)
|
| | | |
|
|\ \ \
| | | |
| | | | |
verilog: fix sizing of constant args for tasks/functions
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Simplify synthetic localparams for normal calls to update their width
- This step was inadvertently removed alongside `added_mod_children`
- Support redeclaration of constant function arguments
- `eval_const_function` never correctly handled this, but the issue
was not exposed in the existing tests until the recent change to
always attempt constant function evaluation when all-const args
are used
- Check asserts in const_arg_loop and const_func tests
- Add coverage for width mismatch error cases
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Karol Gugala <kgugala@antmicro.com>
|
|\ \ \ \
| | | | |
| | | | | |
verilog: support recursive functions using ternary expressions
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This adds a mechanism for marking certain portions of elaboration as
occurring within unevaluated ternary branches. To enable elaboration of
the overall ternary, this also adds width detection for these
unelaborated function calls.
|
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | | |
This would previously complain about an undefined internal macro if the
unapplied macro had not already been used. If it had, it would
incorrectly use the arguments from the previous invocation.
|
|\ \ \ \
| |/ / /
|/| | | |
Accept disable case for SVA liveness properties.
|