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
fdfb8888
Commit
fdfb8888
authored
Mar 28, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with don't-cares.
parent
2ccd0f9b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
5 deletions
+15
-5
src/base/acb/acb.h
+0
-0
src/base/acb/acbAbc.c
+14
-4
src/base/acb/acbMfs.c
+0
-0
src/base/acb/acbUtil.c
+0
-0
src/sat/cnf/cnfMan.c
+1
-1
No files found.
src/base/acb/acb.h
View file @
fdfb8888
This diff is collapsed.
Click to expand it.
src/base/acb/acbAbc.c
View file @
fdfb8888
...
@@ -46,15 +46,25 @@ ABC_NAMESPACE_IMPL_START
...
@@ -46,15 +46,25 @@ ABC_NAMESPACE_IMPL_START
***********************************************************************/
***********************************************************************/
Acb_Ntk_t
*
Acb_NtkFromAbc
(
Abc_Ntk_t
*
p
)
Acb_Ntk_t
*
Acb_NtkFromAbc
(
Abc_Ntk_t
*
p
)
{
{
int
fTrack
=
1
;
Acb_Man_t
*
pMan
=
Acb_ManAlloc
(
Abc_NtkSpec
(
p
),
1
,
NULL
,
NULL
,
NULL
,
NULL
);
Acb_Man_t
*
pMan
=
Acb_ManAlloc
(
Abc_NtkSpec
(
p
),
1
,
NULL
,
NULL
,
NULL
,
NULL
);
int
i
,
k
,
NameId
=
Abc_NamStrFindOrAdd
(
pMan
->
pStrs
,
Abc_NtkName
(
p
),
NULL
);
int
i
,
k
,
NameId
=
Abc_NamStrFindOrAdd
(
pMan
->
pStrs
,
Abc_NtkName
(
p
),
NULL
);
Acb_Ntk_t
*
pNtk
=
Acb_NtkAlloc
(
pMan
,
NameId
,
Abc_NtkCiNum
(
p
),
Abc_NtkCoNum
(
p
),
Abc_NtkObjNum
(
p
)
);
Acb_Ntk_t
*
pNtk
=
Acb_NtkAlloc
(
pMan
,
NameId
,
Abc_NtkCiNum
(
p
),
Abc_NtkCoNum
(
p
),
Abc_NtkObjNum
(
p
)
);
Abc_Obj_t
*
pObj
,
*
pFanin
;
Abc_Obj_t
*
pObj
,
*
pFanin
;
assert
(
Abc_NtkIsSopLogic
(
p
)
);
assert
(
Abc_NtkIsSopLogic
(
p
)
);
pNtk
->
nFaninMax
=
6
;
if
(
fTrack
)
Vec_IntFill
(
&
pNtk
->
vArray2
,
Abc_NtkObjNumMax
(
p
),
-
1
);
Abc_NtkForEachCi
(
p
,
pObj
,
i
)
Abc_NtkForEachCi
(
p
,
pObj
,
i
)
{
pObj
->
iTemp
=
Acb_ObjAlloc
(
pNtk
,
ABC_OPER_CI
,
0
,
0
);
pObj
->
iTemp
=
Acb_ObjAlloc
(
pNtk
,
ABC_OPER_CI
,
0
,
0
);
if
(
fTrack
)
Vec_IntWriteEntry
(
&
pNtk
->
vArray2
,
pObj
->
iTemp
,
Abc_ObjId
(
pObj
)
);
}
Abc_NtkForEachNode
(
p
,
pObj
,
i
)
Abc_NtkForEachNode
(
p
,
pObj
,
i
)
{
pObj
->
iTemp
=
Acb_ObjAlloc
(
pNtk
,
ABC_OPER_LUT
,
Abc_ObjFaninNum
(
pObj
),
0
);
pObj
->
iTemp
=
Acb_ObjAlloc
(
pNtk
,
ABC_OPER_LUT
,
Abc_ObjFaninNum
(
pObj
),
0
);
if
(
fTrack
)
Vec_IntWriteEntry
(
&
pNtk
->
vArray2
,
pObj
->
iTemp
,
Abc_ObjId
(
pObj
)
);
// printf( "%d -> %d\n%s", i, pObj->iTemp, (char *)pObj->pData );
}
Abc_NtkForEachCo
(
p
,
pObj
,
i
)
Abc_NtkForEachCo
(
p
,
pObj
,
i
)
pObj
->
iTemp
=
Acb_ObjAlloc
(
pNtk
,
ABC_OPER_CO
,
1
,
0
);
pObj
->
iTemp
=
Acb_ObjAlloc
(
pNtk
,
ABC_OPER_CO
,
1
,
0
);
Abc_NtkForEachNode
(
p
,
pObj
,
i
)
Abc_NtkForEachNode
(
p
,
pObj
,
i
)
...
@@ -199,8 +209,8 @@ void Acb_ParSetDefault( Acb_Par_t * pPars )
...
@@ -199,8 +209,8 @@ void Acb_ParSetDefault( Acb_Par_t * pPars )
{
{
memset
(
pPars
,
0
,
sizeof
(
Acb_Par_t
)
);
memset
(
pPars
,
0
,
sizeof
(
Acb_Par_t
)
);
pPars
->
nLutSize
=
4
;
// LUT size
pPars
->
nLutSize
=
4
;
// LUT size
pPars
->
nTfoLevMax
=
3
;
// the maximum fanout levels
pPars
->
nTfoLevMax
=
1
;
// the maximum fanout levels
pPars
->
nTfiLevMax
=
3
;
// the maximum fanin levels
pPars
->
nTfiLevMax
=
2
;
// the maximum fanin levels
pPars
->
nFanoutMax
=
10
;
// the maximum number of fanouts
pPars
->
nFanoutMax
=
10
;
// the maximum number of fanouts
pPars
->
nDivMax
=
16
;
// the maximum divisor count
pPars
->
nDivMax
=
16
;
// the maximum divisor count
pPars
->
nTabooMax
=
4
;
// the minimum MFFC size
pPars
->
nTabooMax
=
4
;
// the minimum MFFC size
...
@@ -208,7 +218,7 @@ void Acb_ParSetDefault( Acb_Par_t * pPars )
...
@@ -208,7 +218,7 @@ void Acb_ParSetDefault( Acb_Par_t * pPars )
pPars
->
nBTLimit
=
0
;
// the maximum number of conflicts in one SAT run
pPars
->
nBTLimit
=
0
;
// the maximum number of conflicts in one SAT run
pPars
->
nNodesMax
=
0
;
// the maximum number of nodes to try
pPars
->
nNodesMax
=
0
;
// the maximum number of nodes to try
pPars
->
iNodeOne
=
0
;
// one particular node to try
pPars
->
iNodeOne
=
0
;
// one particular node to try
pPars
->
fArea
=
0
;
// performs optimization for area
pPars
->
fArea
=
1
;
// performs optimization for area
pPars
->
fMoreEffort
=
0
;
// enables using more effort
pPars
->
fMoreEffort
=
0
;
// enables using more effort
pPars
->
fVerbose
=
0
;
// enable basic stats
pPars
->
fVerbose
=
0
;
// enable basic stats
pPars
->
fVeryVerbose
=
0
;
// enable detailed stats
pPars
->
fVeryVerbose
=
0
;
// enable detailed stats
...
@@ -230,7 +240,7 @@ Abc_Ntk_t * Abc_NtkOptMfse( Abc_Ntk_t * pNtk, Acb_Par_t * pPars )
...
@@ -230,7 +240,7 @@ Abc_Ntk_t * Abc_NtkOptMfse( Abc_Ntk_t * pNtk, Acb_Par_t * pPars )
extern
void
Acb_NtkOpt
(
Acb_Ntk_t
*
p
,
Acb_Par_t
*
pPars
);
extern
void
Acb_NtkOpt
(
Acb_Ntk_t
*
p
,
Acb_Par_t
*
pPars
);
Abc_Ntk_t
*
pNtkNew
;
Abc_Ntk_t
*
pNtkNew
;
Acb_Ntk_t
*
p
=
Acb_NtkFromAbc
(
pNtk
);
Acb_Ntk_t
*
p
=
Acb_NtkFromAbc
(
pNtk
);
//
Acb_NtkOpt( p, pPars );
Acb_NtkOpt
(
p
,
pPars
);
pNtkNew
=
Acb_NtkToAbc
(
pNtk
,
p
);
pNtkNew
=
Acb_NtkToAbc
(
pNtk
,
p
);
Acb_ManFree
(
p
->
pDesign
);
Acb_ManFree
(
p
->
pDesign
);
return
pNtkNew
;
return
pNtkNew
;
...
...
src/base/acb/acbMfs.c
View file @
fdfb8888
This diff is collapsed.
Click to expand it.
src/base/acb/acbUtil.c
View file @
fdfb8888
This diff is collapsed.
Click to expand it.
src/sat/cnf/cnfMan.c
View file @
fdfb8888
...
@@ -251,7 +251,7 @@ void Cnf_DataPrint( Cnf_Dat_t * p, int fReadable )
...
@@ -251,7 +251,7 @@ void Cnf_DataPrint( Cnf_Dat_t * p, int fReadable )
for
(
i
=
0
;
i
<
p
->
nClauses
;
i
++
)
for
(
i
=
0
;
i
<
p
->
nClauses
;
i
++
)
{
{
for
(
pLit
=
p
->
pClauses
[
i
],
pStop
=
p
->
pClauses
[
i
+
1
];
pLit
<
pStop
;
pLit
++
)
for
(
pLit
=
p
->
pClauses
[
i
],
pStop
=
p
->
pClauses
[
i
+
1
];
pLit
<
pStop
;
pLit
++
)
fprintf
(
pFile
,
"%
d "
,
fReadable
?
Cnf_Lit2Var2
(
*
pLit
)
:
Cnf_Lit2Var
(
*
pLit
)
);
fprintf
(
pFile
,
"%
s%d "
,
Abc_LitIsCompl
(
*
pLit
)
?
"-"
:
""
,
fReadable
?
Abc_Lit2Var
(
*
pLit
)
:
Abc_Lit2Var
(
*
pLit
)
+
1
);
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
"
\n
"
);
}
}
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
"
\n
"
);
...
...
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