diff --git a/kernel/celltypes.h b/kernel/celltypes.h index 8da1e5e25..3a22976d5 100644 --- a/kernel/celltypes.h +++ b/kernel/celltypes.h @@ -334,6 +334,15 @@ struct CellTypes cell_types.clear(); } + const CellType* get_cell(const RTLIL::IdString &type) const + { + auto it = cell_types.find(type); + if (it == cell_types.end()) + return nullptr; + else + return &(it->second); + } + bool cell_known(const RTLIL::IdString &type) const { return cell_types.count(type) != 0;