mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-23 14:23:41 +00:00
Celltypes: Revert c++20 feature
Turns out using designated initializers is c++20, so not available while we are still c++17 friendly.
This commit is contained in:
parent
9117926157
commit
e7cfb0381c
1 changed files with 13 additions and 57 deletions
|
@ -76,25 +76,21 @@ struct CellTypes
|
||||||
|
|
||||||
void setup_type(RTLIL::IdString type, const pool<RTLIL::IdString> &inputs, const pool<RTLIL::IdString> &outputs)
|
void setup_type(RTLIL::IdString type, const pool<RTLIL::IdString> &inputs, const pool<RTLIL::IdString> &outputs)
|
||||||
{
|
{
|
||||||
CellType ct = {
|
CellType ct = { type, inputs, outputs, false };
|
||||||
.type = type,
|
|
||||||
.inputs = inputs,
|
|
||||||
.outputs = outputs,
|
|
||||||
.is_internal = false
|
|
||||||
};
|
|
||||||
cell_types[ct.type] = ct;
|
cell_types[ct.type] = ct;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup internal cell type with no other default properties
|
// Setup internal cell type with no other default properties
|
||||||
void setup_internal_type(RTLIL::IdString type, const pool<RTLIL::IdString> &inputs, const pool<RTLIL::IdString> &outputs,
|
void setup_internal_type(RTLIL::IdString type, const pool<RTLIL::IdString> &inputs, const pool<RTLIL::IdString> &outputs,
|
||||||
bool is_combinatorial = false)
|
bool is_combinatorial = false, bool is_evaluable = false,
|
||||||
|
bool is_synthesizable = false, bool is_builtin_ff = false, bool is_formal = false,
|
||||||
|
bool is_metainfo = false, bool has_effects = false)
|
||||||
{
|
{
|
||||||
CellType ct = {
|
CellType ct = {
|
||||||
.type = type,
|
type, inputs, outputs, true,
|
||||||
.inputs = inputs,
|
is_evaluable, is_combinatorial,
|
||||||
.outputs = outputs,
|
is_synthesizable, is_builtin_ff, is_formal,
|
||||||
.is_internal = true,
|
is_metainfo, has_effects,
|
||||||
.is_combinatorial = is_combinatorial,
|
|
||||||
};
|
};
|
||||||
cell_types[ct.type] = ct;
|
cell_types[ct.type] = ct;
|
||||||
}
|
}
|
||||||
|
@ -103,73 +99,33 @@ struct CellTypes
|
||||||
void setup_comb_type(RTLIL::IdString type, const pool<RTLIL::IdString> &inputs, const pool<RTLIL::IdString> &outputs,
|
void setup_comb_type(RTLIL::IdString type, const pool<RTLIL::IdString> &inputs, const pool<RTLIL::IdString> &outputs,
|
||||||
bool is_evaluable = true)
|
bool is_evaluable = true)
|
||||||
{
|
{
|
||||||
CellType ct = {
|
setup_internal_type(type, inputs, outputs, true, is_evaluable, true);
|
||||||
.type = type,
|
|
||||||
.inputs = inputs,
|
|
||||||
.outputs = outputs,
|
|
||||||
.is_internal = true,
|
|
||||||
.is_evaluable = is_evaluable,
|
|
||||||
.is_combinatorial = true,
|
|
||||||
.is_synthesizable = true,
|
|
||||||
};
|
|
||||||
cell_types[ct.type] = ct;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup builtin ff cell type which is synthesizable
|
// Setup builtin ff cell type which is synthesizable
|
||||||
void setup_ff_type(RTLIL::IdString type, const pool<RTLIL::IdString> &inputs, const pool<RTLIL::IdString> &outputs)
|
void setup_ff_type(RTLIL::IdString type, const pool<RTLIL::IdString> &inputs, const pool<RTLIL::IdString> &outputs)
|
||||||
{
|
{
|
||||||
CellType ct = {
|
setup_internal_type(type, inputs, outputs, false, false, true, true);
|
||||||
.type = type,
|
|
||||||
.inputs = inputs,
|
|
||||||
.outputs = outputs,
|
|
||||||
.is_internal = true,
|
|
||||||
.is_synthesizable = true,
|
|
||||||
.is_builtin_ff = true,
|
|
||||||
};
|
|
||||||
cell_types[ct.type] = ct;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup formal cell type which may be combinatorial, and may have effects
|
// Setup formal cell type which may be combinatorial, and may have effects
|
||||||
void setup_formal_type(RTLIL::IdString type, const pool<RTLIL::IdString> &inputs, const pool<RTLIL::IdString> &outputs,
|
void setup_formal_type(RTLIL::IdString type, const pool<RTLIL::IdString> &inputs, const pool<RTLIL::IdString> &outputs,
|
||||||
bool is_combinatorial = false)
|
bool is_combinatorial = false)
|
||||||
{
|
{
|
||||||
CellType ct = {
|
setup_internal_type(type, inputs, outputs, is_combinatorial, false, false, false, true);
|
||||||
.type = type,
|
|
||||||
.inputs = inputs,
|
|
||||||
.outputs = outputs,
|
|
||||||
.is_internal = true,
|
|
||||||
.is_combinatorial = is_combinatorial,
|
|
||||||
.is_formal = true,
|
|
||||||
};
|
|
||||||
cell_types[ct.type] = ct;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup cell type which has effects, and may be formal
|
// Setup cell type which has effects, and may be formal
|
||||||
void setup_effects_type(RTLIL::IdString type, const pool<RTLIL::IdString> &inputs, const pool<RTLIL::IdString> &outputs,
|
void setup_effects_type(RTLIL::IdString type, const pool<RTLIL::IdString> &inputs, const pool<RTLIL::IdString> &outputs,
|
||||||
bool is_formal = false)
|
bool is_formal = false)
|
||||||
{
|
{
|
||||||
CellType ct = {
|
setup_internal_type(type, inputs, outputs, false, false, false, false, is_formal, false, true);
|
||||||
.type = type,
|
|
||||||
.inputs = inputs,
|
|
||||||
.outputs = outputs,
|
|
||||||
.is_internal = true,
|
|
||||||
.is_formal = is_formal,
|
|
||||||
.has_effects = true,
|
|
||||||
};
|
|
||||||
cell_types[ct.type] = ct;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup meta-info cell type
|
// Setup meta-info cell type
|
||||||
void setup_metainfo_type(RTLIL::IdString type, const pool<RTLIL::IdString> &inputs, const pool<RTLIL::IdString> &outputs)
|
void setup_metainfo_type(RTLIL::IdString type, const pool<RTLIL::IdString> &inputs, const pool<RTLIL::IdString> &outputs)
|
||||||
{
|
{
|
||||||
CellType ct = {
|
setup_internal_type(type, inputs, outputs, false, false, false, false, false, true);
|
||||||
.type = type,
|
|
||||||
.inputs = inputs,
|
|
||||||
.outputs = outputs,
|
|
||||||
.is_internal = true,
|
|
||||||
.is_metainfo = true,
|
|
||||||
};
|
|
||||||
cell_types[ct.type] = ct;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup_module(RTLIL::Module *module)
|
void setup_module(RTLIL::Module *module)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue