read_ilang: improve error message for overly long wires.
authorwhitequark <whitequark@whitequark.org>
Mon, 6 Apr 2020 10:32:50 +0000 (10:32 +0000)
committerwhitequark <whitequark@whitequark.org>
Mon, 6 Apr 2020 10:33:02 +0000 (10:33 +0000)
Fixes #1838.

frontends/ilang/ilang_parser.y

index 4e0b62edd9426b2057e595d34e2e716a7c76a46c..91adc0cc9e13df46d0b035d6cfade99a53371d2a 100644 (file)
@@ -179,6 +179,9 @@ wire_options:
        wire_options TOK_WIDTH TOK_INT {
                current_wire->width = $3;
        } |
+       wire_options TOK_WIDTH TOK_INVALID {
+               rtlil_frontend_ilang_yyerror("ilang error: invalid wire width");
+       } |
        wire_options TOK_UPTO {
                current_wire->upto = true;
        } |