diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2008-04-29 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2008-04-29 08:01:00 -0700 |
commit | 2b98b81837011f26d130ad0f44d4bc7b298f9cd7 (patch) | |
tree | 3f3eb36585157596614b1f0bf8b34ee5d1b533b2 /src/aig/kit/kitPla.c | |
parent | e2e9aed11dd841801dae3cdf47db06946e7ffb28 (diff) | |
download | abc-2b98b81837011f26d130ad0f44d4bc7b298f9cd7.tar.gz abc-2b98b81837011f26d130ad0f44d4bc7b298f9cd7.tar.bz2 abc-2b98b81837011f26d130ad0f44d4bc7b298f9cd7.zip |
Version abc80429
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 [] |