diff options
Diffstat (limited to 'src/aig/kit/kitPla.c')
-rw-r--r-- | src/aig/kit/kitPla.c | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/aig/kit/kitPla.c b/src/aig/kit/kitPla.c index be8f594a..776762c2 100644 --- a/src/aig/kit/kitPla.c +++ b/src/aig/kit/kitPla.c @@ -47,6 +47,62 @@ int Kit_PlaIsConst0( char * pSop ) /**Function************************************************************* + Synopsis [Checks if the cover is constant 1.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Kit_PlaIsConst1( char * pSop ) +{ + return pSop[0] == ' ' && pSop[1] == '1'; +} + +/**Function************************************************************* + + Synopsis [Checks if the cover is a buffer.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Kit_PlaIsBuf( char * pSop ) +{ + if ( pSop[4] != 0 ) + return 0; + if ( (pSop[0] == '1' && pSop[2] == '1') || (pSop[0] == '0' && pSop[2] == '0') ) + return 1; + return 0; +} + +/**Function************************************************************* + + Synopsis [Checks if the cover is an inverter.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Kit_PlaIsInv( char * pSop ) +{ + if ( pSop[4] != 0 ) + return 0; + if ( (pSop[0] == '0' && pSop[2] == '1') || (pSop[0] == '1' && pSop[2] == '0') ) + return 1; + return 0; +} + +/**Function************************************************************* + Synopsis [Reads the number of variables in the cover.] Description [] |