mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-30 16:03:17 +00:00
parent
2d573a0ff6
commit
aee439360b
43 changed files with 258 additions and 27 deletions
|
@ -1055,7 +1055,7 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint)
|
|||
if (!range_valid)
|
||||
log_file_error(filename, location.first_line, "Signal `%s' with non-constant width!\n", str.c_str());
|
||||
|
||||
if (!(range_left >= range_right || (range_left == -1 && range_right == 0)))
|
||||
if (!(range_left + 1 >= range_right))
|
||||
log_file_error(filename, location.first_line, "Signal `%s' with invalid width range %d!\n", str.c_str(), range_left - range_right + 1);
|
||||
|
||||
RTLIL::Wire *wire = current_module->addWire(str, range_left - range_right + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue