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
cad3d8d4
Commit
cad3d8d4
authored
Jun 07, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support bit-blasting of shifts with more than 32 bits.
parent
820a48b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
6 deletions
+30
-6
src/base/wlc/wlcBlast.c
+30
-6
No files found.
src/base/wlc/wlcBlast.c
View file @
cad3d8d4
...
@@ -121,13 +121,11 @@ int Wlc_NtkMuxTree_rec( Gia_Man_t * pNew, int * pCtrl, int nCtrl, Vec_Int_t * vD
...
@@ -121,13 +121,11 @@ int Wlc_NtkMuxTree_rec( Gia_Man_t * pNew, int * pCtrl, int nCtrl, Vec_Int_t * vD
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Wlc_BlastShiftRight
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pShift
,
int
nShift
,
int
fSticky
,
Vec_Int_t
*
vRes
)
void
Wlc_BlastShiftRight
Int
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pShift
,
int
nShift
,
int
fSticky
,
Vec_Int_t
*
vRes
)
{
{
int
*
pRes
=
Wlc_VecCopy
(
vRes
,
pNum
,
nNum
);
int
*
pRes
=
Wlc_VecCopy
(
vRes
,
pNum
,
nNum
);
int
Fill
=
fSticky
?
pNum
[
nNum
-
1
]
:
0
;
int
Fill
=
fSticky
?
pNum
[
nNum
-
1
]
:
0
;
int
i
,
j
,
fShort
=
0
;
int
i
,
j
,
fShort
=
0
;
if
(
nShift
>
32
)
nShift
=
32
;
assert
(
nShift
<=
32
);
assert
(
nShift
<=
32
);
for
(
i
=
0
;
i
<
nShift
;
i
++
)
for
(
i
=
0
;
i
<
nShift
;
i
++
)
for
(
j
=
0
;
j
<
nNum
-
fSticky
;
j
++
)
for
(
j
=
0
;
j
<
nNum
-
fSticky
;
j
++
)
...
@@ -142,13 +140,25 @@ void Wlc_BlastShiftRight( Gia_Man_t * pNew, int * pNum, int nNum, int * pShift,
...
@@ -142,13 +140,25 @@ void Wlc_BlastShiftRight( Gia_Man_t * pNew, int * pNum, int nNum, int * pShift,
pRes
[
j
]
=
Gia_ManHashMux
(
pNew
,
pShift
[
i
],
pRes
[
j
+
(
1
<<
i
)],
pRes
[
j
]
);
pRes
[
j
]
=
Gia_ManHashMux
(
pNew
,
pShift
[
i
],
pRes
[
j
+
(
1
<<
i
)],
pRes
[
j
]
);
}
}
}
}
void
Wlc_BlastShiftLeft
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pShift
,
int
nShift
,
int
fSticky
,
Vec_Int_t
*
vRes
)
void
Wlc_BlastShiftRight
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pShift
,
int
nShift
,
int
fSticky
,
Vec_Int_t
*
vRes
)
{
int
nShiftMax
=
Abc_Base2Log
(
nNum
);
if
(
nShiftMax
<
nShift
)
{
int
i
,
iRes
=
pShift
[
nShiftMax
];
for
(
i
=
nShiftMax
+
1
;
i
<
nShift
;
i
++
)
iRes
=
Gia_ManHashOr
(
pNew
,
iRes
,
pShift
[
i
]
);
pShift
[
nShiftMax
]
=
iRes
;
}
else
nShiftMax
=
nShift
;
Wlc_BlastShiftRightInt
(
pNew
,
pNum
,
nNum
,
pShift
,
nShiftMax
,
fSticky
,
vRes
);
}
void
Wlc_BlastShiftLeftInt
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pShift
,
int
nShift
,
int
fSticky
,
Vec_Int_t
*
vRes
)
{
{
int
*
pRes
=
Wlc_VecCopy
(
vRes
,
pNum
,
nNum
);
int
*
pRes
=
Wlc_VecCopy
(
vRes
,
pNum
,
nNum
);
int
Fill
=
fSticky
?
pNum
[
0
]
:
0
;
int
Fill
=
fSticky
?
pNum
[
0
]
:
0
;
int
i
,
j
,
fShort
=
0
;
int
i
,
j
,
fShort
=
0
;
if
(
nShift
>
32
)
nShift
=
32
;
assert
(
nShift
<=
32
);
assert
(
nShift
<=
32
);
for
(
i
=
0
;
i
<
nShift
;
i
++
)
for
(
i
=
0
;
i
<
nShift
;
i
++
)
for
(
j
=
nNum
-
1
;
j
>=
fSticky
;
j
--
)
for
(
j
=
nNum
-
1
;
j
>=
fSticky
;
j
--
)
...
@@ -163,6 +173,20 @@ void Wlc_BlastShiftLeft( Gia_Man_t * pNew, int * pNum, int nNum, int * pShift, i
...
@@ -163,6 +173,20 @@ void Wlc_BlastShiftLeft( Gia_Man_t * pNew, int * pNum, int nNum, int * pShift, i
pRes
[
j
]
=
Gia_ManHashMux
(
pNew
,
pShift
[
i
],
pRes
[
j
-
(
1
<<
i
)],
pRes
[
j
]
);
pRes
[
j
]
=
Gia_ManHashMux
(
pNew
,
pShift
[
i
],
pRes
[
j
-
(
1
<<
i
)],
pRes
[
j
]
);
}
}
}
}
void
Wlc_BlastShiftLeft
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pShift
,
int
nShift
,
int
fSticky
,
Vec_Int_t
*
vRes
)
{
int
nShiftMax
=
Abc_Base2Log
(
nNum
);
if
(
nShiftMax
<
nShift
)
{
int
i
,
iRes
=
pShift
[
nShiftMax
];
for
(
i
=
nShiftMax
+
1
;
i
<
nShift
;
i
++
)
iRes
=
Gia_ManHashOr
(
pNew
,
iRes
,
pShift
[
i
]
);
pShift
[
nShiftMax
]
=
iRes
;
}
else
nShiftMax
=
nShift
;
Wlc_BlastShiftLeftInt
(
pNew
,
pNum
,
nNum
,
pShift
,
nShiftMax
,
fSticky
,
vRes
);
}
void
Wlc_BlastRotateRight
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pShift
,
int
nShift
,
Vec_Int_t
*
vRes
)
void
Wlc_BlastRotateRight
(
Gia_Man_t
*
pNew
,
int
*
pNum
,
int
nNum
,
int
*
pShift
,
int
nShift
,
Vec_Int_t
*
vRes
)
{
{
int
*
pRes
=
Wlc_VecCopy
(
vRes
,
pNum
,
nNum
);
int
*
pRes
=
Wlc_VecCopy
(
vRes
,
pNum
,
nNum
);
...
...
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