88 Vec_PtrFree( (
Vec_Ptr_t *)Vec_PtrEntry(vNtk, 1) );
89 Vec_PtrFree( (
Vec_Ptr_t *)Vec_PtrEntry(vNtk, 2) );
90 Vec_VecFree( (
Vec_Vec_t *)Vec_PtrEntry(vNtk, 3) );
91 Vec_VecFree( (
Vec_Vec_t *)Vec_PtrEntry(vNtk, 4) );
92 if ( Vec_PtrSize(vNtk) > 5 )
93 Vec_FltFree( (
Vec_Flt_t *)Vec_PtrEntry(vNtk, 5) );
94 if ( Vec_PtrSize(vNtk) > 6 )
95 Vec_FltFree( (
Vec_Flt_t *)Vec_PtrEntry(vNtk, 6) );
120 return (
int)Vec_PtrMemory(vArray);
131 int nBytes = (int)Vec_PtrMemory(vNtk);
140 Vec_Ptr_t * vNtk;
int i, nBytes = (int)Vec_PtrMemory(vDes);
161 fprintf( pFile,
" %s", pSig );
166 fprintf( pFile,
".subckt" );
167 fprintf( pFile,
" %s", (
char *)Vec_PtrEntry(vBox, 0) );
170 fprintf( pFile,
" %s=%s", pName, (
char *)Vec_PtrEntry(vBox, i+1) ), i++;
171 fprintf( pFile,
"\n" );
181 fprintf( pFile,
".model %s\n", (
char *)Vec_PtrEntry(vNtk, 0) );
182 fprintf( pFile,
".inputs" );
184 fprintf( pFile,
"\n" );
185 fprintf( pFile,
".outputs" );
187 fprintf( pFile,
"\n" );
190 fprintf( pFile,
".end\n\n" );
196 pFile = fopen( pFileName,
"wb" );
199 printf(
"Cannot open output file \"%s\".\n", pFileName );
202 fprintf( pFile,
"// Design \"%s\" written via Ptr in ABC on %s\n\n", (
char *)Vec_PtrEntry(vDes, 0),
Extra_TimeStamp() );
223 fprintf( pFile,
" %s%s", pSig, (fAlwaysComma || i < Vec_PtrSize(vSigs) - 1) ?
",":
"" );
228 fprintf( pFile,
" %s", (
char *)Vec_PtrEntry(vBox, 0) );
229 fprintf( pFile,
" %s (", (
char *)Vec_PtrEntry(vBox, 1) );
231 fprintf( pFile,
".%s(%s)%s", pName, (
char *)Vec_PtrEntry(vBox, i+1), i < Vec_PtrSize(vBox) - 2 ?
", ":
"" ), i++;
232 fprintf( pFile,
");\n" );
242 fprintf( pFile,
"module %s (\n ", (
char *)Vec_PtrEntry(vNtk, 0) );
245 fprintf( pFile,
"\n );\n" );
246 fprintf( pFile,
" input" );
248 fprintf( pFile,
";\n" );
249 fprintf( pFile,
" output" );
251 fprintf( pFile,
";\n" );
254 fprintf( pFile,
"endmodule\n\n" );
260 pFile = fopen( pFileName,
"wb" );
263 printf(
"Cannot open output file \"%s\".\n", pFileName );
266 fprintf( pFile,
"// Design \"%s\" written via Ptr in ABC on %s\n\n", (
char *)Vec_PtrEntry(vDes, 0),
Extra_TimeStamp() );
292 static word uTruths6[3] = {
327 char * pNameNew, * pName = (
char *)Vec_PtrEntry(vBox, 0);
328 if ( !
strcmp(pName,
"Const0T") )
329 pNameNew = (
char *)Vec_PtrEntry(vGatesNames,
PTR_GATE_C0);
330 else if ( !
strcmp(pName,
"Const1T") )
331 pNameNew = (
char *)Vec_PtrEntry(vGatesNames,
PTR_GATE_C1);
332 else if ( !
strcmp(pName,
"BufT") )
333 pNameNew = (
char *)Vec_PtrEntry(vGatesNames,
PTR_GATE_BUF);
334 else if ( !
strcmp(pName,
"InvT") )
335 pNameNew = (
char *)Vec_PtrEntry(vGatesNames,
PTR_GATE_INV);
336 else if ( !
strcmp(pName,
"AndT") )
337 pNameNew = (
char *)Vec_PtrEntry(vGatesNames,
PTR_GATE_AND);
338 else if ( !
strcmp(pName,
"NandT") )
340 else if ( !
strcmp(pName,
"OrT") )
341 pNameNew = (
char *)Vec_PtrEntry(vGatesNames,
PTR_GATE_OR);
342 else if ( !
strcmp(pName,
"NorT") )
343 pNameNew = (
char *)Vec_PtrEntry(vGatesNames,
PTR_GATE_NOR);
344 else if ( !
strcmp(pName,
"XorT") )
345 pNameNew = (
char *)Vec_PtrEntry(vGatesNames,
PTR_GATE_XOR);
346 else if ( !
strcmp(pName,
"XnorT") )
351 Vec_PtrWriteEntry( vBox, 0, Abc_UtilStrsav(pNameNew) );
353 pName = (
char *)Vec_PtrEntry(vBox, 1);
355 Vec_PtrWriteEntry( vBox, 1, NULL );
360 pName = (
char *)Vec_PtrEntry( vBox, 2 * i );
363 Vec_PtrWriteEntry( vBox, 2 * i++, Abc_UtilStrsav(pNameNew) );
366 pName = (
char *)Vec_PtrEntry( vBox, 2 * i );
368 Vec_PtrWriteEntry( vBox, 2 * i++, Abc_UtilStrsav(pNameNew) );
369 assert( 2 * i == Vec_PtrSize(vBox) );
374 Vec_Ptr_t * vNew = Vec_PtrAllocExact( Vec_PtrSize(vSig) );
376 Vec_PtrPush( vNew, Abc_UtilStrsav(pName) );
382 Vec_Ptr_t * vNew = Vec_PtrAllocExact( Vec_PtrSize(vBox) );
384 Vec_PtrPush( vNew, Abc_UtilStrsav(pName) );
392 Vec_Ptr_t * vNew = Vec_PtrAllocExact( Vec_PtrSize(vBoxes) );
399 char * pName = (
char *)Vec_PtrEntry(vNtk, 0);
403 Vec_Ptr_t * vNew = Vec_PtrAllocExact( Vec_PtrSize(vNtk) );
404 Vec_PtrPush( vNew, Abc_UtilStrsav(pName) );
407 Vec_PtrPush( vNew, Vec_PtrAllocExact(0) );
420 printf(
"ABC framework is not started.\n" );
426 printf(
"Standard cell library is not entered.\n" );
431 vNew = Vec_PtrAllocExact( Vec_PtrSize(vDes) );
432 Vec_PtrPush( vNew, Abc_UtilStrsav((
char *)Vec_PtrEntry(vDes, 0)) );
437 Vec_PtrFree( vGatesNames );
454 char * pFileName =
"c/hie/dump/1/netlist_1.v";
struct Abc_Ntk_t_ Abc_Ntk_t
#define ABC_CONST(number)
PARAMETERS ///.
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
ABC_DLL Abc_Frame_t * Abc_FrameGetGlobalFrame()
Vec_Ptr_t * Ptr_AbcDeriveDes(Abc_Ntk_t *pNtk)
void Bac_PtrFree(Vec_Ptr_t *vDes)
Vec_Ptr_t * Bac_ManCollectGateNamesByTruth(Mio_Library_t *pLib)
Vec_Ptr_t * Bac_PtrTransformSigs(Vec_Ptr_t *vSig)
Vec_Ptr_t * Bac_PtrTransformBox(Vec_Ptr_t *vBox, Vec_Ptr_t *vGatesNames)
void Bac_PtrDumpModuleBlif(FILE *pFile, Vec_Ptr_t *vNtk)
void Bac_PtrDumpBoxesVerilog(FILE *pFile, Vec_Ptr_t *vBoxes)
Ptr_ObjType_t
DECLARATIONS ///.
void Bac_PtrDumpBoxesBlif(FILE *pFile, Vec_Ptr_t *vBoxes)
void Bac_PtrDumpBoxBlif(FILE *pFile, Vec_Ptr_t *vBox)
void Bac_PtrDumpSignalsBlif(FILE *pFile, Vec_Ptr_t *vSigs, int fSkipLastComma)
void Bac_PtrTransformTestTest()
Vec_Ptr_t * Bac_PtrTransformTest(Vec_Ptr_t *vDes)
int Bac_PtrMemoryArray(Vec_Ptr_t *vArray)
void Bac_ManCollectGateNameOne(Mio_Library_t *pLib, Ptr_ObjType_t Type, word Truth, Vec_Ptr_t *vGateNames)
int Bac_PtrMemory(Vec_Ptr_t *vDes)
Vec_Ptr_t * Bac_PtrTransformNtk(Vec_Ptr_t *vNtk, Vec_Ptr_t *vGatesNames)
int Bac_PtrMemoryNtk(Vec_Ptr_t *vNtk)
void Bac_PtrDumpVerilog(char *pFileName, Vec_Ptr_t *vDes)
void Bac_PtrFreeNtk(Vec_Ptr_t *vNtk)
FUNCTION DEFINITIONS ///.
void Bac_PtrUpdateBox(Vec_Ptr_t *vBox, Vec_Ptr_t *vGatesNames)
void Bac_PtrDumpBlif(char *pFileName, Vec_Ptr_t *vDes)
void Bac_PtrDumpBoxVerilog(FILE *pFile, Vec_Ptr_t *vBox)
int Bac_PtrMemoryArrayArray(Vec_Ptr_t *vArrayArray)
void Bac_PtrDumpSignalsVerilog(FILE *pFile, Vec_Ptr_t *vSigs, int fAlwaysComma)
Vec_Ptr_t * Bac_PtrTransformBoxes(Vec_Ptr_t *vBoxes, Vec_Ptr_t *vGatesNames)
void Bac_PtrDumpModuleVerilog(FILE *pFile, Vec_Ptr_t *vNtk)
ABC_DLL void * Abc_FrameReadLibGen()
Abc_Ntk_t * Io_ReadNetlist(char *pFileName, Io_FileType_t FileType, int fCheck)
Io_FileType_t Io_ReadFileType(char *pFileName)
DECLARATIONS ///.
unsigned __int64 word
DECLARATIONS ///.
struct Mio_LibraryStruct_t_ Mio_Library_t
Mio_Gate_t * Mio_LibraryReadGateByName(Mio_Library_t *pLib, char *pName, char *pOutName)
Mio_Gate_t * Mio_LibraryReadGateByTruth(Mio_Library_t *pLib, word t)
char * Mio_PinReadName(Mio_Pin_t *pPin)
char * Mio_GateReadName(Mio_Gate_t *pGate)
struct Mio_PinStruct_t_ Mio_Pin_t
char * Mio_GateReadOutName(Mio_Gate_t *pGate)
#define Mio_GateForEachPin(Gate, Pin)
struct Mio_GateStruct_t_ Mio_Gate_t
typedefABC_NAMESPACE_HEADER_START struct Vec_Flt_t_ Vec_Flt_t
INCLUDES ///.
#define Vec_PtrForEachEntryStart(Type, vVec, pEntry, i, Start)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.