3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-27 06:27:57 +00:00
This commit is contained in:
Emil J. Tywoniak 2024-06-14 17:26:48 +02:00
parent eeb15ea2a2
commit 65d50db4ef
13 changed files with 74 additions and 67 deletions

View file

@ -128,11 +128,11 @@ struct JsonWriter
f << get_string(value.as_string());
}
}
void write_parameters(const dict<IdString, Const> &parameters, bool for_module=false)
template <typename SmellsLikeDict>
void write_parameters(const SmellsLikeDict &parameters, bool for_module=false)
{
bool first = true;
for (auto &param : parameters) {
for (auto param : parameters) {
f << stringf("%s\n", first ? "" : ",");
f << stringf(" %s%s: ", for_module ? "" : " ", get_name(param.first).c_str());
write_parameter_value(param.second);