64 Fpga_LutLib_t s_LutLib = {
"lutlib", 4, 0, {0,1,1,1,1}, {{0},{1},{1},{1},{1}} };
141 if ( (pFile = fopen( FileName,
"r" )) == NULL )
143 fprintf( pErr,
"Cannot open input file \"%s\". ", FileName );
145 fprintf( pErr,
"Did you mean \"%s\"?", FileName );
146 fprintf( pErr,
"\n" );
155 fprintf( pErr,
"Reading LUT library has failed.\n" );
164 fprintf( pErr,
"usage: read_lut [-vh]\n");
165 fprintf( pErr,
"\t read the LUT library from the file\n" );
166 fprintf( pErr,
"\t-v : toggles enabling of verbose output [default = %s]\n", (fVerbose?
"yes" :
"no") );
167 fprintf( pErr,
"\t-h : print the command usage\n");
168 fprintf( pErr,
"\t \n");
169 fprintf( pErr,
"\t File format for a LUT library:\n");
170 fprintf( pErr,
"\t (the default library is shown)\n");
171 fprintf( pErr,
"\t \n");
172 fprintf( pErr,
"\t # The area/delay of k-variable LUTs:\n");
173 fprintf( pErr,
"\t # k area delay\n");
174 fprintf( pErr,
"\t 1 1 1\n");
175 fprintf( pErr,
"\t 2 2 2\n");
176 fprintf( pErr,
"\t 3 4 3\n");
177 fprintf( pErr,
"\t 4 8 4\n");
178 fprintf( pErr,
"\t 5 16 5\n");
179 fprintf( pErr,
"\t 6 32 6\n");
234 fprintf( pErr,
"usage: print_lut [-vh]\n");
235 fprintf( pErr,
"\t print the current LUT library\n" );
236 fprintf( pErr,
"\t-v : toggles enabling of verbose output [default = %s]\n", (fVerbose?
"yes" :
"no") );
237 fprintf( pErr,
"\t-h : print the command usage\n");
254 Fpga_LutLib_t s_LutLib10= {
"lutlib",10, 0, {0,1,1,1,1,1,1,1,1,1,1}, {{0},{1},{1},{1},{1},{1},{1},{1},{1},{1},{1}} };
255 Fpga_LutLib_t s_LutLib9 = {
"lutlib", 9, 0, {0,1,1,1,1,1,1,1,1,1}, {{0},{1},{1},{1},{1},{1},{1},{1},{1},{1}} };
256 Fpga_LutLib_t s_LutLib8 = {
"lutlib", 8, 0, {0,1,1,1,1,1,1,1,1}, {{0},{1},{1},{1},{1},{1},{1},{1},{1}} };
257 Fpga_LutLib_t s_LutLib7 = {
"lutlib", 7, 0, {0,1,1,1,1,1,1,1}, {{0},{1},{1},{1},{1},{1},{1},{1}} };
258 Fpga_LutLib_t s_LutLib6 = {
"lutlib", 6, 0, {0,1,1,1,1,1,1}, {{0},{1},{1},{1},{1},{1},{1}} };
259 Fpga_LutLib_t s_LutLib5 = {
"lutlib", 5, 0, {0,1,1,1,1,1}, {{0},{1},{1},{1},{1},{1}} };
260 Fpga_LutLib_t s_LutLib4 = {
"lutlib", 4, 0, {0,1,1,1,1}, {{0},{1},{1},{1},{1}} };
261 Fpga_LutLib_t s_LutLib3 = {
"lutlib", 3, 0, {0,1,1,1}, {{0},{1},{1},{1}} };
263 assert( nLutSize >= 3 && nLutSize <= 10 );
266 case 3: pLutLib = &s_LutLib3;
break;
267 case 4: pLutLib = &s_LutLib4;
break;
268 case 5: pLutLib = &s_LutLib5;
break;
269 case 6: pLutLib = &s_LutLib6;
break;
270 case 7: pLutLib = &s_LutLib7;
break;
271 case 8: pLutLib = &s_LutLib8;
break;
272 case 9: pLutLib = &s_LutLib9;
break;
273 case 10: pLutLib = &s_LutLib10;
break;
274 default: pLutLib = NULL;
break;
276 if ( pLutLib == NULL )
Fpga_LutLib_t * Fpga_LutLibRead(char *FileName, int fVerbose)
ABC_DLL void Abc_FrameSetLibLut(void *pLib)
void Fpga_LutLibPrint(Fpga_LutLib_t *pLutLib)
Fpga_LutLib_t * Fpga_LutLibDup(Fpga_LutLib_t *p)
void Fpga_LutLibFree(Fpga_LutLib_t *p)
void Cmd_CommandAdd(Abc_Frame_t *pAbc, const char *sGroup, const char *sName, Cmd_CommandFuncType pFunc, int fChanges)
void Fpga_End(Abc_Frame_t *pAbc)
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
void Fpga_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_END
static int Fpga_CommandPrintLibrary(Abc_Frame_t *pAbc, int argc, char **argv)
#define ABC_NAMESPACE_IMPL_START
ABC_DLL Abc_Ntk_t * Abc_FrameReadNtk(Abc_Frame_t *p)
static ABC_NAMESPACE_IMPL_START int Fpga_CommandReadLibrary(Abc_Frame_t *pAbc, int argc, char **argv)
DECLARATIONS ///.
ABC_DLL FILE * Abc_FrameReadErr(Abc_Frame_t *p)
void Fpga_SetSimpleLutLib(int nLutSize)
ABC_DLL FILE * Abc_FrameReadOut(Abc_Frame_t *p)
ABC_DLL void * Abc_FrameReadLibLut()