Skip to content

Commit 3cd01a5

Browse files
committed
wrapcell: Add comments, const qualifier
1 parent 9161377 commit 3cd01a5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

passes/cmds/wrapcell.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct ContextData {
4848
};
4949

5050
std::optional<std::string> format(std::string fmt, const dict<IdString, Const> &parameters,
51-
ContextData &context)
51+
const ContextData &context)
5252
{
5353
std::stringstream result;
5454

@@ -108,6 +108,7 @@ struct Chunk {
108108
}
109109
};
110110

111+
// Joins contiguous runs of bits into a 'Chunk'
111112
std::vector<Chunk> collect_chunks(std::vector<std::pair<IdString, int>> bits)
112113
{
113114
std::vector<Chunk> ret;
@@ -242,6 +243,7 @@ struct WrapcellPass : Pass {
242243
subcell = subm->addCell("$1", cell->type);
243244
for (auto conn : cell->connections()) {
244245
if (ct.cell_output(cell->type, conn.first)) {
246+
// Insert marker bits as placehodlers which need to be replaced
245247
subcell->setPort(conn.first, SigSpec(RTLIL::Sm, conn.second.size()));
246248
} else {
247249
Wire *w = subm->addWire(conn.first, conn.second.size());

0 commit comments

Comments
 (0)