3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-15 13:28:59 +00:00

frontend: rtlil: imposed a hard limit for wire width of 2^24 (closes #1206)

This commit is contained in:
Aki Van Ness 2022-08-24 11:28:51 -04:00
parent a217450524
commit 9ffaae91ff
No known key found for this signature in database
GPG key ID: C629E8EC06327BEE

View file

@ -187,7 +187,11 @@ wire_stmt:
wire_options:
wire_options TOK_WIDTH TOK_INT {
current_wire->width = $3;
if ($3 > 0x1000000) {
rtlil_frontend_yyerror("RTLIL error: invalid wire width, must be less than 2^24");
} else {
current_wire->width = $3;
}
} |
wire_options TOK_WIDTH TOK_INVALID {
rtlil_frontend_yyerror("RTLIL error: invalid wire width");