3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-06-03 07:37:57 +00:00

consteval: use newcelltypes

This commit is contained in:
Emil J. Tywoniak 2025-11-25 23:47:56 +01:00
parent a0f87dc2d1
commit 8e17fb0266
2 changed files with 5 additions and 3 deletions

View file

@ -24,6 +24,7 @@
#include "kernel/sigtools.h" #include "kernel/sigtools.h"
#include "kernel/celltypes.h" #include "kernel/celltypes.h"
#include "kernel/macc.h" #include "kernel/macc.h"
#include "kernel/newcelltypes.h"
YOSYS_NAMESPACE_BEGIN YOSYS_NAMESPACE_BEGIN
@ -44,9 +45,8 @@ struct ConstEval
ConstEval(RTLIL::Module *module, RTLIL::State defaultval = RTLIL::State::Sm) : module(module), assign_map(module), defaultval(defaultval) ConstEval(RTLIL::Module *module, RTLIL::State defaultval = RTLIL::State::Sm) : module(module), assign_map(module), defaultval(defaultval)
{ {
CellTypes ct; auto ct = NewCellTypes();
ct.setup_internals(); ct.static_cell_types = StaticCellTypes::Compat::nomem_noff;
ct.setup_stdcells();
for (auto &it : module->cells_) { for (auto &it : module->cells_) {
if (!ct.cell_known(it.second->type)) if (!ct.cell_known(it.second->type))

View file

@ -554,6 +554,8 @@ namespace Compat {
static constexpr auto internals_mem_ff = Categories::meet(internals_all, mem_ff); static constexpr auto internals_mem_ff = Categories::meet(internals_all, mem_ff);
// old setup_internals // old setup_internals
static constexpr auto internals_nomem_noff = Categories::meet(internals_all, nomem_noff); static constexpr auto internals_nomem_noff = Categories::meet(internals_all, nomem_noff);
// old setup_stdcells
static constexpr auto stdcells_nomem_noff = Categories::meet(categories.is_stdcell, nomem_noff);
static constexpr auto stdcells_mem = Categories::meet(categories.is_stdcell, categories.is_mem_noff); static constexpr auto stdcells_mem = Categories::meet(categories.is_stdcell, categories.is_mem_noff);
}; };