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
9e515ae3
Commit
9e515ae3
authored
Dec 06, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
An improvement to 'twoexact' and 'lutexact'.
parent
67181d04
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
1 deletions
+50
-1
src/sat/bmc/bmcMaj2.c
+50
-1
No files found.
src/sat/bmc/bmcMaj2.c
View file @
9e515ae3
...
...
@@ -939,7 +939,7 @@ static int Exa3_ManMarkup( Exa3_Man_t * p )
}
}
printf
(
"The number of parameter variables = %d.
\n
"
,
p
->
iVar
);
return
p
->
iVar
;
//
return p->iVar;
// printout
// for ( i = p->nVars; i < p->nObjs; i++ )
for
(
i
=
p
->
nObjs
-
1
;
i
>=
p
->
nVars
;
i
--
)
...
...
@@ -955,6 +955,54 @@ static int Exa3_ManMarkup( Exa3_Man_t * p )
}
return
p
->
iVar
;
}
static
int
Exa3_ManInitPolarityFindVar
(
Exa3_Man_t
*
p
,
int
i
,
int
k
,
int
*
pIndex
)
{
int
iVar
;
do
{
iVar
=
p
->
VarMarks
[
i
][
k
][
*
pIndex
];
*
pIndex
=
(
*
pIndex
+
1
)
%
p
->
nVars
;
}
while
(
iVar
<=
0
);
//intf( "Setting var %d.\n", iVar );
return
iVar
;
}
static
void
Exa3_ManInitPolarity
(
Exa3_Man_t
*
p
)
{
int
i
,
k
,
iVar
,
nInputs
=
0
;
for
(
i
=
p
->
nVars
;
i
<
p
->
nObjs
;
i
++
)
{
// create AND-gate
int
iVarStart
=
1
+
p
->
LutMask
*
(
i
-
p
->
nVars
);
iVar
=
iVarStart
+
p
->
LutMask
-
1
;
p
->
pSat
->
polarity
[
iVar
]
=
1
;
//printf( "Setting var %d.\n", iVar );
}
for
(
i
=
p
->
nVars
;
i
<
p
->
nObjs
;
i
++
)
{
// connect first fanin to previous
if
(
i
==
p
->
nVars
)
{
for
(
k
=
p
->
nLutSize
-
1
;
k
>=
0
;
k
--
)
{
iVar
=
Exa3_ManInitPolarityFindVar
(
p
,
i
,
k
,
&
nInputs
);
p
->
pSat
->
polarity
[
iVar
]
=
1
;
}
}
else
{
for
(
k
=
p
->
nLutSize
-
1
;
k
>
0
;
k
--
)
{
iVar
=
Exa3_ManInitPolarityFindVar
(
p
,
i
,
k
,
&
nInputs
);
p
->
pSat
->
polarity
[
iVar
]
=
1
;
}
iVar
=
p
->
VarMarks
[
i
][
0
][
i
-
1
];
if
(
iVar
<=
0
)
printf
(
"Variable mapping error.
\n
"
),
fflush
(
stdout
);
assert
(
iVar
>
0
);
p
->
pSat
->
polarity
[
iVar
]
=
1
;
//intf( "Setting var %d.\n", iVar );
}
//intf( "\n" );
}
}
static
Exa3_Man_t
*
Exa3_ManAlloc
(
int
nVars
,
int
nNodes
,
int
nLutSize
,
word
*
pTruth
)
{
Exa3_Man_t
*
p
=
ABC_CALLOC
(
Exa3_Man_t
,
1
);
...
...
@@ -970,6 +1018,7 @@ static Exa3_Man_t * Exa3_ManAlloc( int nVars, int nNodes, int nLutSize, word * p
p
->
vInfo
=
Exa3_ManTruthTables
(
p
);
p
->
pSat
=
sat_solver_new
();
sat_solver_setnvars
(
p
->
pSat
,
p
->
iVar
);
Exa3_ManInitPolarity
(
p
);
return
p
;
}
static
void
Exa3_ManFree
(
Exa3_Man_t
*
p
)
...
...
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