Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
72f4dfff
Commit
72f4dfff
authored
Oct 05, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with functional matching.
parent
a1e9f668
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
114 additions
and
5 deletions
+114
-5
abclib.dsp
+4
-0
src/base/abci/abc.c
+7
-5
src/opt/sfm/module.make
+1
-0
src/opt/sfm/sfmDec.c
+0
-0
src/opt/sfm/sfmLib.c
+102
-0
No files found.
abclib.dsp
View file @
72f4dfff
...
@@ -2527,6 +2527,10 @@ SOURCE=.\src\opt\sfm\sfmInt.h
...
@@ -2527,6 +2527,10 @@ SOURCE=.\src\opt\sfm\sfmInt.h
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\src\opt\sfm\sfmLib.c
# End Source File
# Begin Source File
SOURCE=.\src\opt\sfm\sfmNtk.c
SOURCE=.\src\opt\sfm\sfmNtk.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
src/base/abci/abc.c
View file @
72f4dfff
...
@@ -10820,11 +10820,11 @@ int Abc_CommandTestColor( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -10820,11 +10820,11 @@ int Abc_CommandTestColor( Abc_Frame_t * pAbc, int argc, char ** argv )
***********************************************************************/
***********************************************************************/
int
Abc_CommandTest
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandTest
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
//
Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc);
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
int
nCutMax
=
1
;
int
nCutMax
=
1
;
int
nLeafMax
=
4
;
int
nLeafMax
=
4
;
int
nDivMax
=
2
;
int
nDivMax
=
2
;
int
nDecMax
=
2
0
;
int
nDecMax
=
7
0
;
int
nNumOnes
=
4
;
int
nNumOnes
=
4
;
int
fNewAlgo
=
0
;
int
fNewAlgo
=
0
;
int
fNewOrder
=
0
;
int
fNewOrder
=
0
;
...
@@ -10909,13 +10909,13 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -10909,13 +10909,13 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
goto
usage
;
goto
usage
;
}
}
}
}
/*
if
(
pNtk
==
NULL
)
if
(
pNtk
==
NULL
)
{
{
Abc_Print
(
-
1
,
"Empty network.
\n
"
);
Abc_Print
(
-
1
,
"Empty network.
\n
"
);
return
1
;
return
1
;
}
}
/*
if ( Abc_NtkIsStrash(pNtk) )
if ( Abc_NtkIsStrash(pNtk) )
{
{
Abc_Print( -1, "This command works only for logic networks.\n" );
Abc_Print( -1, "This command works only for logic networks.\n" );
...
@@ -11029,9 +11029,11 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -11029,9 +11029,11 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
}
}
{
{
extern
void
Tab_DecomposeTest
();
extern
void
Tab_DecomposeTest
();
extern
void
Sfm_DecTestBench
(
Abc_Ntk_t
*
pNtk
,
int
iNode
);
//Tab_DecomposeTest();
//Tab_DecomposeTest();
extern
void
Cnf_AddCardinConstrTest
();
extern
void
Cnf_AddCardinConstrTest
();
Cnf_AddCardinConstrTest
();
//Cnf_AddCardinConstrTest();
Sfm_DecTestBench
(
pNtk
,
nDecMax
);
}
}
return
0
;
return
0
;
usage:
usage:
src/opt/sfm/module.make
View file @
72f4dfff
SRC
+=
src/opt/sfm/sfmCnf.c
\
SRC
+=
src/opt/sfm/sfmCnf.c
\
src/opt/sfm/sfmCore.c
\
src/opt/sfm/sfmCore.c
\
src/opt/sfm/sfmDec.c
\
src/opt/sfm/sfmDec.c
\
src/opt/sfm/sfmLib.c
\
src/opt/sfm/sfmNtk.c
\
src/opt/sfm/sfmNtk.c
\
src/opt/sfm/sfmSat.c
\
src/opt/sfm/sfmSat.c
\
src/opt/sfm/sfmWin.c
src/opt/sfm/sfmWin.c
src/opt/sfm/sfmDec.c
View file @
72f4dfff
This diff is collapsed.
Click to expand it.
src/opt/sfm/sfmLib.c
0 → 100644
View file @
72f4dfff
/**CFile****************************************************************
FileName [sfmLib.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [SAT-based optimization using internal don't-cares.]
Synopsis [Preprocessing genlib library.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [$Id: sfmLib.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
***********************************************************************/
#include "sfmInt.h"
#include "misc/st/st.h"
#include "map/mio/mio.h"
ABC_NAMESPACE_IMPL_START
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Sfm_DecCreateCnf
(
Vec_Int_t
*
vGateSizes
,
Vec_Wrd_t
*
vGateFuncs
,
Vec_Wec_t
*
vGateCnfs
)
{
Vec_Str_t
*
vCnf
,
*
vCnfBase
;
Vec_Int_t
*
vCover
;
word
uTruth
;
int
i
,
nCubes
;
vCnf
=
Vec_StrAlloc
(
100
);
vCover
=
Vec_IntAlloc
(
100
);
Vec_WrdForEachEntry
(
vGateFuncs
,
uTruth
,
i
)
{
nCubes
=
Sfm_TruthToCnf
(
uTruth
,
Vec_IntEntry
(
vGateSizes
,
i
),
vCover
,
vCnf
);
vCnfBase
=
(
Vec_Str_t
*
)
Vec_WecEntry
(
vGateCnfs
,
i
);
Vec_StrGrow
(
vCnfBase
,
Vec_StrSize
(
vCnf
)
);
memcpy
(
Vec_StrArray
(
vCnfBase
),
Vec_StrArray
(
vCnf
),
Vec_StrSize
(
vCnf
)
);
vCnfBase
->
nSize
=
Vec_StrSize
(
vCnf
);
}
Vec_IntFree
(
vCover
);
Vec_StrFree
(
vCnf
);
}
/**Function*************************************************************
Synopsis [Preprocess the library.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Sfm_LibPreprocess
(
Mio_Library_t
*
pLib
,
Vec_Int_t
*
vGateSizes
,
Vec_Wrd_t
*
vGateFuncs
,
Vec_Wec_t
*
vGateCnfs
,
Vec_Ptr_t
*
vGateHands
)
{
Mio_Gate_t
*
pGate
;
int
nGates
=
Mio_LibraryReadGateNum
(
pLib
);
Vec_IntGrow
(
vGateSizes
,
nGates
);
Vec_WrdGrow
(
vGateFuncs
,
nGates
);
Vec_WecInit
(
vGateCnfs
,
nGates
);
Vec_PtrGrow
(
vGateHands
,
nGates
);
Mio_LibraryForEachGate
(
pLib
,
pGate
)
{
Vec_IntPush
(
vGateSizes
,
Mio_GateReadPinNum
(
pGate
)
);
Vec_WrdPush
(
vGateFuncs
,
Mio_GateReadTruth
(
pGate
)
);
Mio_GateSetValue
(
pGate
,
Vec_PtrSize
(
vGateHands
)
);
Vec_PtrPush
(
vGateHands
,
pGate
);
}
Sfm_DecCreateCnf
(
vGateSizes
,
vGateFuncs
,
vGateCnfs
);
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
ABC_NAMESPACE_IMPL_END
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment