diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-01-21 09:43:04 -0800 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2020-01-21 09:43:04 -0800 |
commit | cd8f55a91100b8dcf8b4775803cbacf70f5a998c (patch) | |
tree | 6ad1a8856d8c2292c76abd60781df682c19cc296 /backends | |
parent | d4e188299ba729756ee689d14c81aab68a7ca1b7 (diff) | |
download | yosys-cd8f55a91100b8dcf8b4775803cbacf70f5a998c.tar.gz yosys-cd8f55a91100b8dcf8b4775803cbacf70f5a998c.tar.bz2 yosys-cd8f55a91100b8dcf8b4775803cbacf70f5a998c.zip |
write_xaiger: fix for (* keep *) on flop output
Diffstat (limited to 'backends')
-rw-r--r-- | backends/aiger/xaiger.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/aiger/xaiger.cc b/backends/aiger/xaiger.cc index a9b75ecc7..b72dd6890 100644 --- a/backends/aiger/xaiger.cc +++ b/backends/aiger/xaiger.cc @@ -222,6 +222,8 @@ struct XAigerWriter alias_map[Q] = D; auto r YS_ATTRIBUTE(unused) = ff_bits.insert(std::make_pair(D, cell)); log_assert(r.second); + if (input_bits.erase(Q)) + log_assert(Q.wire->attributes.count(ID::keep)); continue; } @@ -568,9 +570,6 @@ struct XAigerWriter // write_o_buffer(0); if (!box_list.empty() || !ff_bits.empty()) { - RTLIL::Module *holes_module = module->design->module(stringf("%s$holes", module->name.c_str())); - log_assert(holes_module); - dict<IdString, std::tuple<int,int,int>> cell_cache; int box_count = 0; @@ -653,6 +652,7 @@ struct XAigerWriter f.write(reinterpret_cast<const char*>(&buffer_size_be), sizeof(buffer_size_be)); f.write(buffer_str.data(), buffer_str.size()); + RTLIL::Module *holes_module = module->design->module(stringf("%s$holes", module->name.c_str())); if (holes_module) { std::stringstream a_buffer; XAigerWriter writer(holes_module, true /* holes_mode */); |