00001 00019 #include "mioInt.h" 00020 00024 00028 00040 char * Mio_LibraryReadName ( Mio_Library_t * pLib ) { return pLib->pName; } 00041 int Mio_LibraryReadGateNum ( Mio_Library_t * pLib ) { return pLib->nGates; } 00042 Mio_Gate_t * Mio_LibraryReadGates ( Mio_Library_t * pLib ) { return pLib->pGates; } 00043 DdManager * Mio_LibraryReadDd ( Mio_Library_t * pLib ) { return pLib->dd; } 00044 Mio_Gate_t * Mio_LibraryReadBuf ( Mio_Library_t * pLib ) { return pLib->pGateBuf; } 00045 Mio_Gate_t * Mio_LibraryReadInv ( Mio_Library_t * pLib ) { return pLib->pGateInv; } 00046 Mio_Gate_t * Mio_LibraryReadConst0 ( Mio_Library_t * pLib ) { return pLib->pGate0; } 00047 Mio_Gate_t * Mio_LibraryReadConst1 ( Mio_Library_t * pLib ) { return pLib->pGate1; } 00048 Mio_Gate_t * Mio_LibraryReadNand2 ( Mio_Library_t * pLib ) { return pLib->pGateNand2; } 00049 Mio_Gate_t * Mio_LibraryReadAnd2 ( Mio_Library_t * pLib ) { return pLib->pGateAnd2; } 00050 float Mio_LibraryReadDelayInvRise ( Mio_Library_t * pLib ) { return (float)(pLib->pGateInv? pLib->pGateInv->pPins->dDelayBlockRise : 0.0); } 00051 float Mio_LibraryReadDelayInvFall ( Mio_Library_t * pLib ) { return (float)(pLib->pGateInv? pLib->pGateInv->pPins->dDelayBlockFall : 0.0); } 00052 float Mio_LibraryReadDelayInvMax ( Mio_Library_t * pLib ) { return (float)(pLib->pGateInv? pLib->pGateInv->pPins->dDelayBlockMax : 0.0); } 00053 float Mio_LibraryReadDelayNand2Rise( Mio_Library_t * pLib ) { return (float)(pLib->pGateNand2? pLib->pGateNand2->pPins->dDelayBlockRise : 0.0); } 00054 float Mio_LibraryReadDelayNand2Fall( Mio_Library_t * pLib ) { return (float)(pLib->pGateNand2? pLib->pGateNand2->pPins->dDelayBlockFall : 0.0); } 00055 float Mio_LibraryReadDelayNand2Max ( Mio_Library_t * pLib ) { return (float)(pLib->pGateNand2? pLib->pGateNand2->pPins->dDelayBlockMax : 0.0); } 00056 float Mio_LibraryReadDelayAnd2Max ( Mio_Library_t * pLib ) { return (float)(pLib->pGateAnd2? pLib->pGateAnd2->pPins->dDelayBlockMax : 0.0); } 00057 float Mio_LibraryReadAreaInv ( Mio_Library_t * pLib ) { return (float)(pLib->pGateInv? pLib->pGateInv->dArea : 0.0); } 00058 float Mio_LibraryReadAreaBuf ( Mio_Library_t * pLib ) { return (float)(pLib->pGateBuf? pLib->pGateBuf->dArea : 0.0); } 00059 float Mio_LibraryReadAreaNand2 ( Mio_Library_t * pLib ) { return (float)(pLib->pGateNand2? pLib->pGateNand2->dArea : 0.0); } 00060 00072 int Mio_LibraryReadGateNameMax( Mio_Library_t * pLib ) 00073 { 00074 Mio_Gate_t * pGate; 00075 int LenMax = 0, LenCur; 00076 Mio_LibraryForEachGate( pLib, pGate ) 00077 { 00078 LenCur = strlen( Mio_GateReadName(pGate) ); 00079 if ( LenMax < LenCur ) 00080 LenMax = LenCur; 00081 } 00082 return LenMax; 00083 } 00084 00096 Mio_Gate_t * Mio_LibraryReadGateByName( Mio_Library_t * pLib, char * pName ) 00097 { 00098 Mio_Gate_t * pGate; 00099 if ( st_lookup( pLib->tName2Gate, pName, (char **)&pGate ) ) 00100 return pGate; 00101 return NULL; 00102 } 00103 00115 char * Mio_LibraryReadSopByName( Mio_Library_t * pLib, char * pName ) 00116 { 00117 Mio_Gate_t * pGate; 00118 if ( st_lookup( pLib->tName2Gate, pName, (char **)&pGate ) ) 00119 return pGate->pSop; 00120 return NULL; 00121 } 00122 00134 char * Mio_GateReadName ( Mio_Gate_t * pGate ) { return pGate->pName; } 00135 char * Mio_GateReadOutName ( Mio_Gate_t * pGate ) { return pGate->pOutName; } 00136 double Mio_GateReadArea ( Mio_Gate_t * pGate ) { return pGate->dArea; } 00137 char * Mio_GateReadForm ( Mio_Gate_t * pGate ) { return pGate->pForm; } 00138 Mio_Pin_t * Mio_GateReadPins ( Mio_Gate_t * pGate ) { return pGate->pPins; } 00139 Mio_Library_t * Mio_GateReadLib ( Mio_Gate_t * pGate ) { return pGate->pLib; } 00140 Mio_Gate_t * Mio_GateReadNext ( Mio_Gate_t * pGate ) { return pGate->pNext; } 00141 int Mio_GateReadInputs ( Mio_Gate_t * pGate ) { return pGate->nInputs; } 00142 double Mio_GateReadDelayMax( Mio_Gate_t * pGate ) { return pGate->dDelayMax; } 00143 char * Mio_GateReadSop ( Mio_Gate_t * pGate ) { return pGate->pSop; } 00144 DdNode * Mio_GateReadFunc ( Mio_Gate_t * pGate ) { return pGate->bFunc; } 00145 00157 char * Mio_PinReadName ( Mio_Pin_t * pPin ) { return pPin->pName; } 00158 Mio_PinPhase_t Mio_PinReadPhase ( Mio_Pin_t * pPin ) { return pPin->Phase; } 00159 double Mio_PinReadInputLoad ( Mio_Pin_t * pPin ) { return pPin->dLoadInput; } 00160 double Mio_PinReadMaxLoad ( Mio_Pin_t * pPin ) { return pPin->dLoadMax; } 00161 double Mio_PinReadDelayBlockRise ( Mio_Pin_t * pPin ) { return pPin->dDelayBlockRise; } 00162 double Mio_PinReadDelayFanoutRise( Mio_Pin_t * pPin ) { return pPin->dDelayFanoutRise;} 00163 double Mio_PinReadDelayBlockFall ( Mio_Pin_t * pPin ) { return pPin->dDelayBlockFall; } 00164 double Mio_PinReadDelayFanoutFall( Mio_Pin_t * pPin ) { return pPin->dDelayFanoutFall;} 00165 double Mio_PinReadDelayBlockMax ( Mio_Pin_t * pPin ) { return pPin->dDelayBlockMax; } 00166 Mio_Pin_t * Mio_PinReadNext ( Mio_Pin_t * pPin ) { return pPin->pNext; } 00167 00171 00172