mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
aiger2: Support $pos
This commit is contained in:
parent
fb26945a20
commit
fa39227416
|
@ -38,7 +38,7 @@ PRIVATE_NAMESPACE_BEGIN
|
||||||
// TODO
|
// TODO
|
||||||
//#define ARITH_OPS ID($add), ID($sub), ID($lt), ID($le), ID($ge), ID($gt), ID($neg)
|
//#define ARITH_OPS ID($add), ID($sub), ID($lt), ID($le), ID($ge), ID($gt), ID($neg)
|
||||||
|
|
||||||
#define KNOWN_OPS BITWISE_OPS, REDUCE_OPS, LOGIC_OPS, GATE_OPS /*, ARITH_OPS*/
|
#define KNOWN_OPS BITWISE_OPS, REDUCE_OPS, LOGIC_OPS, GATE_OPS, ID($pos) /*, ARITH_OPS*/
|
||||||
|
|
||||||
template<typename Writer, typename Lit>
|
template<typename Writer, typename Lit>
|
||||||
struct Index {
|
struct Index {
|
||||||
|
@ -203,7 +203,7 @@ struct Index {
|
||||||
return OR(a, b);
|
return OR(a, b);
|
||||||
else
|
else
|
||||||
log_abort();
|
log_abort();
|
||||||
} else if (cell->type.in(BITWISE_OPS, GATE_OPS)) {
|
} else if (cell->type.in(BITWISE_OPS, GATE_OPS, ID($pos))) {
|
||||||
SigSpec aport = cell->getPort(ID::A);
|
SigSpec aport = cell->getPort(ID::A);
|
||||||
Lit a;
|
Lit a;
|
||||||
if (obit < aport.size()) {
|
if (obit < aport.size()) {
|
||||||
|
@ -215,7 +215,7 @@ struct Index {
|
||||||
a = Writer::CONST_FALSE;
|
a = Writer::CONST_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cell->type.in(ID($buf), ID($_BUF_))) {
|
if (cell->type.in(ID($buf), ID($pos), ID($_BUF_))) {
|
||||||
return a;
|
return a;
|
||||||
} else if (cell->type.in(ID($not), ID($_NOT_))) {
|
} else if (cell->type.in(ID($not), ID($_NOT_))) {
|
||||||
return NOT(a);
|
return NOT(a);
|
||||||
|
|
Loading…
Reference in a new issue