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
e601df9d
Commit
e601df9d
authored
Sep 14, 2016
by
Mathias Soeken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some fixes in BMS.
parent
bb8e1808
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
src/base/abci/abcExact.c
+13
-9
No files found.
src/base/abci/abcExact.c
View file @
e601df9d
...
...
@@ -2197,19 +2197,19 @@ static int Ses_ManFindNetworkExact( Ses_Man_t * pSes, int nGates )
}
// is there a network for a given number of gates
/* return: (2: continue, 1: found, 0: gave up) */
/* return: (
3: impossible,
2: continue, 1: found, 0: gave up) */
static
int
Ses_ManFindNetworkExactCEGAR
(
Ses_Man_t
*
pSes
,
int
nGates
,
char
**
pSol
)
{
int
f
First
=
0
,
f
Res
,
iMint
,
fSat
;
int
fRes
,
iMint
,
fSat
;
word
pTruth
[
4
];
/* debug */
Abc_DebugErase
(
pSes
->
nDebugOffset
+
(
nGates
>
10
?
5
:
4
),
pSes
->
fVeryVerbose
&&
!
fFirst
);
Abc_DebugErase
(
pSes
->
nDebugOffset
+
(
nGates
>
10
?
5
:
4
),
pSes
->
fVeryVerbose
);
Abc_DebugPrintIntInt
(
" (%d/%d)"
,
nGates
,
pSes
->
nMaxGates
,
pSes
->
fVeryVerbose
);
/* do #gates and max depth allow for a network? */
if
(
!
Ses_CheckGatesConsistency
(
pSes
,
nGates
)
)
return
0
;
return
3
;
fRes
=
Ses_ManFindNetworkExact
(
pSes
,
nGates
);
if
(
fRes
!=
1
)
return
fRes
;
...
...
@@ -2256,26 +2256,26 @@ static char * Ses_ManFindMinimumSizeBottomUp( Ses_Man_t * pSes )
memset
(
pSes
->
pTtValues
,
0
,
4
*
sizeof
(
word
)
);
Abc_DebugPrintIntInt
(
" (%d/%d)"
,
nGates
,
pSes
->
nMaxGates
,
pSes
->
fVeryVerbose
);
while
(
true
)
{
++
nGates
;
fRes
=
Ses_ManFindNetworkExactCEGAR
(
pSes
,
nGates
,
&
pSol
);
printf
(
"fRes = %d
\n
"
,
fRes
);
if
(
fRes
==
0
)
{
pSes
->
fHitResLimit
=
1
;
break
;
}
else
if
(
fRes
==
1
)
else
if
(
fRes
==
1
||
fRes
==
3
)
break
;
}
Abc_DebugErase
(
pSes
->
nDebugOffset
+
(
nGates
>=
10
?
5
:
4
),
pSes
->
fVeryVerbose
);
return
fRes
?
pSol
:
NULL
;
return
pSol
;
}
static
char
*
Ses_ManFindMinimumSizeTopDown
(
Ses_Man_t
*
pSes
,
int
nMinGates
)
...
...
@@ -2285,6 +2285,8 @@ static char * Ses_ManFindMinimumSizeTopDown( Ses_Man_t * pSes, int nMinGates )
pSes
->
fHitResLimit
=
0
;
Abc_DebugPrintIntInt
(
" (%d/%d)"
,
nGates
,
pSes
->
nMaxGates
,
pSes
->
fVeryVerbose
);
while
(
true
)
{
fRes
=
Ses_ManFindNetworkExactCEGAR
(
pSes
,
nGates
,
&
pSol2
);
...
...
@@ -2294,7 +2296,7 @@ static char * Ses_ManFindMinimumSizeTopDown( Ses_Man_t * pSes, int nMinGates )
pSes
->
fHitResLimit
=
1
;
break
;
}
else
if
(
fRes
==
2
)
else
if
(
fRes
==
2
||
fRes
==
3
)
break
;
pSol
=
pSol2
;
...
...
@@ -2305,6 +2307,8 @@ static char * Ses_ManFindMinimumSizeTopDown( Ses_Man_t * pSes, int nMinGates )
--
nGates
;
}
Abc_DebugErase
(
pSes
->
nDebugOffset
+
(
nGates
>=
10
?
5
:
4
),
pSes
->
fVeryVerbose
);
return
pSol
;
}
...
...
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