diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-04-18 09:00:06 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-04-18 09:00:06 -0700 |
commit | 8fe0a961b306ef0c9c5de912833c6d92aed5f363 (patch) | |
tree | 10325fb4b9a5d9a481177f0360fdbb8026e66367 /kernel | |
parent | a20ed260e1b12da64bc4b40682c53145f6ffe827 (diff) | |
parent | f4abc21d8ad79621cc24852bd76abf40a9d9f702 (diff) | |
download | yosys-8fe0a961b306ef0c9c5de912833c6d92aed5f363.tar.gz yosys-8fe0a961b306ef0c9c5de912833c6d92aed5f363.tar.bz2 yosys-8fe0a961b306ef0c9c5de912833c6d92aed5f363.zip |
Merge remote-tracking branch 'origin/clifford/whitebox' into xaig
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rtlil.cc | 6 | ||||
-rw-r--r-- | kernel/rtlil.h | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 9ae20a317..2f8715755 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -589,7 +589,7 @@ std::vector<RTLIL::Module*> RTLIL::Design::selected_modules() const std::vector<RTLIL::Module*> result; result.reserve(modules_.size()); for (auto &it : modules_) - if (selected_module(it.first) && !it.second->get_bool_attribute("\\blackbox")) + if (selected_module(it.first) && !it.second->get_blackbox_attribute()) result.push_back(it.second); return result; } @@ -599,7 +599,7 @@ std::vector<RTLIL::Module*> RTLIL::Design::selected_whole_modules() const std::vector<RTLIL::Module*> result; result.reserve(modules_.size()); for (auto &it : modules_) - if (selected_whole_module(it.first) && !it.second->get_bool_attribute("\\blackbox")) + if (selected_whole_module(it.first) && !it.second->get_blackbox_attribute()) result.push_back(it.second); return result; } @@ -609,7 +609,7 @@ std::vector<RTLIL::Module*> RTLIL::Design::selected_whole_modules_warn() const std::vector<RTLIL::Module*> result; result.reserve(modules_.size()); for (auto &it : modules_) - if (it.second->get_bool_attribute("\\blackbox")) + if (it.second->get_blackbox_attribute()) continue; else if (selected_whole_module(it.first)) result.push_back(it.second); diff --git a/kernel/rtlil.h b/kernel/rtlil.h index ef6eb9f83..c11c020c1 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -575,6 +575,10 @@ struct RTLIL::AttrObject void set_bool_attribute(RTLIL::IdString id); bool get_bool_attribute(RTLIL::IdString id) const; + bool get_blackbox_attribute() const { + return get_bool_attribute("\\blackbox") || get_bool_attribute("\\whitebox"); + } + void set_strpool_attribute(RTLIL::IdString id, const pool<string> &data); void add_strpool_attribute(RTLIL::IdString id, const pool<string> &data); pool<string> get_strpool_attribute(RTLIL::IdString id) const; |