mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-27 02:45:52 +00:00
Merge de37070c28
into 733487e730
This commit is contained in:
commit
5a75c33d41
2 changed files with 14 additions and 0 deletions
|
@ -396,6 +396,14 @@ void dump_attributes(std::ostream &f, std::string indent, dict<RTLIL::IdString,
|
|||
}
|
||||
}
|
||||
|
||||
void dump_parameter(std::ostream &f, std::string indent, RTLIL::IdString id_string, RTLIL::Const parameter)
|
||||
{
|
||||
f << stringf("%sparameter %s", indent.c_str(), id(id_string).c_str());
|
||||
f << stringf(" = ");
|
||||
dump_const(f, parameter);
|
||||
f << stringf(";\n");
|
||||
}
|
||||
|
||||
void dump_wire(std::ostream &f, std::string indent, RTLIL::Wire *wire)
|
||||
{
|
||||
dump_attributes(f, indent, wire->attributes, "\n", /*modattr=*/false, /*regattr=*/reg_wires.count(wire->name));
|
||||
|
@ -2356,6 +2364,9 @@ void dump_module(std::ostream &f, std::string indent, RTLIL::Module *module)
|
|||
f << indent + " " << "reg " << id(initial_id) << " = 0;\n";
|
||||
}
|
||||
|
||||
for (auto p : module->parameter_default_values)
|
||||
dump_parameter(f, indent + " ", p.first, p.second);
|
||||
|
||||
for (auto w : module->wires())
|
||||
dump_wire(f, indent + " ", w);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue