mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
write_aiger -O to write dummy output as __dummy_o__
This commit is contained in:
parent
d8c4d4e6c7
commit
b9a305b85d
|
@ -502,7 +502,7 @@ struct XAigerWriter
|
||||||
f << stringf("c\nGenerated by %s\n", yosys_version_str);
|
f << stringf("c\nGenerated by %s\n", yosys_version_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
void write_map(std::ostream &f, bool verbose_map)
|
void write_map(std::ostream &f, bool verbose_map, bool omode)
|
||||||
{
|
{
|
||||||
dict<int, string> input_lines;
|
dict<int, string> input_lines;
|
||||||
dict<int, string> init_lines;
|
dict<int, string> init_lines;
|
||||||
|
@ -564,6 +564,9 @@ struct XAigerWriter
|
||||||
output_lines.sort();
|
output_lines.sort();
|
||||||
for (auto &it : output_lines)
|
for (auto &it : output_lines)
|
||||||
f << it.second;
|
f << it.second;
|
||||||
|
if (omode && output_bits.empty()) {
|
||||||
|
f << "output 0 0 __dummy_o__\n";
|
||||||
|
}
|
||||||
|
|
||||||
latch_lines.sort();
|
latch_lines.sort();
|
||||||
for (auto &it : latch_lines)
|
for (auto &it : latch_lines)
|
||||||
|
@ -675,7 +678,7 @@ struct XAigerBackend : public Backend {
|
||||||
mapf.open(map_filename.c_str(), std::ofstream::trunc);
|
mapf.open(map_filename.c_str(), std::ofstream::trunc);
|
||||||
if (mapf.fail())
|
if (mapf.fail())
|
||||||
log_error("Can't open file `%s' for writing: %s\n", map_filename.c_str(), strerror(errno));
|
log_error("Can't open file `%s' for writing: %s\n", map_filename.c_str(), strerror(errno));
|
||||||
writer.write_map(mapf, verbose_map);
|
writer.write_map(mapf, verbose_map, omode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} XAigerBackend;
|
} XAigerBackend;
|
||||||
|
|
Loading…
Reference in a new issue