This PR should be the base for discussion, do not merge it yet!
authorUdi Finkelstein <github@udifink.com>
Fri, 9 Mar 2018 08:35:33 +0000 (10:35 +0200)
committerUdi Finkelstein <github@udifink.com>
Sun, 11 Mar 2018 21:09:34 +0000 (23:09 +0200)
commit2b9c75f8e372f6886e073743d1df11bcd1c58281
tree756704366060541ff047db59878e059971503ec6
parentefaef82f75d8e477baf958eac39f538e6eed5b03
This PR should be the base for discussion, do not merge it yet!

It correctly detects reg/wire mix and incorrect use on blocking,nonblocking assignments within blocks and assign statements.

What it DOES'T do:
Detect registers connected to output ports of instances.

Where it FAILS:
memorty nonblocking assignments causes spurious (I assume??) errors on yosys-generated "_ADDR", "_DATA", "EN" signals.

You can test it with tests/simple/reg_wire_error.v (look inside for the comments to enable/disable specific lines)
frontends/ast/ast.cc
frontends/ast/ast.h
frontends/ast/simplify.cc
frontends/verilog/verilog_lexer.l
frontends/verilog/verilog_parser.y
tests/simple/reg_wire_error.v [new file with mode: 0644]