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
8765502e
Commit
8765502e
authored
Jul 01, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Other improvements to bmc2 and bmc3.
parent
5bb7dd60
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
0 deletions
+85
-0
src/aig/saig/saigBmc3.c
+0
-0
src/opt/dar/darCut.c
+85
-0
No files found.
src/aig/saig/saigBmc3.c
View file @
8765502e
This diff is collapsed.
Click to expand it.
src/opt/dar/darCut.c
View file @
8765502e
...
...
@@ -430,6 +430,32 @@ static inline unsigned Dar_CutTruthSwapAdjacentVars( unsigned uTruth, int iVar )
/**Function*************************************************************
Synopsis [Swaps polarity of the variable.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static
inline
unsigned
Dar_CutTruthSwapPolarity
(
unsigned
uTruth
,
int
iVar
)
{
assert
(
iVar
>=
0
&&
iVar
<=
3
);
if
(
iVar
==
0
)
return
((
uTruth
&
0xAAAA
)
>>
1
)
|
((
uTruth
&
0x5555
)
<<
1
);
if
(
iVar
==
1
)
return
((
uTruth
&
0xCCCC
)
>>
2
)
|
((
uTruth
&
0x3333
)
<<
2
);
if
(
iVar
==
2
)
return
((
uTruth
&
0xF0F0
)
>>
4
)
|
((
uTruth
&
0x0F0F
)
<<
4
);
if
(
iVar
==
3
)
return
((
uTruth
&
0xFF00
)
>>
8
)
|
((
uTruth
&
0x00FF
)
<<
8
);
assert
(
0
);
return
0
;
}
/**Function*************************************************************
Synopsis [Expands the truth table according to the phase.]
Description [The input and output truth tables are in pIn/pOut. The current number
...
...
@@ -483,6 +509,65 @@ static inline unsigned Dar_CutTruthShrink( unsigned uTruth, int nVars, unsigned
/**Function*************************************************************
Synopsis [Sort variables by their ID.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
unsigned
Dar_CutSortVars
(
unsigned
uTruth
,
int
*
pVars
)
{
int
i
,
Temp
,
fChange
,
Counter
=
0
;
// replace -1 by large number
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
pVars
[
i
]
==
-
1
)
pVars
[
i
]
=
0x3FFFFFFF
;
else
if
(
Abc_LitIsCompl
(
pVars
[
i
])
)
{
pVars
[
i
]
=
Abc_LitNot
(
pVars
[
i
]
);
uTruth
=
Dar_CutTruthSwapPolarity
(
uTruth
,
i
);
}
}
// permute variables
do
{
fChange
=
0
;
for
(
i
=
0
;
i
<
3
;
i
++
)
{
if
(
pVars
[
i
]
<=
pVars
[
i
+
1
]
)
continue
;
Counter
++
;
fChange
=
1
;
Temp
=
pVars
[
i
];
pVars
[
i
]
=
pVars
[
i
+
1
];
pVars
[
i
+
1
]
=
Temp
;
uTruth
=
Dar_CutTruthSwapAdjacentVars
(
uTruth
,
i
);
}
}
while
(
fChange
);
// replace large number by -1
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
pVars
[
i
]
==
0x3FFFFFFF
)
pVars
[
i
]
=
-
1
;
// printf( "%d ", pVars[i] );
}
// printf( "\n" );
return
uTruth
;
}
/**Function*************************************************************
Synopsis [Performs truth table computation.]
Description []
...
...
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