31static int If_CommandReadLut (
Abc_Frame_t * pAbc,
int argc,
char **argv );
32static int If_CommandPrintLut(
Abc_Frame_t * pAbc,
int argc,
char **argv );
33static int If_CommandReadBox (
Abc_Frame_t * pAbc,
int argc,
char **argv );
34static int If_CommandPrintBox(
Abc_Frame_t * pAbc,
int argc,
char **argv );
35static int If_CommandWriteBox(
Abc_Frame_t * pAbc,
int argc,
char **argv );
36static int If_CommandPrintTim(
Abc_Frame_t * pAbc,
int argc,
char **argv );
56 If_LibLut_t s_LutLib = {
"lutlib", 4, 0, {0,1,1,1,1}, {{0},{1},{1},{1},{1}} };
59 Cmd_CommandAdd( pAbc,
"FPGA mapping",
"read_lut", If_CommandReadLut, 0 );
60 Cmd_CommandAdd( pAbc,
"FPGA mapping",
"print_lut", If_CommandPrintLut, 0 );
62 Cmd_CommandAdd( pAbc,
"FPGA mapping",
"read_box", If_CommandReadBox, 0 );
63 Cmd_CommandAdd( pAbc,
"FPGA mapping",
"print_box", If_CommandPrintBox, 0 );
64 Cmd_CommandAdd( pAbc,
"FPGA mapping",
"write_box", If_CommandWriteBox, 0 );
65 Cmd_CommandAdd( pAbc,
"FPGA mapping",
"print_tim", If_CommandPrintTim, 0 );
96int If_CommandReadLut(
Abc_Frame_t * pAbc,
int argc,
char **argv )
133 if ( (pFile = fopen( FileName,
"r" )) == NULL )
135 fprintf( pErr,
"Cannot open input file \"%s\". ", FileName );
137 fprintf( pErr,
"Did you mean \"%s\"?", FileName );
138 fprintf( pErr,
"\n" );
147 fprintf( pErr,
"Reading LUT library has failed.\n" );
156 fprintf( pErr,
"\nusage: read_lut [-vh]\n");
157 fprintf( pErr,
"\t read the LUT library from the file\n" );
158 fprintf( pErr,
"\t-v : toggles enabling of verbose output [default = %s]\n", (fVerbose?
"yes" :
"no") );
159 fprintf( pErr,
"\t-h : print the command usage\n");
160 fprintf( pErr,
"\t \n");
161 fprintf( pErr,
"\t File format for a LUT library:\n");
162 fprintf( pErr,
"\t (the default library is shown)\n");
163 fprintf( pErr,
"\t \n");
164 fprintf( pErr,
"\t # The area/delay of k-variable LUTs:\n");
165 fprintf( pErr,
"\t # k area delay\n");
166 fprintf( pErr,
"\t 1 1 1\n");
167 fprintf( pErr,
"\t 2 2 2\n");
168 fprintf( pErr,
"\t 3 4 3\n");
169 fprintf( pErr,
"\t 4 8 4\n");
170 fprintf( pErr,
"\t 5 16 5\n");
171 fprintf( pErr,
"\t 6 32 6\n");
186int If_CommandPrintLut(
Abc_Frame_t * pAbc,
int argc,
char **argv )
223 fprintf( pErr,
"\nusage: print_lut [-vh]\n");
224 fprintf( pErr,
"\t print the current LUT library\n" );
225 fprintf( pErr,
"\t-v : toggles enabling of verbose output [default = %s]\n", (fVerbose?
"yes" :
"no") );
226 fprintf( pErr,
"\t-h : print the command usage\n");
241int If_CommandReadBox(
Abc_Frame_t * pAbc,
int argc,
char **argv )
283 if ( (pFile = fopen( FileName,
"r" )) == NULL )
285 fprintf( pErr,
"Cannot open input file \"%s\". ", FileName );
287 fprintf( pErr,
"Did you mean \"%s\"?", FileName );
288 fprintf( pErr,
"\n" );
297 fprintf( pErr,
"Reading box library has failed.\n" );
306 fprintf( pErr,
"\nusage: read_box [-evh]\n");
307 fprintf( pErr,
"\t read the box library from the file\n" );
308 fprintf( pErr,
"\t-e : toggles reading extended format [default = %s]\n", (fExtended?
"yes" :
"no") );
309 fprintf( pErr,
"\t-v : toggles enabling of verbose output [default = %s]\n", (fVerbose?
"yes" :
"no") );
310 fprintf( pErr,
"\t-h : print the command usage\n");
325int If_CommandPrintBox(
Abc_Frame_t * pAbc,
int argc,
char **argv )
362 fprintf( pErr,
"\nusage: print_box [-vh]\n");
363 fprintf( pErr,
"\t print the current box library\n" );
364 fprintf( pErr,
"\t-v : toggles enabling of verbose output [default = %s]\n", (fVerbose?
"yes" :
"no") );
365 fprintf( pErr,
"\t-h : print the command usage\n");
380int If_CommandWriteBox(
Abc_Frame_t * pAbc,
int argc,
char **argv )
415 fprintf( pErr,
"\nusage: write_box [-vh] <file>\n");
416 fprintf( pErr,
"\t write the current box library into a file\n" );
417 fprintf( pErr,
"\t-v : toggles enabling of verbose output [default = %s]\n", (fVerbose?
"yes" :
"no") );
418 fprintf( pErr,
"\t-h : print the command usage\n");
419 fprintf( pErr,
"\t<file> : the output file name\n");
435int If_CommandPrintTim(
Abc_Frame_t * pAbc,
int argc,
char **argv )
456 Abc_Print( -1,
"There is no AIG in the &-space.\n" );
461 Abc_Print( -1,
"The current AIG does not have a timing manager.\n" );
470 Abc_Print( -2,
"\nusage: print_tim [-vh]\n");
471 Abc_Print( -2,
"\t print the timing manager\n" );
472 Abc_Print( -2,
"\t-v : toggles enabling of verbose output [default = %s]\n", (fVerbose?
"yes" :
"no") );
473 Abc_Print( -2,
"\t-h : print the command usage\n");
struct Abc_Ntk_t_ Abc_Ntk_t
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
ABC_DLL void * Abc_FrameReadLibLut()
ABC_DLL void Abc_FrameSetLibBox(void *pLib)
ABC_DLL Abc_Ntk_t * Abc_FrameReadNtk(Abc_Frame_t *p)
ABC_DLL void * Abc_FrameReadLibBox()
ABC_DLL Gia_Man_t * Abc_FrameReadGia(Abc_Frame_t *p)
ABC_DLL FILE * Abc_FrameReadErr(Abc_Frame_t *p)
ABC_DLL FILE * Abc_FrameReadOut(Abc_Frame_t *p)
ABC_DLL void Abc_FrameSetLibLut(void *pLib)
void Cmd_CommandAdd(Abc_Frame_t *pAbc, const char *sGroup, const char *sName, Cmd_CommandFuncType pFunc, int fChanges)
struct Gia_Man_t_ Gia_Man_t
void If_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
void If_End(Abc_Frame_t *pAbc)
struct If_LibBox_t_ If_LibBox_t
If_LibBox_t * If_LibBoxRead2(char *pFileName)
void If_LibBoxPrint(FILE *pFile, If_LibBox_t *p)
void If_LibLutPrint(If_LibLut_t *pLutLib)
void If_LibBoxWrite(char *pFileName, If_LibBox_t *p)
If_LibBox_t * If_LibBoxRead(char *pFileName)
If_LibLut_t * If_LibLutRead(char *FileName)
struct If_LibLut_t_ If_LibLut_t
void If_LibLutFree(If_LibLut_t *pLutLib)
void If_LibBoxFree(If_LibBox_t *p)
If_LibLut_t * If_LibLutDup(If_LibLut_t *p)
typedefABC_NAMESPACE_HEADER_START struct Tim_Man_t_ Tim_Man_t
INCLUDES ///.
void Tim_ManPrintBoxCopy(Tim_Man_t *p)
void Tim_ManPrint(Tim_Man_t *p)