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
398c4ec9
Commit
398c4ec9
authored
Dec 27, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates to delay optimization project.
parent
ac3216cf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
254 additions
and
48 deletions
+254
-48
src/opt/sbd/sbdCore.c
+134
-24
src/opt/sbd/sbdInt.h
+1
-0
src/opt/sbd/sbdLut.c
+84
-24
src/opt/sbd/sbdWin.c
+35
-0
No files found.
src/opt/sbd/sbdCore.c
View file @
398c4ec9
This diff is collapsed.
Click to expand it.
src/opt/sbd/sbdInt.h
View file @
398c4ec9
...
...
@@ -66,6 +66,7 @@ struct Sbd_Str_t_
int
fLut
;
// LUT or SEL
int
nVarIns
;
// input count
int
VarIns
[
SBD_DIV_MAX
];
// input vars
word
Res
;
// result of solving
};
////////////////////////////////////////////////////////////////////////
...
...
src/opt/sbd/sbdLut.c
View file @
398c4ec9
This diff is collapsed.
Click to expand it.
src/opt/sbd/sbdWin.c
View file @
398c4ec9
...
...
@@ -141,6 +141,17 @@ sat_solver * Sbd_ManSatSolver( sat_solver * pSat, Gia_Man_t * p, Vec_Int_t * vMi
}
assert
(
sat_solver_nvars
(
pSat
)
==
nVars
+
nAddVars
);
}
else
if
(
fQbf
)
{
int
n
,
pLits
[
2
];
for
(
n
=
0
;
n
<
2
;
n
++
)
{
pLits
[
0
]
=
Abc_Var2Lit
(
PivotVar
,
n
);
pLits
[
1
]
=
Abc_Var2Lit
(
LastVar
,
n
);
RetValue
=
sat_solver_addclause
(
pSat
,
pLits
,
pLits
+
2
);
assert
(
RetValue
);
}
}
// finalize
RetValue
=
sat_solver_simplify
(
pSat
);
if
(
RetValue
==
0
)
...
...
@@ -418,6 +429,30 @@ int Sbd_ManCollectConstants( sat_solver * pSat, int nCareMints[2], int PivotVar,
return
-
1
;
}
int
Sbd_ManCollectConstantsNew
(
sat_solver
*
pSat
,
Vec_Int_t
*
vDivVars
,
int
nConsts
,
int
PivotVar
,
word
*
pOnset
,
word
*
pOffset
)
{
int
nBTLimit
=
0
;
int
n
,
i
,
k
,
status
,
iLit
,
iVar
;
word
*
pPats
[
2
]
=
{
pOnset
,
pOffset
};
assert
(
Vec_IntSize
(
vDivVars
)
<
64
);
for
(
n
=
0
;
n
<
2
;
n
++
)
for
(
i
=
0
;
i
<
nConsts
;
i
++
)
{
sat_solver_random_polarity
(
pSat
);
iLit
=
Abc_Var2Lit
(
PivotVar
,
n
);
status
=
sat_solver_solve
(
pSat
,
&
iLit
,
&
iLit
+
1
,
nBTLimit
,
0
,
0
,
0
);
if
(
status
==
l_Undef
)
return
-
2
;
if
(
status
==
l_False
)
return
n
;
pPats
[
n
][
i
]
=
((
word
)
!
n
)
<<
Vec_IntSize
(
vDivVars
);
Vec_IntForEachEntry
(
vDivVars
,
iVar
,
k
)
if
(
sat_solver_var_value
(
pSat
,
iVar
)
)
Abc_TtXorBit
(
&
pPats
[
n
][
i
],
k
);
}
return
-
1
;
}
////////////////////////////////////////////////////////////////////////
/// 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