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
6b7aa389
Commit
6b7aa389
authored
Nov 05, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to storing and reusing simulation info.
parent
c610c036
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
13 deletions
+71
-13
src/misc/util/utilIsop.c
+2
-2
src/misc/util/utilTruth.h
+57
-0
src/opt/fret/fretMain.c
+2
-2
src/opt/fret/fretTime.c
+9
-9
src/opt/sfm/sfmDec.c
+0
-0
src/opt/sfm/sfmInt.h
+1
-0
No files found.
src/misc/util/utilIsop.c
View file @
6b7aa389
...
@@ -790,7 +790,7 @@ word Abc_EsopCheck( word * pOn, int nVars, word CostLim, int * pCover )
...
@@ -790,7 +790,7 @@ word Abc_EsopCheck( word * pOn, int nVars, word CostLim, int * pCover )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
static
inline
int
Abc_TtIntersect
(
word
*
pIn1
,
word
*
pIn2
,
int
nWords
)
static
inline
int
Abc_TtIntersect
2
(
word
*
pIn1
,
word
*
pIn2
,
int
nWords
)
{
{
int
w
;
int
w
;
for
(
w
=
0
;
w
<
nWords
;
w
++
)
for
(
w
=
0
;
w
<
nWords
;
w
++
)
...
@@ -963,7 +963,7 @@ word Abc_IsopNew( word * pOn, word * pOnDc, word * pRes, int nVars, word CostLim
...
@@ -963,7 +963,7 @@ word Abc_IsopNew( word * pOn, word * pOnDc, word * pRes, int nVars, word CostLim
Abc_TtSetBit
(
pCube
,
iMint
^
(
1
<<
uTwo
)
);
Abc_TtSetBit
(
pCube
,
iMint
^
(
1
<<
uTwo
)
);
Abc_TtSetBit
(
pCube
,
iMint
^
(
1
<<
vTwo
)
^
(
1
<<
uTwo
)
);
Abc_TtSetBit
(
pCube
,
iMint
^
(
1
<<
vTwo
)
^
(
1
<<
uTwo
)
);
Cube
&=
~
(
3
<<
Abc_Var2Lit
(
vTwo
,
0
))
&
~
(
3
<<
Abc_Var2Lit
(
uTwo
,
0
));
Cube
&=
~
(
3
<<
Abc_Var2Lit
(
vTwo
,
0
))
&
~
(
3
<<
Abc_Var2Lit
(
uTwo
,
0
));
assert
(
!
Abc_TtIntersect
(
pCube
,
pOffset
,
nWords
)
);
assert
(
!
Abc_TtIntersect
2
(
pCube
,
pOffset
,
nWords
)
);
// expand against offset
// expand against offset
for
(
v
=
0
;
v
<
nVars
;
v
++
)
for
(
v
=
0
;
v
<
nVars
;
v
++
)
if
(
v
!=
vTwo
&&
v
!=
uTwo
)
if
(
v
!=
vTwo
&&
v
!=
uTwo
)
...
...
src/misc/util/utilTruth.h
View file @
6b7aa389
...
@@ -192,6 +192,18 @@ static inline int Abc_TtHexDigitNum( int nVars ) { return nVars <= 2 ? 1 : 1 <<
...
@@ -192,6 +192,18 @@ static inline int Abc_TtHexDigitNum( int nVars ) { return nVars <= 2 ? 1 : 1 <<
***********************************************************************/
***********************************************************************/
static
inline
word
Abc_Tt6Mask
(
int
nBits
)
{
assert
(
nBits
>=
0
&&
nBits
<=
64
);
return
(
~
(
word
)
0
)
>>
(
64
-
nBits
);
}
static
inline
word
Abc_Tt6Mask
(
int
nBits
)
{
assert
(
nBits
>=
0
&&
nBits
<=
64
);
return
(
~
(
word
)
0
)
>>
(
64
-
nBits
);
}
static
inline
void
Abc_TtMask
(
word
*
pTruth
,
int
nWords
,
int
nBits
)
{
int
w
;
assert
(
nBits
>=
0
&&
nBits
<=
nWords
*
64
);
for
(
w
=
0
;
w
<
nWords
;
w
++
)
if
(
nBits
>=
(
w
+
1
)
*
64
)
pTruth
[
w
]
=
~
(
word
)
0
;
else
if
(
nBits
>
w
*
64
)
pTruth
[
w
]
=
Abc_Tt6Mask
(
nBits
-
w
*
64
);
else
pTruth
[
w
]
=
0
;
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -254,6 +266,16 @@ static inline void Abc_TtAnd( word * pOut, word * pIn1, word * pIn2, int nWords,
...
@@ -254,6 +266,16 @@ static inline void Abc_TtAnd( word * pOut, word * pIn1, word * pIn2, int nWords,
for
(
w
=
0
;
w
<
nWords
;
w
++
)
for
(
w
=
0
;
w
<
nWords
;
w
++
)
pOut
[
w
]
=
pIn1
[
w
]
&
pIn2
[
w
];
pOut
[
w
]
=
pIn1
[
w
]
&
pIn2
[
w
];
}
}
static
inline
void
Abc_TtAndSharp
(
word
*
pOut
,
word
*
pIn1
,
word
*
pIn2
,
int
nWords
,
int
fCompl
)
{
int
w
;
if
(
fCompl
)
for
(
w
=
0
;
w
<
nWords
;
w
++
)
pOut
[
w
]
=
pIn1
[
w
]
&
~
pIn2
[
w
];
else
for
(
w
=
0
;
w
<
nWords
;
w
++
)
pOut
[
w
]
=
pIn1
[
w
]
&
pIn2
[
w
];
}
static
inline
void
Abc_TtSharp
(
word
*
pOut
,
word
*
pIn1
,
word
*
pIn2
,
int
nWords
)
static
inline
void
Abc_TtSharp
(
word
*
pOut
,
word
*
pIn1
,
word
*
pIn2
,
int
nWords
)
{
{
int
w
;
int
w
;
...
@@ -282,6 +304,23 @@ static inline void Abc_TtMux( word * pOut, word * pCtrl, word * pIn1, word * pIn
...
@@ -282,6 +304,23 @@ static inline void Abc_TtMux( word * pOut, word * pCtrl, word * pIn1, word * pIn
for
(
w
=
0
;
w
<
nWords
;
w
++
)
for
(
w
=
0
;
w
<
nWords
;
w
++
)
pOut
[
w
]
=
(
pCtrl
[
w
]
&
pIn1
[
w
])
|
(
~
pCtrl
[
w
]
&
pIn0
[
w
]);
pOut
[
w
]
=
(
pCtrl
[
w
]
&
pIn1
[
w
])
|
(
~
pCtrl
[
w
]
&
pIn0
[
w
]);
}
}
static
inline
int
Abc_TtIntersect
(
word
*
pIn1
,
word
*
pIn2
,
int
nWords
,
int
fCompl
)
{
int
w
;
if
(
fCompl
)
{
for
(
w
=
0
;
w
<
nWords
;
w
++
)
if
(
~
pIn1
[
w
]
&
pIn2
[
w
]
)
return
1
;
}
else
{
for
(
w
=
0
;
w
<
nWords
;
w
++
)
if
(
pIn1
[
w
]
&
pIn2
[
w
]
)
return
1
;
}
return
0
;
}
static
inline
int
Abc_TtEqual
(
word
*
pIn1
,
word
*
pIn2
,
int
nWords
)
static
inline
int
Abc_TtEqual
(
word
*
pIn1
,
word
*
pIn2
,
int
nWords
)
{
{
int
w
;
int
w
;
...
@@ -1509,6 +1548,24 @@ static inline int Abc_TtCountOnes( word x )
...
@@ -1509,6 +1548,24 @@ static inline int Abc_TtCountOnes( word x )
x
=
x
+
(
x
>>
32
);
x
=
x
+
(
x
>>
32
);
return
(
int
)(
x
&
0xFF
);
return
(
int
)(
x
&
0xFF
);
}
}
static
inline
int
Abc_TtCountOnesVec
(
word
*
x
,
int
nWords
)
{
int
w
,
Count
=
0
;
for
(
w
=
0
;
w
<
nWords
;
w
++
)
Count
+=
Abc_TtCountOnes
(
x
[
w
]
);
return
Count
;
}
static
inline
int
Abc_TtCountOnesVecMask
(
word
*
x
,
word
*
pMask
,
int
nWords
,
int
fCompl
)
{
int
w
,
Count
=
0
;
if
(
fCompl
)
for
(
w
=
0
;
w
<
nWords
;
w
++
)
Count
+=
Abc_TtCountOnes
(
pMask
[
w
]
&
~
x
[
w
]
);
else
for
(
w
=
0
;
w
<
nWords
;
w
++
)
Count
+=
Abc_TtCountOnes
(
pMask
[
w
]
&
x
[
w
]
);
return
Count
;
}
/**Function*************************************************************
/**Function*************************************************************
...
...
src/opt/fret/fretMain.c
View file @
6b7aa389
...
@@ -1322,7 +1322,7 @@ Abc_FlowRetime_UpdateLags( ) {
...
@@ -1322,7 +1322,7 @@ Abc_FlowRetime_UpdateLags( ) {
int
int
Abc_FlowRetime_GetLag
(
Abc_Obj_t
*
pObj
)
{
Abc_FlowRetime_GetLag
(
Abc_Obj_t
*
pObj
)
{
assert
(
!
Abc_ObjIsLatch
(
pObj
)
);
assert
(
!
Abc_ObjIsLatch
(
pObj
)
);
assert
(
Abc_ObjId
(
pObj
)
<
Vec_IntSize
(
pManMR
->
vLags
)
);
assert
(
(
int
)
Abc_ObjId
(
pObj
)
<
Vec_IntSize
(
pManMR
->
vLags
)
);
return
Vec_IntEntry
(
pManMR
->
vLags
,
Abc_ObjId
(
pObj
));
return
Vec_IntEntry
(
pManMR
->
vLags
,
Abc_ObjId
(
pObj
));
}
}
...
@@ -1341,7 +1341,7 @@ Abc_FlowRetime_GetLag( Abc_Obj_t *pObj ) {
...
@@ -1341,7 +1341,7 @@ Abc_FlowRetime_GetLag( Abc_Obj_t *pObj ) {
void
void
Abc_FlowRetime_SetLag
(
Abc_Obj_t
*
pObj
,
int
lag
)
{
Abc_FlowRetime_SetLag
(
Abc_Obj_t
*
pObj
,
int
lag
)
{
assert
(
Abc_ObjIsNode
(
pObj
)
);
assert
(
Abc_ObjIsNode
(
pObj
)
);
assert
(
Abc_ObjId
(
pObj
)
<
Vec_IntSize
(
pManMR
->
vLags
)
);
assert
(
(
int
)
Abc_ObjId
(
pObj
)
<
Vec_IntSize
(
pManMR
->
vLags
)
);
Vec_IntWriteEntry
(
pManMR
->
vLags
,
Abc_ObjId
(
pObj
),
lag
);
Vec_IntWriteEntry
(
pManMR
->
vLags
,
Abc_ObjId
(
pObj
),
lag
);
}
}
...
...
src/opt/fret/fretTime.c
View file @
6b7aa389
...
@@ -145,7 +145,7 @@ void Abc_FlowRetime_ConstrainConserv_forw( Abc_Ntk_t * pNtk ) {
...
@@ -145,7 +145,7 @@ void Abc_FlowRetime_ConstrainConserv_forw( Abc_Ntk_t * pNtk ) {
if
(
Abc_ObjIsBi
(
pObj
)
)
if
(
Abc_ObjIsBi
(
pObj
)
)
pObj
->
fMarkA
=
1
;
pObj
->
fMarkA
=
1
;
assert
(
pObj
->
Level
<=
pManMR
->
maxDelay
);
assert
(
(
int
)
pObj
->
Level
<=
pManMR
->
maxDelay
);
}
}
// collect TFO of latches
// collect TFO of latches
...
@@ -162,7 +162,7 @@ void Abc_FlowRetime_ConstrainConserv_forw( Abc_Ntk_t * pNtk ) {
...
@@ -162,7 +162,7 @@ void Abc_FlowRetime_ConstrainConserv_forw( Abc_Ntk_t * pNtk ) {
if
(
pBi
->
fMarkA
)
{
if
(
pBi
->
fMarkA
)
{
pBi
->
fMarkA
=
0
;
pBi
->
fMarkA
=
0
;
pObj
->
Level
=
pBi
->
Level
;
pObj
->
Level
=
pBi
->
Level
;
assert
(
pObj
->
Level
<=
pManMR
->
maxDelay
);
assert
(
(
int
)
pObj
->
Level
<=
pManMR
->
maxDelay
);
}
else
}
else
pObj
->
Level
=
0
;
pObj
->
Level
=
0
;
}
}
...
@@ -216,7 +216,7 @@ void Abc_FlowRetime_ConstrainConserv_forw( Abc_Ntk_t * pNtk ) {
...
@@ -216,7 +216,7 @@ void Abc_FlowRetime_ConstrainConserv_forw( Abc_Ntk_t * pNtk ) {
if
(
Abc_ObjIsBi
(
pObj
)
)
if
(
Abc_ObjIsBi
(
pObj
)
)
pObj
->
fMarkA
=
1
;
pObj
->
fMarkA
=
1
;
assert
(
pObj
->
Level
<=
pManMR
->
maxDelay
);
assert
(
(
int
)
pObj
->
Level
<=
pManMR
->
maxDelay
);
}
}
Abc_NtkForEachLatch
(
pNtk
,
pObj
,
i
)
{
Abc_NtkForEachLatch
(
pNtk
,
pObj
,
i
)
{
...
@@ -226,7 +226,7 @@ void Abc_FlowRetime_ConstrainConserv_forw( Abc_Ntk_t * pNtk ) {
...
@@ -226,7 +226,7 @@ void Abc_FlowRetime_ConstrainConserv_forw( Abc_Ntk_t * pNtk ) {
if
(
pBi
->
fMarkA
)
{
if
(
pBi
->
fMarkA
)
{
pBi
->
fMarkA
=
0
;
pBi
->
fMarkA
=
0
;
pObj
->
Level
=
pBi
->
Level
;
pObj
->
Level
=
pBi
->
Level
;
assert
(
pObj
->
Level
<=
pManMR
->
maxDelay
);
assert
(
(
int
)
pObj
->
Level
<=
pManMR
->
maxDelay
);
}
else
}
else
pObj
->
Level
=
0
;
pObj
->
Level
=
0
;
}
}
...
@@ -283,7 +283,7 @@ void Abc_FlowRetime_ConstrainConserv_back( Abc_Ntk_t * pNtk ) {
...
@@ -283,7 +283,7 @@ void Abc_FlowRetime_ConstrainConserv_back( Abc_Ntk_t * pNtk ) {
if
(
Abc_ObjIsBo
(
pObj
)
)
if
(
Abc_ObjIsBo
(
pObj
)
)
pObj
->
fMarkA
=
1
;
pObj
->
fMarkA
=
1
;
assert
(
pObj
->
Level
<=
pManMR
->
maxDelay
);
assert
(
(
int
)
pObj
->
Level
<=
pManMR
->
maxDelay
);
}
}
// collect TFO of latches
// collect TFO of latches
...
@@ -300,7 +300,7 @@ void Abc_FlowRetime_ConstrainConserv_back( Abc_Ntk_t * pNtk ) {
...
@@ -300,7 +300,7 @@ void Abc_FlowRetime_ConstrainConserv_back( Abc_Ntk_t * pNtk ) {
if
(
pBo
->
fMarkA
)
{
if
(
pBo
->
fMarkA
)
{
pBo
->
fMarkA
=
0
;
pBo
->
fMarkA
=
0
;
pObj
->
Level
=
pBo
->
Level
;
pObj
->
Level
=
pBo
->
Level
;
assert
(
pObj
->
Level
<=
pManMR
->
maxDelay
);
assert
(
(
int
)
pObj
->
Level
<=
pManMR
->
maxDelay
);
}
else
}
else
pObj
->
Level
=
0
;
pObj
->
Level
=
0
;
}
}
...
@@ -355,7 +355,7 @@ void Abc_FlowRetime_ConstrainConserv_back( Abc_Ntk_t * pNtk ) {
...
@@ -355,7 +355,7 @@ void Abc_FlowRetime_ConstrainConserv_back( Abc_Ntk_t * pNtk ) {
pObj
->
fMarkA
=
1
;
pObj
->
fMarkA
=
1
;
}
}
assert
(
pObj
->
Level
<=
pManMR
->
maxDelay
);
assert
(
(
int
)
pObj
->
Level
<=
pManMR
->
maxDelay
);
}
}
Abc_NtkForEachLatch
(
pNtk
,
pObj
,
i
)
{
Abc_NtkForEachLatch
(
pNtk
,
pObj
,
i
)
{
...
@@ -470,7 +470,7 @@ void Abc_FlowRetime_ConstrainExact_forw( Abc_Obj_t * pObj ) {
...
@@ -470,7 +470,7 @@ void Abc_FlowRetime_ConstrainExact_forw( Abc_Obj_t * pObj ) {
assert
(
!
Abc_ObjIsLatch
(
pReg
));
assert
(
!
Abc_ObjIsLatch
(
pReg
));
Abc_ObjForEachFanin
(
pReg
,
pNext
,
j
)
Abc_ObjForEachFanin
(
pReg
,
pNext
,
j
)
pNext
->
Level
=
MAX
(
pNext
->
Level
,
pReg
->
Level
+
(
Abc_ObjIsNode
(
pReg
)
?
1
:
0
));
pNext
->
Level
=
MAX
(
pNext
->
Level
,
pReg
->
Level
+
(
Abc_ObjIsNode
(
pReg
)
?
1
:
0
));
assert
(
pReg
->
Level
<=
pManMR
->
maxDelay
);
assert
(
(
int
)
pReg
->
Level
<=
pManMR
->
maxDelay
);
pReg
->
Level
=
0
;
pReg
->
Level
=
0
;
pReg
->
fMarkA
=
pReg
->
fMarkB
=
0
;
pReg
->
fMarkA
=
pReg
->
fMarkB
=
0
;
}
}
...
@@ -545,7 +545,7 @@ void Abc_FlowRetime_ConstrainExact_back( Abc_Obj_t * pObj ) {
...
@@ -545,7 +545,7 @@ void Abc_FlowRetime_ConstrainExact_back( Abc_Obj_t * pObj ) {
assert
(
!
Abc_ObjIsLatch
(
pReg
));
assert
(
!
Abc_ObjIsLatch
(
pReg
));
Abc_ObjForEachFanout
(
pReg
,
pNext
,
j
)
Abc_ObjForEachFanout
(
pReg
,
pNext
,
j
)
pNext
->
Level
=
MAX
(
pNext
->
Level
,
pReg
->
Level
+
(
Abc_ObjIsNode
(
pReg
)
?
1
:
0
));
pNext
->
Level
=
MAX
(
pNext
->
Level
,
pReg
->
Level
+
(
Abc_ObjIsNode
(
pReg
)
?
1
:
0
));
assert
(
pReg
->
Level
<=
pManMR
->
maxDelay
);
assert
(
(
int
)
pReg
->
Level
<=
pManMR
->
maxDelay
);
pReg
->
Level
=
0
;
pReg
->
Level
=
0
;
pReg
->
fMarkA
=
pReg
->
fMarkB
=
0
;
pReg
->
fMarkA
=
pReg
->
fMarkB
=
0
;
}
}
...
...
src/opt/sfm/sfmDec.c
View file @
6b7aa389
This diff is collapsed.
Click to expand it.
src/opt/sfm/sfmInt.h
View file @
6b7aa389
...
@@ -54,6 +54,7 @@ ABC_NAMESPACE_HEADER_START
...
@@ -54,6 +54,7 @@ ABC_NAMESPACE_HEADER_START
#define SFM_WORD_MAX ((SFM_SUPP_MAX>6) ? (1<<(SFM_SUPP_MAX-6)) : 1)
#define SFM_WORD_MAX ((SFM_SUPP_MAX>6) ? (1<<(SFM_SUPP_MAX-6)) : 1)
#define SFM_WIN_MAX 1000
#define SFM_WIN_MAX 1000
#define SFM_DEC_MAX 4
#define SFM_DEC_MAX 4
#define SFM_SIM_WORDS 8
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// BASIC TYPES ///
/// BASIC TYPES ///
...
...
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