3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-03-09 06:44:54 +00:00

Readd builtin_ff_cell_types for plugin parity.

This commit is contained in:
nella 2026-03-02 12:11:25 +01:00 committed by Emil J. Tywoniak
parent b8ee0803ab
commit 04822c6660
2 changed files with 16 additions and 0 deletions

View file

@ -288,6 +288,19 @@ void RTLIL::OwningIdString::collect_garbage()
dict<std::string, std::string> RTLIL::constpad;
const pool<IdString> &RTLIL::builtin_ff_cell_types() {
static const pool<IdString> res = []() {
pool<IdString> r;
for (size_t i = 0; i < StaticCellTypes::builder.count; i++) {
auto &cell = StaticCellTypes::builder.cells[i];
if (cell.features.is_ff)
r.insert(cell.type);
}
return r;
}();
return res;
}
#define check(condition) log_assert(condition && "malformed Const union")
const Const::bitvectype& Const::get_bits() const {

View file

@ -737,6 +737,9 @@ template <> struct IDMacroHelper<-1> {
namespace RTLIL {
extern dict<std::string, std::string> constpad;
[[deprecated("use StaticCellTypes::categories.is_ff() instead")]]
const pool<IdString> &builtin_ff_cell_types();
static inline std::string escape_id(const std::string &str) {
if (str.size() > 0 && str[0] != '\\' && str[0] != '$')
return "\\" + str;