write_cxxrtl: reset state value of comb `$print` cells.

This commit is contained in:
Catherine 2024-01-11 14:10:20 +00:00 committed by Dag Lem
parent 1159e48721
commit d493225313
1 changed files with 2 additions and 0 deletions

View File

@ -2002,6 +2002,8 @@ struct CxxrtlWorker {
} }
} }
for (auto cell : module->cells()) { for (auto cell : module->cells()) {
if (cell->type == ID($print) && !cell->getParam(ID::TRG_ENABLE).as_bool())
f << indent << mangle(cell) << " = value<" << (1 + cell->getParam(ID::ARGS_WIDTH).as_int()) << ">();\n";
if (is_internal_cell(cell->type)) if (is_internal_cell(cell->type))
continue; continue;
f << indent << mangle(cell); f << indent << mangle(cell);