diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/mio/mio.h | 1 | ||||
-rw-r--r-- | src/map/mio/mioApi.c | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/map/mio/mio.h b/src/map/mio/mio.h index 7c3aa396..d1abd6fc 100644 --- a/src/map/mio/mio.h +++ b/src/map/mio/mio.h @@ -98,6 +98,7 @@ extern Mio_Gate_t * Mio_LibraryReadGates ( Mio_Library_t * pLib ); extern Mio_Gate_t ** Mio_LibraryReadGateArray ( Mio_Library_t * pLib ); extern Mio_Gate_t * Mio_LibraryReadGateByName ( Mio_Library_t * pLib, char * pName, char * pOutName ); extern char * Mio_LibraryReadSopByName ( Mio_Library_t * pLib, char * pName ); +extern Mio_Gate_t * Mio_LibraryReadGateByTruth( Mio_Library_t * pLib, word t ); extern Mio_Gate_t * Mio_LibraryReadConst0 ( Mio_Library_t * pLib ); extern Mio_Gate_t * Mio_LibraryReadConst1 ( Mio_Library_t * pLib ); extern Mio_Gate_t * Mio_LibraryReadNand2 ( Mio_Library_t * pLib ); diff --git a/src/map/mio/mioApi.c b/src/map/mio/mioApi.c index 859062a1..62ace42f 100644 --- a/src/map/mio/mioApi.c +++ b/src/map/mio/mioApi.c @@ -112,6 +112,26 @@ Mio_Gate_t * Mio_LibraryReadGateByName( Mio_Library_t * pLib, char * pName, char /**Function************************************************************* + Synopsis [Returns the first gate in the library with the given TT.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +Mio_Gate_t * Mio_LibraryReadGateByTruth( Mio_Library_t * pLib, word t ) +{ + Mio_Gate_t * pGate; + Mio_LibraryForEachGate( pLib, pGate ) + if ( pGate->nInputs <= 6 && pGate->uTruth == t ) + return pGate; + return NULL; +} + +/**Function************************************************************* + Synopsis [Read Mvc of the gate by name.] Description [] |