mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 06:03:23 +00:00
Add $_NMUX_, add "abc -g cmos", add proper cmos cell costs
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
44a9dcbbbf
commit
023086bd46
19 changed files with 174 additions and 42 deletions
|
@ -475,7 +475,7 @@ struct SatGen
|
|||
return true;
|
||||
}
|
||||
|
||||
if (cell->type == "$_MUX_" || cell->type == "$mux")
|
||||
if (cell->type == "$_MUX_" || cell->type == "$mux" || cell->type == "$_NMUX_")
|
||||
{
|
||||
std::vector<int> a = importDefSigSpec(cell->getPort("\\A"), timestep);
|
||||
std::vector<int> b = importDefSigSpec(cell->getPort("\\B"), timestep);
|
||||
|
@ -483,7 +483,10 @@ struct SatGen
|
|||
std::vector<int> y = importDefSigSpec(cell->getPort("\\Y"), timestep);
|
||||
|
||||
std::vector<int> yy = model_undef ? ez->vec_var(y.size()) : y;
|
||||
ez->assume(ez->vec_eq(ez->vec_ite(s.at(0), b, a), yy));
|
||||
if (cell->type == "$_NMUX_")
|
||||
ez->assume(ez->vec_eq(ez->vec_not(ez->vec_ite(s.at(0), b, a)), yy));
|
||||
else
|
||||
ez->assume(ez->vec_eq(ez->vec_ite(s.at(0), b, a), yy));
|
||||
|
||||
if (model_undef)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue