Commit Graph

10538 Commits

Author SHA1 Message Date
whitequark 331de7a518
Merge pull request #2576 from zachjs/port-bind-sign-uniop
genrtlil: fix signed port connection codegen failures
2021-02-06 19:25:32 +00:00
Zachary Snow 4b2f977331 genrtlil: fix signed port connection codegen failures
This fixes binding signed memory reads, signed unary expressions, and
signed complex SigSpecs to ports. This also sets `is_signed` for wires
generated from signed params when -pwires is used. Though not necessary
for any of the current usages, `is_signed` is now appropriately set when
the `extendWidth` helper is used.
2021-02-05 19:51:30 -05:00
Yosys Bot 2f64f96129 Bump version 2021-02-06 00:10:05 +00:00
whitequark 3d9898272a
Merge pull request #2572 from antmicro/check-labels
verilog_parser: add label check to gen_block
2021-02-05 06:49:34 +00:00
Yosys Bot 7c6bf42db8 Bump version 2021-02-05 00:10:05 +00:00
Kamil Rakoczy 98c4feb72f Add check of begin/end labels for genblock
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2021-02-04 17:16:30 +01:00
whitequark baf1875307
Merge pull request #2529 from zachjs/unnamed-genblk
verilog: significant block scoping improvements
2021-02-04 09:57:28 +00:00
Yosys Bot afcc31ceba Bump version 2021-02-04 00:10:05 +00:00
whitequark 4bc6995b9a
Merge pull request #2436 from dalance/fix_generate
Fix begin/end in generate
2021-02-03 09:43:23 +00:00
Zachary Snow fe74b0cd95 verilog: significant block scoping improvements
This change set contains a number of bug fixes and improvements related to
scoping and resolution in generate and procedural blocks. While many of the
frontend changes are interdependent, it may be possible bring the techmap
changes in under a separate PR.

Declarations within unnamed generate blocks previously encountered issues
because the data declarations were left un-prefixed, breaking proper scoping.
The LRM outlines behavior for generating names for unnamed generate blocks. The
original goal was to add this implicit labelling, but doing so exposed a number
of issues downstream. Additional testing highlighted other closely related scope
resolution issues, which have been fixed. This change also adds support for
block item declarations within unnamed blocks in SystemVerilog mode.

1. Unlabled generate blocks are now implicitly named according to the LRM in
   `label_genblks`, which is invoked at the beginning of module elaboration
2. The Verilog parser no longer wraps explicitly named generate blocks in a
   synthetic unnamed generate block to avoid creating extra hierarchy levels
   where they should not exist
3. The techmap phase now allows special control identifiers to be used outside
   of the topmost scope, which is necessary because such wires and cells often
   appear in unlabeled generate blocks, which now prefix the declarations within
4. Some techlibs required modifications because they relied on the previous
   invalid scope resolution behavior
5. `expand_genblock` has been simplified, now only expanding the outermost
   scope, completely deferring the inspection and elaboration of nested scopes;
   names are now resolved by looking in the innermost scope and stepping outward
6. Loop variables now always become localparams during unrolling, allowing them
   to be resolved and shadowed like any other identifier
7. Identifiers in synthetic function call scopes are now prefixed and resolved
   in largely the same manner as other blocks
     before: `$func$\func_01$tests/simple/scopes.blk.v:60$5$\blk\x`
      after: `\func_01$func$tests/simple/scopes.v:60$5.blk.x`
8. Support identifiers referencing a local generate scope nested more
   than 1 level deep, i.e. `B.C.x` while within generate scope `A`, or using a
   prefix of a current or parent scope, i.e. `B.C.D.x` while in `A.B`, `A.B.C`,
   or `A.B.C.D`
9. Variables can now be declared within unnamed blocks in SystemVerilog mode

Addresses the following issues: 656, 2423, 2493
2021-01-31 09:42:09 -05:00
Yosys Bot beeaad1904 Bump version 2021-01-31 00:10:05 +00:00
Miodrag Milanovic d99c032c27 Require latest Verific build 2021-01-30 09:23:46 +01:00
Yosys Bot 1057273852 Bump version 2021-01-30 00:10:05 +00:00
Marcelina Kościelnicka a4c04d1b90 ast: fix dump_vlog display of casex/casez
The first child of AST_CASE is the case expression, it's subsequent
childrean that are AST_COND* and can be used to discriminate the type of
the case.
2021-01-29 16:28:15 +01:00
whitequark 708eb327a1
Merge pull request #2564 from whitequark/flatten-improve-error
flatten: clarify confusing error message
2021-01-29 02:55:51 +00:00
Yosys Bot ffa1cb836b Bump version 2021-01-29 00:10:05 +00:00
whitequark 74b0c38520
Merge pull request #2569 from zachjs/macro-arg-surrounding-spaces
verilog: strip leading and trailing spaces in macro args
2021-01-28 21:32:27 +00:00
Claire Xen d0d7a360ed
Merge pull request #2535 from Ravenslofty/scc-specify
scc: Add -specify option to find loops in boxes
2021-01-28 19:01:29 +01:00
Zachary Snow 27257a419f verilog: strip leading and trailing spaces in macro args 2021-01-28 11:26:35 -05:00
Yosys Bot 98afe2b758 Bump version 2021-01-27 00:10:04 +00:00
Marcelina Kościelnicka ea79e16bab xilinx_dffopt: Don't crash on missing IS_*_INVERTED.
The presence of IS_*_INVERTED on FD* cells follows Vivado, which
apparently has been decided by a dice roll.  Just assume false if the
parameter doesn't exist.

Fixes #2559.
2021-01-27 00:32:00 +01:00
Marcelina Kościelnicka cd6f0732f3 xilinx: Add FDRSE_1, FDCPE_1. 2021-01-27 00:32:00 +01:00
whitequark a77fa6709b
Merge pull request #2563 from whitequark/cxxrtl-msvc
cxxrtl: do not use `->template` for non-dependent names
2021-01-26 21:55:12 +00:00
whitequark d73ffa07f2
Merge pull request #2544 from modwizcode/fix-clock
CXXRTL: Fix sliced bits as clock inputs
2021-01-26 21:18:06 +00:00
whitequark 2364820f50 flatten: clarify confusing error message. 2021-01-26 18:29:53 +00:00
whitequark 4b6e764c46 cxxrtl: do not use `->template` for non-dependent names.
This breaks build on MSVC but not GCC/Clang.
2021-01-26 18:09:53 +00:00
Dan Ravensloft 74dad5afe7 scc: Add -specify option to find loops in boxes 2021-01-26 16:23:08 +00:00
Yosys Bot 8eaeaa8434 Bump version 2021-01-26 00:10:05 +00:00
whitequark f200a8fe1c
Merge pull request #2549 from pgadfort/support-multiple-libs
adding support for passing multiple liberty files to abc
2021-01-25 10:36:14 +00:00
whitequark ffbd813a8c
Merge pull request #2550 from zachjs/macro-arg-spaces
verilog: allow spaces in macro arguments
2021-01-25 10:36:07 +00:00
Yosys Bot 410ea42242 Bump version 2021-01-25 00:10:07 +00:00
Claire Xen 2257a9a721
Merge pull request #2558 from YosysHQ/dave/chandle-dpi
dpi: Support for chandle type
2021-01-24 02:45:08 +01:00
David Shah 09311b6581 dpi: Support for chandle type
Signed-off-by: David Shah <dave@ds0.me>
2021-01-23 22:24:31 +00:00
Yosys Bot 54294957ed Bump version 2021-01-22 00:10:05 +00:00
Miodrag Milanović 1f88a3de74
Merge pull request #2553 from zachjs/rand-const-modifiers
Allow combination of rand and const modifiers
2021-01-21 16:56:19 +01:00
Zachary Snow 1096b969ef Allow combination of rand and const modifiers 2021-01-21 08:42:05 -07:00
Yosys Bot 699a98b265 Bump version 2021-01-21 00:10:05 +00:00
Claire Xen b734f2c932
Merge pull request #2552 from YosysHQ/claire/yosyshq
Switch verific bindings from Symbiotic EDA flavored Verific to YosysHQ flavored Verific
2021-01-21 00:54:45 +01:00
Claire Xenia Wolf acad7a6e40 Switch verific bindings from Symbiotic EDA flavored Verific to YosysHQ flavored Verific
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
2021-01-20 20:48:10 +01:00
Miodrag Milanović bfa353f154
Merge pull request #2536 from TobiasFaller/master
Fixed missing goto statement in passes/techmap/abc.cc
2021-01-20 20:42:02 +01:00
Miodrag Milanović 00f02e0589
Merge pull request #2551 from zachjs/wire-logic
sv: fix support wire and var data type modifiers
2021-01-20 18:31:49 +01:00
Zachary Snow 006c18fc11 sv: fix support wire and var data type modifiers 2021-01-20 09:16:21 -07:00
Zachary Snow 4fadcc8f25 verilog: allow spaces in macro arguments 2021-01-20 08:49:58 -07:00
Yosys Bot 4762cc06c6 Bump version 2021-01-19 00:10:05 +00:00
Peter Gadfort 169234d6e9 adding support for passing multiple liberty files to abc 2021-01-18 16:47:49 -05:00
whitequark e991ceeef3
Merge pull request #2547 from zachjs/plugin-so-dsym
Add plugin.so.dSYM to .gitignore
2021-01-18 20:21:20 +00:00
whitequark 056c12eb6f
Merge pull request #2312 from antmicro/typedef-inout
Add support for user types in IOs
2021-01-18 20:20:52 +00:00
Zachary Snow 4c108b4419 Add plugin.so.dSYM to .gitignore
This artifact is automatically generated by the builtin clang on macOS
when -g is used.
2021-01-18 11:13:21 -07:00
Kamil Rakoczy d69ddf19da Add typedef input/output test
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2021-01-18 17:31:22 +01:00
Kamil Rakoczy 61501e3266 Fix input/output attributes when resolving typedef of wire
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2021-01-18 17:31:22 +01:00