Skip to content

Commit

Permalink
Fixes error with vector indicies of the form [2:7] [-12:7]
Browse files Browse the repository at this point in the history
Make sure that we correctly adjust the value to align it to a zero
indexed list with lsb = 0

Signed-off-by: Ethan Mahintorabi <[email protected]>
  • Loading branch information
QuantamHD committed May 8, 2024
1 parent c039da2 commit 82a4a87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontends/verific/verific.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2164,7 +2164,7 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma
// that the indicies match LSB = 0 order to match the std::vector
// to SigSpec LSB = 0 precondition.
if (lsb_index > msb_index) {
port_offset = abs(port_offset - lsb_index);
port_offset = abs(port_offset - (lsb_index - min(msb_index, lsb_index)));
}
}
IdString port_name_id = RTLIL::escape_id(port_name);
Expand Down

0 comments on commit 82a4a87

Please sign in to comment.