Skip to content

Commit 646c5a1

Browse files
authored
Merge pull request #4776 from YosysHQ/krys/get_blackbox_attribute
Move get_blackbox_attribute method to Module instead of AttrObject
2 parents 1717a0b + f428163 commit 646c5a1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

kernel/rtlil.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,7 @@ struct RTLIL::AttrObject
814814
void set_bool_attribute(const RTLIL::IdString &id, bool value=true);
815815
bool get_bool_attribute(const RTLIL::IdString &id) const;
816816

817+
[[deprecated("Use Module::get_blackbox_attribute() instead.")]]
817818
bool get_blackbox_attribute(bool ignore_wb=false) const {
818819
return get_bool_attribute(ID::blackbox) || (!ignore_wb && get_bool_attribute(ID::whitebox));
819820
}
@@ -1291,6 +1292,10 @@ struct RTLIL::Module : public RTLIL::AttrObject
12911292
virtual void optimize();
12921293
virtual void makeblackbox();
12931294

1295+
bool get_blackbox_attribute(bool ignore_wb=false) const {
1296+
return get_bool_attribute(ID::blackbox) || (!ignore_wb && get_bool_attribute(ID::whitebox));
1297+
}
1298+
12941299
void connect(const RTLIL::SigSig &conn);
12951300
void connect(const RTLIL::SigSpec &lhs, const RTLIL::SigSpec &rhs);
12961301
void new_connections(const std::vector<RTLIL::SigSig> &new_conn);

0 commit comments

Comments
 (0)