mirror of
https://github.com/YosysHQ/yosys
synced 2026-01-29 05:18:45 +00:00
add $priority cell
This commit is contained in:
parent
967b47d984
commit
e166dd4475
9 changed files with 136 additions and 2 deletions
|
|
@ -118,7 +118,7 @@ struct CellTypes
|
|||
void setup_internals_eval()
|
||||
{
|
||||
std::vector<RTLIL::IdString> unary_ops = {
|
||||
ID($not), ID($pos), ID($buf), ID($neg),
|
||||
ID($not), ID($pos), ID($buf), ID($neg), ID($priority),
|
||||
ID($reduce_and), ID($reduce_or), ID($reduce_xor), ID($reduce_xnor), ID($reduce_bool),
|
||||
ID($logic_not), ID($slice), ID($lut), ID($sop)
|
||||
};
|
||||
|
|
@ -509,6 +509,11 @@ struct CellTypes
|
|||
return default_ret;
|
||||
}
|
||||
|
||||
if (cell->type == ID($priority))
|
||||
{
|
||||
return const_priority(arg1);
|
||||
}
|
||||
|
||||
bool signed_a = cell->parameters.count(ID::A_SIGNED) > 0 && cell->parameters[ID::A_SIGNED].as_bool();
|
||||
bool signed_b = cell->parameters.count(ID::B_SIGNED) > 0 && cell->parameters[ID::B_SIGNED].as_bool();
|
||||
int result_len = cell->parameters.count(ID::Y_WIDTH) > 0 ? cell->parameters[ID::Y_WIDTH].as_int() : -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue