From 3cd01a57cde40a4d69c374495dbd81fab4f3acc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Povi=C5=A1er?= Date: Tue, 10 Dec 2024 15:12:42 +0100 Subject: [PATCH] wrapcell: Add comments, const qualifier --- passes/cmds/wrapcell.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/passes/cmds/wrapcell.cc b/passes/cmds/wrapcell.cc index 420b4ecb513..0c15848e429 100644 --- a/passes/cmds/wrapcell.cc +++ b/passes/cmds/wrapcell.cc @@ -48,7 +48,7 @@ struct ContextData { }; std::optional format(std::string fmt, const dict ¶meters, - ContextData &context) + const ContextData &context) { std::stringstream result; @@ -108,6 +108,7 @@ struct Chunk { } }; +// Joins contiguous runs of bits into a 'Chunk' std::vector collect_chunks(std::vector> bits) { std::vector ret; @@ -242,6 +243,7 @@ struct WrapcellPass : Pass { subcell = subm->addCell("$1", cell->type); for (auto conn : cell->connections()) { if (ct.cell_output(cell->type, conn.first)) { + // Insert marker bits as placehodlers which need to be replaced subcell->setPort(conn.first, SigSpec(RTLIL::Sm, conn.second.size())); } else { Wire *w = subm->addWire(conn.first, conn.second.size());