ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
scl.c File Reference
#include "sclSize.h"
#include "base/main/mainInt.h"
#include "misc/util/utilNam.h"
#include "sclCon.h"
#include "map/mio/mio.h"
Include dependency graph for scl.c:

Go to the source code of this file.

Functions

Scl_Con_tScl_ConReadMan ()
 
void Abc_SclLoad (SC_Lib *pLib, SC_Lib **ppScl)
 FUNCTION DEFINITIONS ///.
 
void Scl_Init (Abc_Frame_t *pAbc)
 
void Scl_End (Abc_Frame_t *pAbc)
 
SC_LibScl_ReadLibraryFile (Abc_Frame_t *pAbc, char *pFileName, int fVerbose, int fVeryVerbose, SC_DontUse dont_use, int fSkipMultiOuts)
 

Function Documentation

◆ Abc_SclLoad()

void Abc_SclLoad ( SC_Lib * pLib,
SC_Lib ** ppScl )

FUNCTION DEFINITIONS ///.

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

Synopsis [Updating library in the frameframe.]

Description []

SideEffects []

SeeAlso []

Definition at line 79 of file scl.c.

80{
81 if ( *ppScl )
82 {
83 Abc_SclLibFree( *ppScl );
84 *ppScl = NULL;
85 }
86 assert( *ppScl == NULL );
87 if ( pLib )
88 *(SC_Lib **)ppScl = pLib;
89}
struct SC_Lib_ SC_Lib
Definition sclLib.h:128
#define assert(ex)
Definition util_old.h:213
Here is the caller graph for this function:

◆ Scl_ConReadMan()

Scl_Con_t * Scl_ConReadMan ( )

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

Synopsis [External APIs.]

Description []

SideEffects []

SeeAlso []

Definition at line 62 of file scl.c.

62{ return Scl_ConGetMan( Abc_FrameGetGlobalFrame() ); }
ABC_DLL Abc_Frame_t * Abc_FrameGetGlobalFrame()
Definition mainFrame.c:643
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Scl_End()

void Scl_End ( Abc_Frame_t * pAbc)

Definition at line 127 of file scl.c.

128{
129 Abc_SclLoad( NULL, (SC_Lib **)&pAbc->pLibScl );
130 Scl_ConUpdateMan( pAbc, NULL );
131}
void Abc_SclLoad(SC_Lib *pLib, SC_Lib **ppScl)
FUNCTION DEFINITIONS ///.
Definition scl.c:79
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Scl_Init()

void Scl_Init ( Abc_Frame_t * pAbc)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 102 of file scl.c.

103{
104 Cmd_CommandAdd( pAbc, "SCL mapping", "read_lib", Scl_CommandReadLib, 0 );
105 Cmd_CommandAdd( pAbc, "SCL mapping", "write_lib", Scl_CommandWriteLib, 0 );
106 Cmd_CommandAdd( pAbc, "SCL mapping", "print_lib", Scl_CommandPrintLib, 0 );
107 Cmd_CommandAdd( pAbc, "SCL mapping", "leak2area", Scl_CommandLeak2Area, 0 );
108 Cmd_CommandAdd( pAbc, "SCL mapping", "read_scl", Scl_CommandReadScl, 0 );
109 Cmd_CommandAdd( pAbc, "SCL mapping", "write_scl", Scl_CommandWriteScl, 0 );
110 Cmd_CommandAdd( pAbc, "SCL mapping", "dump_genlib", Scl_CommandDumpGen, 0 );
111 Cmd_CommandAdd( pAbc, "SCL mapping", "print_gs", Scl_CommandPrintGS, 0 );
112 Cmd_CommandAdd( pAbc, "SCL mapping", "stime", Scl_CommandStime, 0 );
113 Cmd_CommandAdd( pAbc, "SCL mapping", "topo", Scl_CommandTopo, 1 );
114 Cmd_CommandAdd( pAbc, "SCL mapping", "unbuffer", Scl_CommandUnBuffer, 1 );
115 Cmd_CommandAdd( pAbc, "SCL mapping", "buffer", Scl_CommandBuffer, 1 );
116// Cmd_CommandAdd( pAbc, "SCL mapping", "_buffer", Scl_CommandBufferOld, 1 );
117 Cmd_CommandAdd( pAbc, "SCL mapping", "minsize", Scl_CommandMinsize, 1 );
118 Cmd_CommandAdd( pAbc, "SCL mapping", "maxsize", Scl_CommandMaxsize, 1 );
119 Cmd_CommandAdd( pAbc, "SCL mapping", "upsize", Scl_CommandUpsize, 1 );
120 Cmd_CommandAdd( pAbc, "SCL mapping", "dnsize", Scl_CommandDnsize, 1 );
121 Cmd_CommandAdd( pAbc, "SCL mapping", "print_buf", Scl_CommandPrintBuf, 0 );
122 Cmd_CommandAdd( pAbc, "SCL mapping", "read_constr", Scl_CommandReadConstr, 0 );
123 Cmd_CommandAdd( pAbc, "SCL mapping", "write_constr", Scl_CommandWriteConstr, 0 );
124 Cmd_CommandAdd( pAbc, "SCL mapping", "print_constr", Scl_CommandPrintConstr, 0 );
125 Cmd_CommandAdd( pAbc, "SCL mapping", "reset_constr", Scl_CommandResetConstr, 0 );
126}
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:

◆ Scl_ReadLibraryFile()

SC_Lib * Scl_ReadLibraryFile ( Abc_Frame_t * pAbc,
char * pFileName,
int fVerbose,
int fVeryVerbose,
SC_DontUse dont_use,
int fSkipMultiOuts )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 144 of file scl.c.

145{
146 SC_Lib * pLib;
147 FILE * pFile;
148 if ( (pFile = fopen( pFileName, "rb" )) == NULL )
149 {
150 fprintf( pAbc->Err, "Cannot open input file \"%s\". \n", pFileName );
151 return NULL;
152 }
153 fclose( pFile );
154 // read new library
155 pLib = Abc_SclReadLiberty( pFileName, fVerbose, fVeryVerbose, dont_use, fSkipMultiOuts);
156 if ( pLib == NULL )
157 {
158 fprintf( pAbc->Err, "Reading SCL library from file \"%s\" has failed. \n", pFileName );
159 return NULL;
160 }
161 return pLib;
162}
SC_Lib * Abc_SclReadLiberty(char *pFileName, int fVerbose, int fVeryVerbose, SC_DontUse dont_use, int fSkipMultiOuts)
Here is the call graph for this function: