From c6afb9db639b7ce0ac714e4e63e629b4c8bf1ac1 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 9 Nov 2016 21:17:44 -0800 Subject: Equivalent fault detection code. --- src/map/mio/mio.h | 1 + src/map/mio/mioApi.c | 1 + src/map/mio/mioRead.c | 3 +++ 3 files changed, 5 insertions(+) (limited to 'src/map/mio') diff --git a/src/map/mio/mio.h b/src/map/mio/mio.h index f45cce89..6e16a57f 100644 --- a/src/map/mio/mio.h +++ b/src/map/mio/mio.h @@ -112,6 +112,7 @@ extern char * Mio_LibraryReadName ( Mio_Library_t * pLib ); extern int Mio_LibraryReadGateNum ( Mio_Library_t * pLib ); 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_LibraryReadGateById ( Mio_Library_t * pLib, int iD ); 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 ); diff --git a/src/map/mio/mioApi.c b/src/map/mio/mioApi.c index bb601a05..38e754a6 100644 --- a/src/map/mio/mioApi.c +++ b/src/map/mio/mioApi.c @@ -44,6 +44,7 @@ char * Mio_LibraryReadName ( Mio_Library_t * pLib ) { retur int Mio_LibraryReadGateNum ( Mio_Library_t * pLib ) { return pLib->nGates; } Mio_Gate_t * Mio_LibraryReadGates ( Mio_Library_t * pLib ) { return pLib->pGates; } Mio_Gate_t ** Mio_LibraryReadGateArray ( Mio_Library_t * pLib ) { return pLib->ppGatesName;} +Mio_Gate_t * Mio_LibraryReadGateById ( Mio_Library_t * pLib, int Id ) { assert( pLib->ppGates0[Id]->Cell == Id ); return pLib->ppGates0[Id];} Mio_Gate_t * Mio_LibraryReadBuf ( Mio_Library_t * pLib ) { return pLib->pGateBuf; } Mio_Gate_t * Mio_LibraryReadInv ( Mio_Library_t * pLib ) { return pLib->pGateInv; } Mio_Gate_t * Mio_LibraryReadConst0 ( Mio_Library_t * pLib ) { return pLib->pGate0; } diff --git a/src/map/mio/mioRead.c b/src/map/mio/mioRead.c index b170256d..798458f3 100644 --- a/src/map/mio/mioRead.c +++ b/src/map/mio/mioRead.c @@ -586,7 +586,10 @@ void Mio_LibrarySortGates( Mio_Library_t * pLib ) int i = 0; ppGates = ABC_ALLOC( Mio_Gate_t *, pLib->nGates ); Mio_LibraryForEachGate( pLib, pGate ) + { + pGate->Cell = i; ppGates[i++] = pGate; + } assert( i == pLib->nGates ); // sort gates by name pLib->ppGates0 = ABC_ALLOC( Mio_Gate_t *, pLib->nGates ); -- cgit v1.2.3