mirror of
https://github.com/YosysHQ/yosys
synced 2026-02-22 00:07:38 +00:00
share: use newcelltypes
This commit is contained in:
parent
f4975f27ee
commit
e2e7e5ef6a
2 changed files with 59 additions and 64 deletions
|
|
@ -481,6 +481,15 @@ struct Categories {
|
|||
constexpr bool& operator[](size_t idx) {
|
||||
return data[idx];
|
||||
}
|
||||
constexpr void set_id(IdString type, bool val = true) {
|
||||
size_t idx = type.index_;
|
||||
if (idx >= MAX_CELLS)
|
||||
return; // TODO should be an assert but then it's not constexpr
|
||||
data[idx] = val;
|
||||
}
|
||||
constexpr void set(size_t idx, bool val = true) {
|
||||
data[idx] = val;
|
||||
}
|
||||
constexpr size_t size() const { return data.size(); }
|
||||
};
|
||||
Category empty {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue