mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-08-28 17:14:11 +02:00
ilang, ast: Store parameter order and default value information.
Fixes #1819, #1820.
This commit is contained in:
@@ -290,8 +290,16 @@ void ILANG_BACKEND::dump_module(std::ostream &f, std::string indent, RTLIL::Modu
|
||||
if (!module->avail_parameters.empty()) {
|
||||
if (only_selected)
|
||||
f << stringf("\n");
|
||||
for (auto &p : module->avail_parameters)
|
||||
f << stringf("%s" " parameter %s\n", indent.c_str(), p.c_str());
|
||||
for (const auto &p : module->avail_parameters) {
|
||||
const auto &it = module->parameter_default_values.find(p);
|
||||
if (it == module->parameter_default_values.end()) {
|
||||
f << stringf("%s" " parameter %s\n", indent.c_str(), p.c_str());
|
||||
} else {
|
||||
f << stringf("%s" " parameter %s ", indent.c_str(), p.c_str());
|
||||
dump_const(f, it->second);
|
||||
f << stringf("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user