mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 22:23:23 +00:00
frontend: rtlil: imposed a hard limit for wire width of 2^24 (closes #1206)
This commit is contained in:
parent
a217450524
commit
9ffaae91ff
1 changed files with 5 additions and 1 deletions
|
@ -187,7 +187,11 @@ wire_stmt:
|
||||||
|
|
||||||
wire_options:
|
wire_options:
|
||||||
wire_options TOK_WIDTH TOK_INT {
|
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 {
|
wire_options TOK_WIDTH TOK_INVALID {
|
||||||
rtlil_frontend_yyerror("RTLIL error: invalid wire width");
|
rtlil_frontend_yyerror("RTLIL error: invalid wire width");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue