Skip to content

Commit

Permalink
Add consistency check
Browse files Browse the repository at this point in the history
  • Loading branch information
povik committed Oct 22, 2024
1 parent 267b7e8 commit 03d0448
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/naming.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ std::vector<NamedChunk> generate_subfield_names(RTLIL::SigChunk chunk, const ast

std::vector<NamedChunk> ret;
subfield_names(chunk, 0, type, RTLIL::unescape_id(chunk.wire->name.str()), ret);

int sum = 0;
for (auto pair : ret)
sum += ret.first.width;
log_assert(sum == chunk.width);

return ret;
}

Expand Down

0 comments on commit 03d0448

Please sign in to comment.