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
043cfcd7
Commit
043cfcd7
authored
Sep 18, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Concurrency for Boolean matching.
parent
023e92c4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
331 additions
and
65 deletions
+331
-65
src/aig/gia/giaKf.c
+10
-2
src/base/abci/abc.c
+45
-11
src/base/cmd/cmdStarter.c
+1
-1
src/base/wlc/wlcReadVer.c
+1
-1
src/map/if/if.h
+1
-1
src/map/if/ifDsd.c
+219
-3
src/map/if/ifTest.c
+10
-2
src/map/if/ifTune.c
+33
-41
src/proof/abs/absPth.c
+1
-1
src/proof/cec/cecSplit.c
+10
-2
No files found.
src/aig/gia/giaKf.c
View file @
043cfcd7
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#include "gia.h"
#include "gia.h"
#include "misc/vec/vecSet.h"
#include "misc/vec/vecSet.h"
//
#ifdef ABC_USE_PTHREADS
#ifdef ABC_USE_PTHREADS
#ifdef _WIN32
#ifdef _WIN32
#include "../lib/pthread.h"
#include "../lib/pthread.h"
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#include <unistd.h>
#include <unistd.h>
#endif
#endif
//
#endif
#endif
ABC_NAMESPACE_IMPL_START
ABC_NAMESPACE_IMPL_START
...
@@ -38,6 +38,13 @@ ABC_NAMESPACE_IMPL_START
...
@@ -38,6 +38,13 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
#ifndef ABC_USE_PTHREADS
void
Kf_ManSetDefaultPars
(
Jf_Par_t
*
pPars
)
{}
Gia_Man_t
*
Kf_ManPerformMapping
(
Gia_Man_t
*
pGia
,
Jf_Par_t
*
pPars
)
{
return
NULL
;
}
#else // pthreads are used
#define KF_LEAF_MAX 16
#define KF_LEAF_MAX 16
#define KF_CUT_MAX 32
#define KF_CUT_MAX 32
#define KF_PROC_MAX 32
#define KF_PROC_MAX 32
...
@@ -1328,6 +1335,7 @@ Gia_Man_t * Kf_ManPerformMapping( Gia_Man_t * pGia, Jf_Par_t * pPars )
...
@@ -1328,6 +1335,7 @@ Gia_Man_t * Kf_ManPerformMapping( Gia_Man_t * pGia, Jf_Par_t * pPars )
/// END OF FILE ///
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
#endif // pthreads are used
ABC_NAMESPACE_IMPL_END
ABC_NAMESPACE_IMPL_END
src/base/abci/abc.c
View file @
043cfcd7
...
@@ -15489,7 +15489,14 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -15489,7 +15489,14 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
return
0
;
}
}
if
(
p
==
NULL
)
if
(
p
==
NULL
)
{
if
(
LutSize
>
DAU_MAX_VAR
||
pPars
->
nLutSize
>
DAU_MAX_VAR
)
{
printf
(
"Size of required DSD manager (%d) exceeds the precompiled limit (%d) (change parameter DAU_MAX_VAR).
\n
"
,
LutSize
,
DAU_MAX_VAR
);
return
0
;
}
Abc_FrameSetManDsd
(
If_DsdManAlloc
(
pPars
->
nLutSize
,
LutSize
)
);
Abc_FrameSetManDsd
(
If_DsdManAlloc
(
pPars
->
nLutSize
,
LutSize
)
);
}
}
}
if
(
pPars
->
fUserRecLib
)
if
(
pPars
->
fUserRecLib
)
...
@@ -15913,7 +15920,7 @@ int Abc_CommandDsdFree( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -15913,7 +15920,7 @@ int Abc_CommandDsdFree( Abc_Frame_t * pAbc, int argc, char ** argv )
{
{
if
(
!
Abc_FrameReadManDsd2
()
)
if
(
!
Abc_FrameReadManDsd2
()
)
{
{
Abc_Print
(
1
,
"The DSD manager is not started.
\n
"
);
Abc_Print
(
-
1
,
"The DSD manager is not started.
\n
"
);
return
0
;
return
0
;
}
}
Abc_FrameSetManDsd2
(
NULL
);
Abc_FrameSetManDsd2
(
NULL
);
...
@@ -15922,7 +15929,7 @@ int Abc_CommandDsdFree( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -15922,7 +15929,7 @@ int Abc_CommandDsdFree( Abc_Frame_t * pAbc, int argc, char ** argv )
{
{
if
(
!
Abc_FrameReadManDsd
()
)
if
(
!
Abc_FrameReadManDsd
()
)
{
{
Abc_Print
(
1
,
"The DSD manager is not started.
\n
"
);
Abc_Print
(
-
1
,
"The DSD manager is not started.
\n
"
);
return
0
;
return
0
;
}
}
Abc_FrameSetManDsd
(
NULL
);
Abc_FrameSetManDsd
(
NULL
);
...
@@ -16000,7 +16007,7 @@ int Abc_CommandDsdPs( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -16000,7 +16007,7 @@ int Abc_CommandDsdPs( Abc_Frame_t * pAbc, int argc, char ** argv )
{
{
if
(
!
Abc_FrameReadManDsd2
()
)
if
(
!
Abc_FrameReadManDsd2
()
)
{
{
Abc_Print
(
1
,
"The DSD manager is not started.
\n
"
);
Abc_Print
(
-
1
,
"The DSD manager is not started.
\n
"
);
return
0
;
return
0
;
}
}
If_DsdManPrint
(
(
If_DsdMan_t
*
)
Abc_FrameReadManDsd2
(),
NULL
,
Number
,
Support
,
fOccurs
,
fTtDump
,
fVerbose
);
If_DsdManPrint
(
(
If_DsdMan_t
*
)
Abc_FrameReadManDsd2
(),
NULL
,
Number
,
Support
,
fOccurs
,
fTtDump
,
fVerbose
);
...
@@ -16009,7 +16016,7 @@ int Abc_CommandDsdPs( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -16009,7 +16016,7 @@ int Abc_CommandDsdPs( Abc_Frame_t * pAbc, int argc, char ** argv )
{
{
if
(
!
Abc_FrameReadManDsd
()
)
if
(
!
Abc_FrameReadManDsd
()
)
{
{
Abc_Print
(
1
,
"The DSD manager is not started.
\n
"
);
Abc_Print
(
-
1
,
"The DSD manager is not started.
\n
"
);
return
0
;
return
0
;
}
}
If_DsdManPrint
(
(
If_DsdMan_t
*
)
Abc_FrameReadManDsd
(),
NULL
,
Number
,
Support
,
fOccurs
,
fTtDump
,
fVerbose
);
If_DsdManPrint
(
(
If_DsdMan_t
*
)
Abc_FrameReadManDsd
(),
NULL
,
Number
,
Support
,
fOccurs
,
fTtDump
,
fVerbose
);
...
@@ -16043,10 +16050,10 @@ usage:
...
@@ -16043,10 +16050,10 @@ usage:
int
Abc_CommandDsdTune
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandDsdTune
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
char
*
pStruct
=
NULL
;
char
*
pStruct
=
NULL
;
int
c
,
fVerbose
=
0
,
fFast
=
0
,
fAdd
=
0
,
fSpec
=
0
,
LutSize
=
0
,
nConfls
=
10000
;
int
c
,
fVerbose
=
0
,
fFast
=
0
,
fAdd
=
0
,
fSpec
=
0
,
LutSize
=
0
,
nConfls
=
10000
,
nProcs
=
1
;
If_DsdMan_t
*
pDsdMan
=
(
If_DsdMan_t
*
)
Abc_FrameReadManDsd
();
If_DsdMan_t
*
pDsdMan
=
(
If_DsdMan_t
*
)
Abc_FrameReadManDsd
();
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KCSfasvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KC
P
Sfasvh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -16070,6 +16077,15 @@ int Abc_CommandDsdTune( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -16070,6 +16077,15 @@ int Abc_CommandDsdTune( Abc_Frame_t * pAbc, int argc, char ** argv )
nConfls
=
atoi
(
argv
[
globalUtilOptind
]);
nConfls
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
globalUtilOptind
++
;
break
;
break
;
case
'P'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-P
\"
should be followed by a floating point number.
\n
"
);
goto
usage
;
}
nProcs
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
break
;
case
'S'
:
case
'S'
:
if
(
globalUtilOptind
>=
argc
)
if
(
globalUtilOptind
>=
argc
)
{
{
...
@@ -16099,20 +16115,21 @@ int Abc_CommandDsdTune( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -16099,20 +16115,21 @@ int Abc_CommandDsdTune( Abc_Frame_t * pAbc, int argc, char ** argv )
}
}
if
(
!
Abc_FrameReadManDsd
()
)
if
(
!
Abc_FrameReadManDsd
()
)
{
{
Abc_Print
(
1
,
"The DSD manager is not started.
\n
"
);
Abc_Print
(
-
1
,
"The DSD manager is not started.
\n
"
);
return
0
;
return
0
;
}
}
if
(
pStruct
)
if
(
pStruct
)
Id_DsdManTuneStr
(
pDsdMan
,
pStruct
,
nConfls
,
fVerbose
);
Id_DsdManTuneStr
(
pDsdMan
,
pStruct
,
nConfls
,
nProcs
,
fVerbose
);
else
else
If_DsdManTune
(
pDsdMan
,
LutSize
,
fFast
,
fAdd
,
fSpec
,
fVerbose
);
If_DsdManTune
(
pDsdMan
,
LutSize
,
fFast
,
fAdd
,
fSpec
,
fVerbose
);
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: dsd_tune [-KC num] [-fasvh] [-S str]
\n
"
);
Abc_Print
(
-
2
,
"usage: dsd_tune [-KC
P
num] [-fasvh] [-S str]
\n
"
);
Abc_Print
(
-
2
,
"
\t
tunes DSD manager for the given LUT size
\n
"
);
Abc_Print
(
-
2
,
"
\t
tunes DSD manager for the given LUT size
\n
"
);
Abc_Print
(
-
2
,
"
\t
-K num : LUT size used for tuning [default = %d]
\n
"
,
LutSize
);
Abc_Print
(
-
2
,
"
\t
-K num : LUT size used for tuning [default = %d]
\n
"
,
LutSize
);
Abc_Print
(
-
2
,
"
\t
-C num : the maximum number of conflicts [default = %d]
\n
"
,
nConfls
);
Abc_Print
(
-
2
,
"
\t
-C num : the maximum number of conflicts [default = %d]
\n
"
,
nConfls
);
Abc_Print
(
-
2
,
"
\t
-P num : the maximum number of processes [default = %d]
\n
"
,
nProcs
);
Abc_Print
(
-
2
,
"
\t
-f : toggles using fast check [default = %s]
\n
"
,
fFast
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-f : toggles using fast check [default = %s]
\n
"
,
fFast
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggles adding tuning to the current one [default = %s]
\n
"
,
fAdd
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggles adding tuning to the current one [default = %s]
\n
"
,
fAdd
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggles using specialized check [default = %s]
\n
"
,
fSpec
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggles using specialized check [default = %s]
\n
"
,
fSpec
?
"yes"
:
"no"
);
...
@@ -16153,7 +16170,7 @@ int Abc_CommandDsdMerge( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -16153,7 +16170,7 @@ int Abc_CommandDsdMerge( Abc_Frame_t * pAbc, int argc, char ** argv )
}
}
if
(
!
Abc_FrameReadManDsd
()
)
if
(
!
Abc_FrameReadManDsd
()
)
{
{
Abc_Print
(
1
,
"The DSD manager is not started.
\n
"
);
Abc_Print
(
-
1
,
"The DSD manager is not started.
\n
"
);
return
0
;
return
0
;
}
}
pArgvNew
=
argv
+
globalUtilOptind
;
pArgvNew
=
argv
+
globalUtilOptind
;
...
@@ -16223,7 +16240,7 @@ int Abc_CommandDsdClean( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -16223,7 +16240,7 @@ int Abc_CommandDsdClean( Abc_Frame_t * pAbc, int argc, char ** argv )
}
}
if
(
!
Abc_FrameReadManDsd
()
)
if
(
!
Abc_FrameReadManDsd
()
)
{
{
Abc_Print
(
1
,
"The DSD manager is not started.
\n
"
);
Abc_Print
(
-
1
,
"The DSD manager is not started.
\n
"
);
return
0
;
return
0
;
}
}
If_DsdManClean
(
(
If_DsdMan_t
*
)
Abc_FrameReadManDsd
(),
fVerbose
);
If_DsdManClean
(
(
If_DsdMan_t
*
)
Abc_FrameReadManDsd
(),
fVerbose
);
...
@@ -30804,6 +30821,16 @@ int Abc_CommandAbc9Dsdb( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -30804,6 +30821,16 @@ int Abc_CommandAbc9Dsdb( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Abc_CommandAbc9Dsdb(): There is no AIG.
\n
"
);
Abc_Print
(
-
1
,
"Abc_CommandAbc9Dsdb(): There is no AIG.
\n
"
);
return
1
;
return
1
;
}
}
if
(
nLutSize
>
DAU_MAX_VAR
)
{
printf
(
"Abc_CommandAbc9Dsdb(): Size of the required DSD manager (%d) exceeds the precompiled limit (%d) (change parameter DAU_MAX_VAR).
\n
"
,
nLutSize
,
DAU_MAX_VAR
);
return
0
;
}
if
(
Abc_FrameReadManDsd2
()
&&
nLutSize
>
If_DsdManVarNum
(
Abc_FrameReadManDsd2
())
)
{
printf
(
"Abc_CommandAbc9Dsdb(): Incompatible size of the DSD manager (run
\"
dsd_free -b
\"
).
\n
"
);
return
0
;
}
if
(
nLevelMax
||
nTimeWindow
)
if
(
nLevelMax
||
nTimeWindow
)
pTemp
=
Gia_ManPerformDsdBalanceWin
(
pAbc
->
pGia
,
nLevelMax
,
nTimeWindow
,
nLutSize
,
nCutNum
,
nRelaxRatio
,
fVerbose
);
pTemp
=
Gia_ManPerformDsdBalanceWin
(
pAbc
->
pGia
,
nLevelMax
,
nTimeWindow
,
nLutSize
,
nCutNum
,
nRelaxRatio
,
fVerbose
);
else
else
...
@@ -31329,7 +31356,14 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -31329,7 +31356,14 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
return
0
;
}
}
if
(
p
==
NULL
)
if
(
p
==
NULL
)
{
if
(
LutSize
>
DAU_MAX_VAR
||
pPars
->
nLutSize
>
DAU_MAX_VAR
)
{
printf
(
"Size of required DSD manager (%d) exceeds the precompiled limit (%d) (change parameter DAU_MAX_VAR).
\n
"
,
LutSize
,
DAU_MAX_VAR
);
return
0
;
}
Abc_FrameSetManDsd
(
If_DsdManAlloc
(
pPars
->
nLutSize
,
LutSize
)
);
Abc_FrameSetManDsd
(
If_DsdManAlloc
(
pPars
->
nLutSize
,
LutSize
)
);
}
}
}
if
(
pPars
->
fUserRecLib
)
if
(
pPars
->
fUserRecLib
)
src/base/cmd/cmdStarter.c
View file @
043cfcd7
...
@@ -248,7 +248,7 @@ void Cmd_RunStarter( char * pFileName, char * pBinary, char * pCommand, int nCor
...
@@ -248,7 +248,7 @@ void Cmd_RunStarter( char * pFileName, char * pBinary, char * pCommand, int nCor
fflush
(
stdout
);
fflush
(
stdout
);
}
}
#endif
#endif
// pthreads are used
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
/// END OF FILE ///
...
...
src/base/wlc/wlcReadVer.c
View file @
043cfcd7
...
@@ -134,7 +134,7 @@ int Wlc_PrsWriteErrorMessage( Wlc_Prs_t * p, char * pCur, const char * format, .
...
@@ -134,7 +134,7 @@ int Wlc_PrsWriteErrorMessage( Wlc_Prs_t * p, char * pCur, const char * format, .
break
;
break
;
sprintf
(
p
->
sError
,
"%s (line %d): %s
\n
"
,
p
->
pFileName
,
iLine
+
1
,
pMessage
);
sprintf
(
p
->
sError
,
"%s (line %d): %s
\n
"
,
p
->
pFileName
,
iLine
+
1
,
pMessage
);
}
}
free
(
pMessage
);
ABC_FREE
(
pMessage
);
return
0
;
return
0
;
}
}
void
Wlc_PrsPrintErrorMessage
(
Wlc_Prs_t
*
p
)
void
Wlc_PrsPrintErrorMessage
(
Wlc_Prs_t
*
p
)
...
...
src/map/if/if.h
View file @
043cfcd7
...
@@ -539,7 +539,7 @@ extern If_DsdMan_t * If_DsdManAlloc( int nVars, int nLutSize );
...
@@ -539,7 +539,7 @@ extern If_DsdMan_t * If_DsdManAlloc( int nVars, int nLutSize );
extern
void
If_DsdManAllocIsops
(
If_DsdMan_t
*
p
,
int
nLutSize
);
extern
void
If_DsdManAllocIsops
(
If_DsdMan_t
*
p
,
int
nLutSize
);
extern
void
If_DsdManPrint
(
If_DsdMan_t
*
p
,
char
*
pFileName
,
int
Number
,
int
Support
,
int
fOccurs
,
int
fTtDump
,
int
fVerbose
);
extern
void
If_DsdManPrint
(
If_DsdMan_t
*
p
,
char
*
pFileName
,
int
Number
,
int
Support
,
int
fOccurs
,
int
fTtDump
,
int
fVerbose
);
extern
void
If_DsdManTune
(
If_DsdMan_t
*
p
,
int
LutSize
,
int
fFast
,
int
fAdd
,
int
fSpec
,
int
fVerbose
);
extern
void
If_DsdManTune
(
If_DsdMan_t
*
p
,
int
LutSize
,
int
fFast
,
int
fAdd
,
int
fSpec
,
int
fVerbose
);
extern
void
Id_DsdManTuneStr
(
If_DsdMan_t
*
p
,
char
*
pStruct
,
int
nConfls
,
int
fVerbose
);
extern
void
Id_DsdManTuneStr
(
If_DsdMan_t
*
p
,
char
*
pStruct
,
int
nConfls
,
int
nProcs
,
int
fVerbose
);
extern
void
If_DsdManFree
(
If_DsdMan_t
*
p
,
int
fVerbose
);
extern
void
If_DsdManFree
(
If_DsdMan_t
*
p
,
int
fVerbose
);
extern
void
If_DsdManSave
(
If_DsdMan_t
*
p
,
char
*
pFileName
);
extern
void
If_DsdManSave
(
If_DsdMan_t
*
p
,
char
*
pFileName
);
extern
If_DsdMan_t
*
If_DsdManLoad
(
char
*
pFileName
);
extern
If_DsdMan_t
*
If_DsdManLoad
(
char
*
pFileName
);
...
...
src/map/if/ifDsd.c
View file @
043cfcd7
This diff is collapsed.
Click to expand it.
src/map/if/ifTest.c
View file @
043cfcd7
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#include "if.h"
#include "if.h"
#include "aig/gia/gia.h"
#include "aig/gia/gia.h"
//
#ifdef ABC_USE_PTHREADS
#ifdef ABC_USE_PTHREADS
#ifdef _WIN32
#ifdef _WIN32
#include "../lib/pthread.h"
#include "../lib/pthread.h"
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#include <unistd.h>
#include <unistd.h>
#endif
#endif
//
#endif
#endif
ABC_NAMESPACE_IMPL_START
ABC_NAMESPACE_IMPL_START
...
@@ -38,6 +38,12 @@ ABC_NAMESPACE_IMPL_START
...
@@ -38,6 +38,12 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
#ifndef ABC_USE_PTHREADS
// do nothing
#else // pthreads are used
static
inline
word
*
Gia_ParTestObj
(
Gia_Man_t
*
p
,
int
Id
)
{
return
(
word
*
)
p
->
pData
+
Id
*
p
->
iData
;
}
static
inline
word
*
Gia_ParTestObj
(
Gia_Man_t
*
p
,
int
Id
)
{
return
(
word
*
)
p
->
pData
+
Id
*
p
->
iData
;
}
static
inline
void
Gia_ParTestAlloc
(
Gia_Man_t
*
p
,
int
nWords
)
{
assert
(
!
p
->
pData
);
p
->
pData
=
(
unsigned
*
)
ABC_ALLOC
(
word
,
Gia_ManObjNum
(
p
)
*
nWords
);
p
->
iData
=
nWords
;
}
static
inline
void
Gia_ParTestAlloc
(
Gia_Man_t
*
p
,
int
nWords
)
{
assert
(
!
p
->
pData
);
p
->
pData
=
(
unsigned
*
)
ABC_ALLOC
(
word
,
Gia_ManObjNum
(
p
)
*
nWords
);
p
->
iData
=
nWords
;
}
static
inline
void
Gia_ParTestFree
(
Gia_Man_t
*
p
)
{
ABC_FREE
(
p
->
pData
);
p
->
iData
=
0
;
}
static
inline
void
Gia_ParTestFree
(
Gia_Man_t
*
p
)
{
ABC_FREE
(
p
->
pData
);
p
->
iData
=
0
;
}
...
@@ -339,6 +345,8 @@ void Gia_ParTest( Gia_Man_t * p, int nWords, int nProcs )
...
@@ -339,6 +345,8 @@ void Gia_ParTest( Gia_Man_t * p, int nWords, int nProcs )
/// END OF FILE ///
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
#endif // pthreads are used
ABC_NAMESPACE_IMPL_END
ABC_NAMESPACE_IMPL_END
src/map/if/ifTune.c
View file @
043cfcd7
...
@@ -166,6 +166,10 @@ int Ifn_NtkLutSizeMax( Ifn_Ntk_t * p )
...
@@ -166,6 +166,10 @@ int Ifn_NtkLutSizeMax( Ifn_Ntk_t * p )
LutSize
=
Abc_MaxInt
(
LutSize
,
(
int
)
p
->
Nodes
[
i
].
nFanins
);
LutSize
=
Abc_MaxInt
(
LutSize
,
(
int
)
p
->
Nodes
[
i
].
nFanins
);
return
LutSize
;
return
LutSize
;
}
}
int
Ifn_NtkInputNum
(
Ifn_Ntk_t
*
p
)
{
return
p
->
nInps
;
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -240,18 +244,24 @@ int Ifn_ManStrCheck( char * pStr, int * pnInps, int * pnObjs )
...
@@ -240,18 +244,24 @@ int Ifn_ManStrCheck( char * pStr, int * pnInps, int * pnObjs )
*
pnObjs
=
MaxDef
;
*
pnObjs
=
MaxDef
;
return
1
;
return
1
;
}
}
Ifn_Ntk_t
*
Ifn_NtkParse
(
char
*
pStr
)
int
Ifn_ErrorMessage
(
const
char
*
format
,
...
)
{
char
*
pMessage
;
va_list
args
;
va_start
(
args
,
format
);
pMessage
=
vnsprintf
(
format
,
args
);
va_end
(
args
);
printf
(
"%s"
,
pMessage
);
ABC_FREE
(
pMessage
);
return
0
;
}
int
Ifn_NtkParseInt
(
char
*
pStr
,
Ifn_Ntk_t
*
p
)
{
{
int
i
,
k
,
n
,
f
,
nFans
,
iFan
;
int
i
,
k
,
n
,
f
,
nFans
,
iFan
;
static
Ifn_Ntk_t
P
,
*
p
=
&
P
;
memset
(
p
,
0
,
sizeof
(
Ifn_Ntk_t
)
);
if
(
!
Ifn_ManStrCheck
(
pStr
,
&
p
->
nInps
,
&
p
->
nObjs
)
)
if
(
!
Ifn_ManStrCheck
(
pStr
,
&
p
->
nInps
,
&
p
->
nObjs
)
)
return
NULL
;
return
0
;
if
(
p
->
nInps
>
IFN_INS
)
if
(
p
->
nInps
>
IFN_INS
)
{
return
Ifn_ErrorMessage
(
"The number of variables (%d) exceeds predefined limit (%d). Recompile with different value of IFN_INS.
\n
"
,
p
->
nInps
,
IFN_INS
);
printf
(
"The number of variables (%d) exceeds predefined limit (%d). Recompile with different value of IFN_INS.
\n
"
,
p
->
nInps
,
IFN_INS
);
return
NULL
;
}
assert
(
p
->
nInps
>
1
&&
p
->
nInps
<
p
->
nObjs
&&
p
->
nInps
<=
IFN_INS
&&
p
->
nObjs
<
2
*
IFN_INS
);
assert
(
p
->
nInps
>
1
&&
p
->
nInps
<
p
->
nObjs
&&
p
->
nInps
<=
IFN_INS
&&
p
->
nObjs
<
2
*
IFN_INS
);
for
(
i
=
p
->
nInps
;
i
<
p
->
nObjs
;
i
++
)
for
(
i
=
p
->
nInps
;
i
<
p
->
nObjs
;
i
++
)
{
{
...
@@ -260,10 +270,7 @@ Ifn_Ntk_t * Ifn_NtkParse( char * pStr )
...
@@ -260,10 +270,7 @@ Ifn_Ntk_t * Ifn_NtkParse( char * pStr )
if
(
pStr
[
k
]
==
'a'
+
i
&&
pStr
[
k
+
1
]
==
'='
)
if
(
pStr
[
k
]
==
'a'
+
i
&&
pStr
[
k
+
1
]
==
'='
)
break
;
break
;
if
(
pStr
[
k
]
==
0
)
if
(
pStr
[
k
]
==
0
)
{
return
Ifn_ErrorMessage
(
"Cannot find definition of signal %c.
\n
"
,
'a'
+
i
);
printf
(
"Cannot find definition of signal %c.
\n
"
,
'a'
+
i
);
return
NULL
;
}
if
(
pStr
[
k
+
2
]
==
'('
)
if
(
pStr
[
k
+
2
]
==
'('
)
p
->
Nodes
[
i
].
Type
=
IF_DSD_AND
,
Next
=
')'
;
p
->
Nodes
[
i
].
Type
=
IF_DSD_AND
,
Next
=
')'
;
else
if
(
pStr
[
k
+
2
]
==
'['
)
else
if
(
pStr
[
k
+
2
]
==
'['
)
...
@@ -273,32 +280,20 @@ Ifn_Ntk_t * Ifn_NtkParse( char * pStr )
...
@@ -273,32 +280,20 @@ Ifn_Ntk_t * Ifn_NtkParse( char * pStr )
else
if
(
pStr
[
k
+
2
]
==
'{'
)
else
if
(
pStr
[
k
+
2
]
==
'{'
)
p
->
Nodes
[
i
].
Type
=
IF_DSD_PRIME
,
Next
=
'}'
;
p
->
Nodes
[
i
].
Type
=
IF_DSD_PRIME
,
Next
=
'}'
;
else
else
{
return
Ifn_ErrorMessage
(
"Cannot find openning operation symbol in the defition of of signal %c.
\n
"
,
'a'
+
i
);
printf
(
"Cannot find openning operation symbol in the defition of of signal %c.
\n
"
,
'a'
+
i
);
return
NULL
;
}
for
(
n
=
k
+
3
;
pStr
[
n
];
n
++
)
for
(
n
=
k
+
3
;
pStr
[
n
];
n
++
)
if
(
pStr
[
n
]
==
Next
)
if
(
pStr
[
n
]
==
Next
)
break
;
break
;
if
(
pStr
[
n
]
==
0
)
if
(
pStr
[
n
]
==
0
)
{
return
Ifn_ErrorMessage
(
"Cannot find closing operation symbol in the defition of of signal %c.
\n
"
,
'a'
+
i
);
printf
(
"Cannot find closing operation symbol in the defition of of signal %c.
\n
"
,
'a'
+
i
);
return
NULL
;
}
nFans
=
n
-
k
-
3
;
nFans
=
n
-
k
-
3
;
if
(
nFans
<
1
||
nFans
>
8
)
if
(
nFans
<
1
||
nFans
>
8
)
{
return
Ifn_ErrorMessage
(
"Cannot find matching operation symbol in the defition of of signal %c.
\n
"
,
'a'
+
i
);
printf
(
"Cannot find matching operation symbol in the defition of of signal %c.
\n
"
,
'a'
+
i
);
return
NULL
;
}
for
(
f
=
0
;
f
<
nFans
;
f
++
)
for
(
f
=
0
;
f
<
nFans
;
f
++
)
{
{
iFan
=
pStr
[
k
+
3
+
f
]
-
'a'
;
iFan
=
pStr
[
k
+
3
+
f
]
-
'a'
;
if
(
iFan
<
0
||
iFan
>=
i
)
if
(
iFan
<
0
||
iFan
>=
i
)
{
return
Ifn_ErrorMessage
(
"Fanin number %d is signal %d is out of range.
\n
"
,
f
,
'a'
+
i
);
printf
(
"Fanin number %d is signal %d is out of range.
\n
"
,
f
,
'a'
+
i
);
return
NULL
;
}
p
->
Nodes
[
i
].
Fanins
[
f
]
=
iFan
;
p
->
Nodes
[
i
].
Fanins
[
f
]
=
iFan
;
}
}
p
->
Nodes
[
i
].
nFanins
=
nFans
;
p
->
Nodes
[
i
].
nFanins
=
nFans
;
...
@@ -316,19 +311,15 @@ Ifn_Ntk_t * Ifn_NtkParse( char * pStr )
...
@@ -316,19 +311,15 @@ Ifn_Ntk_t * Ifn_NtkParse( char * pStr )
}
}
// if ( p->nConstr )
// if ( p->nConstr )
// printf( "Total constraints = %d\n", p->nConstr );
// printf( "Total constraints = %d\n", p->nConstr );
return
1
;
/*
}
// constraints
Ifn_Ntk_t
*
Ifn_NtkParse
(
char
*
pStr
)
p->nConstr = 5;
{
p->pConstr[0] = (0 << 16) | 1;
Ifn_Ntk_t
*
p
=
ABC_CALLOC
(
Ifn_Ntk_t
,
1
);
if
(
Ifn_NtkParseInt
(
pStr
,
p
)
)
p->pConstr[1] = (2 << 16) | 3;
return
p
;
p->pConstr[2] = (3 << 16) | 4;
ABC_FREE
(
p
);
return
NULL
;
p->pConstr[3] = (6 << 16) | 7;
p->pConstr[4] = (7 << 16) | 8;
*/
return
p
;
}
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -805,6 +796,7 @@ void Ifn_NtkRead()
...
@@ -805,6 +796,7 @@ void Ifn_NtkRead()
Dau_DsdPrintFromTruth
(
pTruth
,
nVars
);
Dau_DsdPrintFromTruth
(
pTruth
,
nVars
);
// get the given function
// get the given function
RetValue
=
Ifn_NtkMatch
(
p
,
pTruth
,
nVars
,
0
,
1
,
1
);
RetValue
=
Ifn_NtkMatch
(
p
,
pTruth
,
nVars
,
0
,
1
,
1
);
ABC_FREE
(
p
);
}
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
...
src/proof/abs/absPth.c
View file @
043cfcd7
...
@@ -194,7 +194,7 @@ int Gia_GlaProveCheck( int fVerbose )
...
@@ -194,7 +194,7 @@ int Gia_GlaProveCheck( int fVerbose )
return
1
;
return
1
;
}
}
#endif
#endif
// pthreads are used
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
/// END OF FILE ///
...
...
src/proof/cec/cecSplit.c
View file @
043cfcd7
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#include "misc/util/utilTruth.h"
#include "misc/util/utilTruth.h"
//#include "bdd/cudd/cuddInt.h"
//#include "bdd/cudd/cuddInt.h"
//
#ifdef ABC_USE_PTHREADS
#ifdef ABC_USE_PTHREADS
#ifdef _WIN32
#ifdef _WIN32
#include "../lib/pthread.h"
#include "../lib/pthread.h"
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
#include <unistd.h>
#include <unistd.h>
#endif
#endif
//
#endif
#endif
ABC_NAMESPACE_IMPL_START
ABC_NAMESPACE_IMPL_START
...
@@ -44,6 +44,12 @@ ABC_NAMESPACE_IMPL_START
...
@@ -44,6 +44,12 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
#ifndef ABC_USE_PTHREADS
int
Cec_GiaSplitTest
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
,
int
fVeryVerbose
)
{
return
-
1
;
}
#else // pthreads are used
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
@@ -822,6 +828,8 @@ void Cec_GiaPrintCofStats2( Gia_Man_t * p )
...
@@ -822,6 +828,8 @@ void Cec_GiaPrintCofStats2( Gia_Man_t * p )
}
}
}
}
#endif // pthreads are used
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
...
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