summaryrefslogtreecommitdiffstats
path: root/src/map/if/ifTune.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-03-08 17:37:26 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2014-03-08 17:37:26 -0800
commit31fb2e850625b8bdeb518c7c430e043272aed6c0 (patch)
tree83fd5dd775321e923f8e878af13b6fbdd02fe7c5 /src/map/if/ifTune.c
parent4b0c12eb1e03ac863d09efc643d3253c4bfe3af4 (diff)
downloadabc-31fb2e850625b8bdeb518c7c430e043272aed6c0.tar.gz
abc-31fb2e850625b8bdeb518c7c430e043272aed6c0.tar.bz2
abc-31fb2e850625b8bdeb518c7c430e043272aed6c0.zip
Changes to LUT mappers.
Diffstat (limited to 'src/map/if/ifTune.c')
-rw-r--r--src/map/if/ifTune.c117
1 files changed, 117 insertions, 0 deletions
diff --git a/src/map/if/ifTune.c b/src/map/if/ifTune.c
new file mode 100644
index 00000000..dd4c4eb6
--- /dev/null
+++ b/src/map/if/ifTune.c
@@ -0,0 +1,117 @@
+/**CFile****************************************************************
+
+ FileName [ifTune.c]
+
+ SystemName [ABC: Logic synthesis and verification system.]
+
+ PackageName [FPGA mapping based on priority cuts.]
+
+ Synopsis [Library tuning.]
+
+ Author [Alan Mishchenko]
+
+ Affiliation [UC Berkeley]
+
+ Date [Ver. 1.0. Started - November 21, 2006.]
+
+ Revision [$Id: ifTune.c,v 1.00 2006/11/21 00:00:00 alanmi Exp $]
+
+***********************************************************************/
+
+#include "if.h"
+#include "sat/bsat/satSolver.h"
+
+ABC_NAMESPACE_IMPL_START
+
+////////////////////////////////////////////////////////////////////////
+/// DECLARATIONS ///
+////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////
+/// FUNCTION DEFINITIONS ///
+////////////////////////////////////////////////////////////////////////
+
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+int If_ManStrCheck( char * pStr )
+{
+ int i, Marks[32] = {0}, MaxVar = 0, MaxDef = 0;
+ for ( i = 0; pStr[i]; i++ )
+ {
+ if ( pStr[i] == '=' || pStr[i] == ';' ||
+ pStr[i] == '(' || pStr[i] == ')' ||
+ pStr[i] == '[' || pStr[i] == ']' ||
+ pStr[i] == '<' || pStr[i] == '>' ||
+ pStr[i] == '{' || pStr[i] == '}' )
+ continue;
+ if ( pStr[i] >= 'a' && pStr[i] <= 'z' )
+ {
+ if ( pStr[i+1] == '=' )
+ Marks[pStr[i] - 'a'] = 2, MaxDef = 1 + Abc_MaxInt(MaxDef, pStr[i] - 'a');
+ else
+ Marks[pStr[i] - 'a'] = 1, MaxVar = 1 + Abc_MaxInt(MaxVar, pStr[i] - 'a');
+ continue;
+ }
+ printf( "String \"%s\" contains unrecognized symbol (%c).\n", pStr, pStr[i] );
+ }
+ for ( i = 0; i < MaxDef; i++ )
+ if ( Marks[i] == 0 )
+ printf( "String \"%s\" has no symbol (%c).\n", pStr, 'a' + Marks[i] );
+ for ( i = 0; i < MaxVar; i++ )
+ if ( Marks[i] == 2 )
+ printf( "String \"%s\" defined input symbol (%c).\n", pStr, 'a' + Marks[i] );
+ for ( i = MaxVar; i < MaxDef; i++ )
+ if ( Marks[i] == 1 )
+ printf( "String \"%s\" has no definition for symbol (%c).\n", pStr, 'a' + Marks[i] );
+ return 1;
+}
+
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+sat_solver * If_ManSatBuild( char * pStr )
+{
+ sat_solver * pSat = NULL;
+
+ return pSat;
+}
+
+/**Function*************************************************************
+
+ Synopsis [Test procedure.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void If_ManSatTest()
+{
+}
+
+////////////////////////////////////////////////////////////////////////
+/// END OF FILE ///
+////////////////////////////////////////////////////////////////////////
+
+
+ABC_NAMESPACE_IMPL_END
+