diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2006-06-14 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2006-06-14 08:01:00 -0700 |
commit | 3814121784af2250e2d5f17173b209e74cb7ae45 (patch) | |
tree | 69d4653ccb629e4d7a3c7a0142720db9c2a46682 /src/map/fpga | |
parent | 3db1557f45b03875a0a0b8adddcc15c4565895d2 (diff) | |
download | abc-3814121784af2250e2d5f17173b209e74cb7ae45.tar.gz abc-3814121784af2250e2d5f17173b209e74cb7ae45.tar.bz2 abc-3814121784af2250e2d5f17173b209e74cb7ae45.zip |
Version abc60614
Diffstat (limited to 'src/map/fpga')
-rw-r--r-- | src/map/fpga/fpga.c | 33 | ||||
-rw-r--r-- | src/map/fpga/fpga.h | 2 | ||||
-rw-r--r-- | src/map/fpga/fpgaInt.h | 1 |
3 files changed, 35 insertions, 1 deletions
diff --git a/src/map/fpga/fpga.c b/src/map/fpga/fpga.c index c663aa74..be817713 100644 --- a/src/map/fpga/fpga.c +++ b/src/map/fpga/fpga.c @@ -235,6 +235,39 @@ usage: return 1; /* error exit */ } +/**Function************************************************************* + + Synopsis [Sets simple LUT library.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Fpga_SetSimpleLutLib( int nLutSize ) +{ + Fpga_LutLib_t s_LutLib6 = { "lutlib", 6, {0,1,1,1,1,1,1}, {0,1,1,1,1,1,1} }; + Fpga_LutLib_t s_LutLib5 = { "lutlib", 5, {0,1,1,1,1,1}, {0,1,1,1,1,1} }; + Fpga_LutLib_t s_LutLib4 = { "lutlib", 4, {0,1,1,1,1}, {0,1,1,1,1} }; + Fpga_LutLib_t s_LutLib3 = { "lutlib", 3, {0,1,1,1}, {0,1,1,1} }; + Fpga_LutLib_t * pLutLib; + assert( nLutSize >= 3 && nLutSize <= 6 ); + switch ( nLutSize ) + { + case 3: pLutLib = &s_LutLib3; break; + case 4: pLutLib = &s_LutLib4; break; + case 5: pLutLib = &s_LutLib5; break; + case 6: pLutLib = &s_LutLib6; break; + default: pLutLib = NULL; break; + } + if ( pLutLib == NULL ) + return; + Fpga_LutLibFree( Abc_FrameReadLibLut() ); + Abc_FrameSetLibLut( Fpga_LutLibDup(pLutLib) ); +} + //////////////////////////////////////////////////////////////////////// /// END OF FILE /// //////////////////////////////////////////////////////////////////////// diff --git a/src/map/fpga/fpga.h b/src/map/fpga/fpga.h index bbb95984..ee65f7a8 100644 --- a/src/map/fpga/fpga.h +++ b/src/map/fpga/fpga.h @@ -156,6 +156,8 @@ extern int Fpga_CutVolume( Fpga_Cut_t * pCut ); extern int Fpga_ManCheckConsistency( Fpga_Man_t * p ); extern void Fpga_ManCleanData0( Fpga_Man_t * pMan ); extern Fpga_NodeVec_t * Fpga_CollectNodeTfo( Fpga_Man_t * pMan, Fpga_Node_t * pNode ); +/*=== fpga.c =============================================================*/ +extern void Fpga_SetSimpleLutLib( int nLutSize ); #ifdef __cplusplus } diff --git a/src/map/fpga/fpgaInt.h b/src/map/fpga/fpgaInt.h index 3a35d6dc..318def25 100644 --- a/src/map/fpga/fpgaInt.h +++ b/src/map/fpga/fpgaInt.h @@ -28,7 +28,6 @@ #include <stdlib.h> #include <string.h> #include "extra.h" -#include "fraig.h" #include "fpga.h" //////////////////////////////////////////////////////////////////////// |