mirror of
https://github.com/YosysHQ/yosys
synced 2026-03-12 16:20:32 +00:00
share: use newcelltypes
This commit is contained in:
parent
3212dfaf1f
commit
07ec8708e4
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