aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-04-06 10:32:50 +0000
committerwhitequark <whitequark@whitequark.org>2020-04-06 10:33:02 +0000
commitd22888ce746b7e1afef9b797cf2aeef1542247cb (patch)
tree68f67f3bd7e9be44d439005d72f04e1a4471991a
parentca70a1049ff18c8702fdc2ac4b3901685551cb28 (diff)
downloadyosys-d22888ce746b7e1afef9b797cf2aeef1542247cb.tar.gz
yosys-d22888ce746b7e1afef9b797cf2aeef1542247cb.tar.bz2
yosys-d22888ce746b7e1afef9b797cf2aeef1542247cb.zip
read_ilang: improve error message for overly long wires.
Fixes #1838.
-rw-r--r--frontends/ilang/ilang_parser.y3
1 files changed, 3 insertions, 0 deletions
diff --git a/frontends/ilang/ilang_parser.y b/frontends/ilang/ilang_parser.y
index 4e0b62edd..91adc0cc9 100644
--- a/frontends/ilang/ilang_parser.y
+++ b/frontends/ilang/ilang_parser.y
@@ -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;
} |