mirror of
https://github.com/YosysHQ/yosys
synced 2026-06-02 23:28:00 +00:00
consteval: use newcelltypes
This commit is contained in:
parent
a0f87dc2d1
commit
8e17fb0266
2 changed files with 5 additions and 3 deletions
|
|
@ -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))
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue