ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
mio.c File Reference
#include <unistd.h>
#include "base/main/main.h"
#include "mio.h"
#include "map/mapper/mapper.h"
#include "map/amap/amap.h"
Include dependency graph for mio.c:

Go to the source code of this file.

Macros

#define _DEFAULT_SOURCE
 

Functions

void Mio_IntallAndLibrary ()
 FUNCTION DEFINITIONS ///.
 
void Mio_IntallSimpleLibrary ()
 
void Mio_IntallSimpleLibrary2 ()
 
void Mio_Init (Abc_Frame_t *pAbc)
 
void Mio_End (Abc_Frame_t *pAbc)
 
void Mio_UpdateGenlib (Mio_Library_t *pLib)
 FUNCTION DEFINITIONS ///.
 
int Mio_UpdateGenlib2 (Vec_Str_t *vStr, Vec_Str_t *vStr2, char *pFileName, int fVerbose)
 

Macro Definition Documentation

◆ _DEFAULT_SOURCE

#define _DEFAULT_SOURCE

CFile****************************************************************

pFileName [mio.c]

PackageName [MVSIS 1.3: Multi-valued logic synthesis system.]

Synopsis [File reading/writing for technology mapping.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - August 18, 2003.]

Revision [

Id
mio.c,v 1.4 2004/08/05 18:34:51 satrajit Exp

]

Definition at line 23 of file mio.c.

Function Documentation

◆ Mio_End()

void Mio_End ( Abc_Frame_t * pAbc)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 226 of file mio.c.

227{
230}
typedefABC_NAMESPACE_HEADER_START struct Amap_Lib_t_ Amap_Lib_t
INCLUDES ///.
Definition amap.h:42
void Amap_LibFree(Amap_Lib_t *p)
Definition amapLib.c:67
ABC_DLL void * Abc_FrameReadLibGen()
Definition mainFrame.c:59
ABC_DLL void * Abc_FrameReadLibGen2()
Definition mainFrame.c:60
struct Mio_LibraryStruct_t_ Mio_Library_t
Definition mio.h:42
void Mio_LibraryDelete(Mio_Library_t *pLib)
DECLARATIONS ///.
Definition mioUtils.c:51
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mio_Init()

void Mio_Init ( Abc_Frame_t * pAbc)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 198 of file mio.c.

199{
200// Cmd_CommandAdd( pAbc, "SC mapping", "read_liberty", Mio_CommandReadLiberty, 0 );
201
202 Cmd_CommandAdd( pAbc, "SC mapping", "read_genlib", Mio_CommandReadGenlib, 0 );
203 Cmd_CommandAdd( pAbc, "SC mapping", "write_genlib", Mio_CommandWriteGenlib, 0 );
204 Cmd_CommandAdd( pAbc, "SC mapping", "print_genlib", Mio_CommandPrintGenlib, 0 );
205
206 Cmd_CommandAdd( pAbc, "SC mapping", "read_profile", Mio_CommandReadProfile, 0 );
207 Cmd_CommandAdd( pAbc, "SC mapping", "write_profile", Mio_CommandWriteProfile, 0 );
208 Cmd_CommandAdd( pAbc, "SC mapping", "print_profile", Mio_CommandPrintProfile, 0 );
209
210 Cmd_CommandAdd( pAbc, "SC mapping", "read_library", Mio_CommandReadGenlib, 0 );
211 Cmd_CommandAdd( pAbc, "SC mapping", "write_library", Mio_CommandWriteGenlib, 0 );
212 Cmd_CommandAdd( pAbc, "SC mapping", "print_library", Mio_CommandPrintGenlib, 0 );
213}
void Cmd_CommandAdd(Abc_Frame_t *pAbc, const char *sGroup, const char *sName, Cmd_CommandFuncType pFunc, int fChanges)
Definition cmdApi.c:63
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mio_IntallAndLibrary()

void Mio_IntallAndLibrary ( )

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 146 of file mio.c.

147{
148 extern Mio_Library_t * Mio_LibraryReadBuffer( char * pBuffer, int fExtendedFormat, st__table * tExcludeGate, int nFaninLimit, int fVerbose );
149 Vec_Str_t * vLibStr = Vec_StrAlloc( 1000 );
150 for ( int i = 0; pAndGenlib[i]; i++ )
151 Vec_StrAppend( vLibStr, pAndGenlib[i] );
152 Vec_Str_t * vLibStr2 = Vec_StrDup( vLibStr );
153 Vec_StrAppend( vLibStr2, ".end\n" );
154 Vec_StrPush( vLibStr2, '\0' );
155 Vec_StrPush( vLibStr, '\0' );
156 Mio_UpdateGenlib2( vLibStr, vLibStr2, "and.genlib", 0 );
157 Vec_StrFree( vLibStr );
158 Vec_StrFree( vLibStr2 );
159}
struct Vec_Str_t_ Vec_Str_t
Definition bblif.c:46
Mio_Library_t * Mio_LibraryReadBuffer(char *pBuffer, int fExtendedFormat, st__table *tExcludeGate, int nFaninLimit, int fVerbose)
Definition mioRead.c:156
int Mio_UpdateGenlib2(Vec_Str_t *vStr, Vec_Str_t *vStr2, char *pFileName, int fVerbose)
Definition mio.c:260
Definition st.h:52
Here is the call graph for this function:

◆ Mio_IntallSimpleLibrary()

void Mio_IntallSimpleLibrary ( )

Definition at line 160 of file mio.c.

161{
162 extern Mio_Library_t * Mio_LibraryReadBuffer( char * pBuffer, int fExtendedFormat, st__table * tExcludeGate, int nFaninLimit, int fVerbose );
163 Mio_Library_t * pLib; int i;
164 Vec_Str_t * vLibStr = Vec_StrAlloc( 1000 );
165 for ( i = 0; pSimpleGenlib[i]; i++ )
166 Vec_StrAppend( vLibStr, pSimpleGenlib[i] );
167 Vec_StrPush( vLibStr, '\0' );
168 pLib = Mio_LibraryReadBuffer( Vec_StrArray(vLibStr), 0, NULL, 0, 0 );
169 Mio_LibrarySetName( pLib, Abc_UtilStrsav("simple.genlib") );
170 Mio_UpdateGenlib( pLib );
171 Vec_StrFree( vLibStr );
172}
void Mio_UpdateGenlib(Mio_Library_t *pLib)
FUNCTION DEFINITIONS ///.
Definition mio.c:243
void Mio_LibrarySetName(Mio_Library_t *pLib, char *pName)
Definition mioApi.c:68
Here is the call graph for this function:

◆ Mio_IntallSimpleLibrary2()

void Mio_IntallSimpleLibrary2 ( )

Definition at line 173 of file mio.c.

174{
175 extern Mio_Library_t * Mio_LibraryReadBuffer( char * pBuffer, int fExtendedFormat, st__table * tExcludeGate, int nFaninLimit, int fVerbose );
176 Mio_Library_t * pLib; int i;
177 Vec_Str_t * vLibStr = Vec_StrAlloc( 1000 );
178 for ( i = 0; pSimpleGenlib2[i]; i++ )
179 Vec_StrAppend( vLibStr, pSimpleGenlib2[i] );
180 Vec_StrPush( vLibStr, '\0' );
181 pLib = Mio_LibraryReadBuffer( Vec_StrArray(vLibStr), 0, NULL, 0, 0 );
182 Mio_LibrarySetName( pLib, Abc_UtilStrsav("simple2.genlib") );
183 Mio_UpdateGenlib( pLib );
184 Vec_StrFree( vLibStr );
185}
Here is the call graph for this function:

◆ Mio_UpdateGenlib()

void Mio_UpdateGenlib ( Mio_Library_t * pLib)

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 243 of file mio.c.

244{
245 // free the current superlib because it depends on the old Mio library
246 if ( Abc_FrameReadLibSuper() )
247 {
249 Abc_FrameSetLibSuper( NULL );
250 }
251
252 // replace the current library
254 Abc_FrameSetLibGen( pLib );
255
256 // replace the current library
258 Abc_FrameSetLibGen2( NULL );
259}
ABC_DLL void Abc_FrameSetLibGen(void *pLib)
Definition mainFrame.c:95
ABC_DLL void Abc_FrameSetLibSuper(void *pLib)
Definition mainFrame.c:97
ABC_DLL void Abc_FrameSetLibGen2(void *pLib)
Definition mainFrame.c:96
ABC_DLL void * Abc_FrameReadLibSuper()
Definition mainFrame.c:61
struct Map_SuperLibStruct_t_ Map_SuperLib_t
Definition mapper.h:46
void Map_SuperLibFree(Map_SuperLib_t *p)
Definition mapperLib.c:170
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mio_UpdateGenlib2()

int Mio_UpdateGenlib2 ( Vec_Str_t * vStr,
Vec_Str_t * vStr2,
char * pFileName,
int fVerbose )

Definition at line 260 of file mio.c.

261{
262 Mio_Library_t * pLib;
263 // set the new network
264 pLib = Mio_LibraryRead( pFileName, Vec_StrArray(vStr), NULL, 0, fVerbose );
265 if ( pLib == NULL )
266 return 0;
267
268 // free the current superlib because it depends on the old Mio library
269 if ( Abc_FrameReadLibSuper() )
270 {
272 Abc_FrameSetLibSuper( NULL );
273 }
274
275 // replace the current library
277 Abc_FrameSetLibGen( pLib );
278
279 // set the new network
280 pLib = (Mio_Library_t *)Amap_LibReadAndPrepare( pFileName, Vec_StrArray(vStr2), 0, 0 );
281 if ( pLib == NULL )
282 return 0;
283
284 // replace the current library
286 Abc_FrameSetLibGen2( pLib );
287 return 1;
288}
Amap_Lib_t * Amap_LibReadAndPrepare(char *pFileName, char *pBuffer, int fVerbose, int fVeryVerbose)
Definition amapLib.c:332
Mio_Library_t * Mio_LibraryRead(char *FileName, char *pBuffer, char *ExcludeFile, int nFaninLimit, int fVerbose)
Definition mioRead.c:54
Here is the call graph for this function:
Here is the caller graph for this function: