diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-05-24 10:10:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-24 10:10:50 -0700 |
commit | 89ed34fe55fd6a70b51ff68439e68f9a9e0b9e0f (patch) | |
tree | 44b26469df3e400761bc0cb2948695c33d0ac7e8 | |
parent | 227c3ff310e82516385b15d7cac905459f8bb09e (diff) | |
parent | 33b03ce904f6810437e27ca7a6df4fb1e966fc23 (diff) | |
download | yosys-89ed34fe55fd6a70b51ff68439e68f9a9e0b9e0f.tar.gz yosys-89ed34fe55fd6a70b51ff68439e68f9a9e0b9e0f.tar.bz2 yosys-89ed34fe55fd6a70b51ff68439e68f9a9e0b9e0f.zip |
Merge pull request #2075 from YosysHQ/eddie/xaiger_cleanup
xaiger: do not derive cells
-rw-r--r-- | backends/aiger/xaiger.cc | 8 | ||||
-rw-r--r-- | tests/various/xaiger.ys | 13 |
2 files changed, 14 insertions, 7 deletions
diff --git a/backends/aiger/xaiger.cc b/backends/aiger/xaiger.cc index 69797ceaf..6b910eecd 100644 --- a/backends/aiger/xaiger.cc +++ b/backends/aiger/xaiger.cc @@ -248,6 +248,7 @@ struct XAigerWriter auto it = cell->attributes.find(ID::abc9_box_seq); if (it != cell->attributes.end()) { log_assert(!cell->has_keep_attr()); + log_assert(cell->parameters.empty()); int abc9_box_seq = it->second.as_int(); if (GetSize(box_list) <= abc9_box_seq) box_list.resize(abc9_box_seq+1); @@ -260,13 +261,6 @@ struct XAigerWriter continue; } - if (!cell->parameters.empty()) { - auto derived_type = inst_module->derive(design, cell->parameters); - inst_module = design->module(derived_type); - log_assert(inst_module); - log_assert(inst_module->get_blackbox_attribute()); - } - if (!timing.count(inst_module->name)) timing.setup_module(inst_module); auto &t = timing.at(inst_module->name).arrival; diff --git a/tests/various/xaiger.ys b/tests/various/xaiger.ys new file mode 100644 index 000000000..f612d2e18 --- /dev/null +++ b/tests/various/xaiger.ys @@ -0,0 +1,13 @@ +read_verilog <<EOT +module top(input a, b, output c); +bb #(1) bb(); +endmodule + +module bb(input a, b, output c); +parameter p = 0; +assign c = a ^ b; +endmodule +EOT +blackbox bb +hierarchy +write_xaiger /dev/null |