Merge pull request #156 from Silimate/splitcells

[ENG-1923] - Splitcells pass overlap bug
This commit is contained in:
Akash Levy 2026-04-21 03:31:59 -07:00 committed by GitHub
commit e7b60200d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -177,6 +177,7 @@ struct SplitcellsWorker
slices.push_back(GetSize(outsig));
log_debug("Splitting %s cell %s/%s into %d slices:\n", log_id(cell->type), log_id(module), log_id(cell), GetSize(slices)-1);
int wire_offset = user_index(0);
for (int i = 1; i < GetSize(slices); i++)
{
int slice_msb = slices[i]-1;
@ -184,7 +185,6 @@ struct SplitcellsWorker
int name_lsb = user_index(slice_lsb);
int name_msb = user_index(slice_msb);
if (name_lsb > name_msb) std::swap(name_lsb, name_msb);
std::string base_name = cell->name.str();
IdString slice_name;
if (blast) {
@ -210,9 +210,9 @@ struct SplitcellsWorker
if (bracket_pos != std::string::npos) {
wire_indices = wire_name.substr(bracket_pos) + stringf(
"%c%d%c", format[0], bit_offset, format[1]);
} else { // no brackets, so no concatenation
} else { // no brackets, so no concatenation using wire, use slice_lsb + name_lsb offset instead
wire_indices = stringf(
"%c%d%c", format[0], bit_offset, format[1]);
"%c%d%c", format[0], slice_lsb + wire_offset, format[1]);
}
} else {
// Fallback