mirror of https://github.com/YosysHQ/yosys.git
Readd builtin_ff_cell_types for plugin parity.
This commit is contained in:
parent
b8ee0803ab
commit
04822c6660
|
|
@ -288,6 +288,19 @@ void RTLIL::OwningIdString::collect_garbage()
|
||||||
|
|
||||||
dict<std::string, std::string> RTLIL::constpad;
|
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")
|
#define check(condition) log_assert(condition && "malformed Const union")
|
||||||
|
|
||||||
const Const::bitvectype& Const::get_bits() const {
|
const Const::bitvectype& Const::get_bits() const {
|
||||||
|
|
|
||||||
|
|
@ -737,6 +737,9 @@ template <> struct IDMacroHelper<-1> {
|
||||||
namespace RTLIL {
|
namespace RTLIL {
|
||||||
extern dict<std::string, std::string> constpad;
|
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) {
|
static inline std::string escape_id(const std::string &str) {
|
||||||
if (str.size() > 0 && str[0] != '\\' && str[0] != '$')
|
if (str.size() > 0 && str[0] != '\\' && str[0] != '$')
|
||||||
return "\\" + str;
|
return "\\" + str;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue