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
a02b0203
Commit
a02b0203
authored
Sep 19, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating DSD balance to handle XOR gate as having the same delay as AND gate.
parent
f989aea2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
10 deletions
+11
-10
src/map/if/ifCount.h
+2
-2
src/map/if/ifDelay.c
+3
-3
src/map/if/ifDsd.c
+5
-4
src/map/if/ifTune.c
+1
-1
No files found.
src/map/if/ifCount.h
View file @
a02b0203
...
...
@@ -85,7 +85,7 @@ static inline int If_LogCreateAndXorMulti( Vec_Int_t * vAig, int * pFaninLits, i
pFaninLits
[
i
-
1
]
=
If_LogCreateAndXor
(
vAig
,
pFaninLits
[
i
],
pFaninLits
[
i
-
1
],
nSuppAll
,
fXor
);
return
pFaninLits
[
0
];
}
static
inline
int
If_LogCounterAddAig
(
int
*
pTimes
,
int
*
pnTimes
,
int
*
pFaninLits
,
int
Num
,
int
iLit
,
Vec_Int_t
*
vAig
,
int
nSuppAll
,
int
fXor
)
static
inline
int
If_LogCounterAddAig
(
int
*
pTimes
,
int
*
pnTimes
,
int
*
pFaninLits
,
int
Num
,
int
iLit
,
Vec_Int_t
*
vAig
,
int
nSuppAll
,
int
fXor
,
int
fXorFunc
)
{
int
nTimes
=
*
pnTimes
;
if
(
vAig
)
...
...
@@ -107,7 +107,7 @@ static inline int If_LogCounterAddAig( int * pTimes, int * pnTimes, int * pFanin
}
pTimes
[
k
-
1
]
+=
1
+
fXor
;
if
(
vAig
)
pFaninLits
[
k
-
1
]
=
If_LogCreateAndXor
(
vAig
,
pFaninLits
[
k
],
pFaninLits
[
k
-
1
],
nSuppAll
,
fXor
);
pFaninLits
[
k
-
1
]
=
If_LogCreateAndXor
(
vAig
,
pFaninLits
[
k
],
pFaninLits
[
k
-
1
],
nSuppAll
,
fXor
Func
);
for
(
nTimes
--
,
i
=
k
;
i
<
nTimes
;
i
++
)
{
pTimes
[
i
]
=
pTimes
[
i
+
1
];
...
...
src/map/if/ifDelay.c
View file @
a02b0203
...
...
@@ -204,9 +204,9 @@ int If_CutSopBalanceEvalInt( Vec_Int_t * vCover, int * pTimes, int * pFaninLits,
{
Literal
=
3
&
(
Entry
>>
(
k
<<
1
));
if
(
Literal
==
1
)
// neg literal
nLits
++
,
Delay
=
If_LogCounterAddAig
(
pCounterAnd
,
&
nCounterAnd
,
pFaninLitsAnd
,
pTimes
[
k
],
Abc_LitNot
(
pFaninLits
[
k
]),
vAig
,
nSuppAll
,
0
);
nLits
++
,
Delay
=
If_LogCounterAddAig
(
pCounterAnd
,
&
nCounterAnd
,
pFaninLitsAnd
,
pTimes
[
k
],
Abc_LitNot
(
pFaninLits
[
k
]),
vAig
,
nSuppAll
,
0
,
0
);
else
if
(
Literal
==
2
)
// pos literal
nLits
++
,
Delay
=
If_LogCounterAddAig
(
pCounterAnd
,
&
nCounterAnd
,
pFaninLitsAnd
,
pTimes
[
k
],
pFaninLits
[
k
],
vAig
,
nSuppAll
,
0
);
nLits
++
,
Delay
=
If_LogCounterAddAig
(
pCounterAnd
,
&
nCounterAnd
,
pFaninLitsAnd
,
pTimes
[
k
],
pFaninLits
[
k
],
vAig
,
nSuppAll
,
0
,
0
);
else
if
(
Literal
!=
0
)
assert
(
0
);
}
...
...
@@ -216,7 +216,7 @@ int If_CutSopBalanceEvalInt( Vec_Int_t * vCover, int * pTimes, int * pFaninLits,
iRes
=
If_LogCreateAndXorMulti
(
vAig
,
pFaninLitsAnd
,
nCounterAnd
,
nSuppAll
,
0
);
else
*
pArea
+=
nLits
==
1
?
0
:
nLits
-
1
;
Delay
=
If_LogCounterAddAig
(
pCounterOr
,
&
nCounterOr
,
pFaninLitsOr
,
Delay
,
Abc_LitNot
(
iRes
),
vAig
,
nSuppAll
,
0
);
Delay
=
If_LogCounterAddAig
(
pCounterOr
,
&
nCounterOr
,
pFaninLitsOr
,
Delay
,
Abc_LitNot
(
iRes
),
vAig
,
nSuppAll
,
0
,
0
);
}
assert
(
nCounterOr
>
0
);
if
(
vAig
)
...
...
src/map/if/ifDsd.c
View file @
a02b0203
...
...
@@ -2073,7 +2073,7 @@ int If_CutDsdBalancePinDelays_rec( If_DsdMan_t * p, int Id, int * pTimes, word *
{
word
pFaninRes
[
IF_MAX_FUNC_LUTSIZE
];
int
i
,
iFanin
,
Delay
,
Result
=
0
;
int
fXor
=
(
If_DsdObjType
(
pObj
)
==
IF_DSD_XOR
);
int
fXor
=
0
;
//
(If_DsdObjType(pObj) == IF_DSD_XOR);
int
nCounter
=
0
,
pCounter
[
IF_MAX_FUNC_LUTSIZE
];
If_DsdObjForEachFaninLit
(
&
p
->
vObjs
,
pObj
,
iFanin
,
i
)
{
...
...
@@ -2188,7 +2188,8 @@ int If_CutDsdBalanceEval_rec( If_DsdMan_t * p, int Id, int * pTimes, int * pnSup
assert
(
If_DsdObjType
(
pObj
)
==
IF_DSD_AND
||
If_DsdObjType
(
pObj
)
==
IF_DSD_XOR
);
{
int
i
,
iFanin
,
Delay
,
Result
=
0
;
int
fXor
=
(
If_DsdObjType
(
pObj
)
==
IF_DSD_XOR
);
int
fXor
=
0
;
//(If_DsdObjType(pObj) == IF_DSD_XOR);
int
fXorFunc
=
(
If_DsdObjType
(
pObj
)
==
IF_DSD_XOR
);
int
nCounter
=
0
,
pCounter
[
IF_MAX_FUNC_LUTSIZE
],
pFaninLits
[
IF_MAX_FUNC_LUTSIZE
];
If_DsdObjForEachFaninLit
(
&
p
->
vObjs
,
pObj
,
iFanin
,
i
)
{
...
...
@@ -2196,13 +2197,13 @@ int If_CutDsdBalanceEval_rec( If_DsdMan_t * p, int Id, int * pTimes, int * pnSup
if
(
Delay
==
-
1
)
return
-
1
;
pFaninLits
[
i
]
=
Abc_LitNotCond
(
pFaninLits
[
i
],
Abc_LitIsCompl
(
iFanin
)
);
Result
=
If_LogCounterAddAig
(
pCounter
,
&
nCounter
,
pFaninLits
,
Delay
,
pFaninLits
[
i
],
vAig
,
nSuppAll
,
fXor
);
Result
=
If_LogCounterAddAig
(
pCounter
,
&
nCounter
,
pFaninLits
,
Delay
,
pFaninLits
[
i
],
vAig
,
nSuppAll
,
fXor
,
fXorFunc
);
}
assert
(
nCounter
>
0
);
if
(
fXor
)
Result
=
If_LogCounterDelayXor
(
pCounter
,
nCounter
);
// estimation
if
(
vAig
)
*
piLit
=
If_LogCreateAndXorMulti
(
vAig
,
pFaninLits
,
nCounter
,
nSuppAll
,
fXor
);
*
piLit
=
If_LogCreateAndXorMulti
(
vAig
,
pFaninLits
,
nCounter
,
nSuppAll
,
fXor
Func
);
else
*
pArea
+=
(
pObj
->
nFans
-
1
)
*
(
1
+
2
*
fXor
);
return
Result
;
...
...
src/map/if/ifTune.c
View file @
a02b0203
...
...
@@ -207,7 +207,7 @@ int Inf_ManOpenSymb( char * pStr )
}
int
Ifn_ManStrCheck
(
char
*
pStr
,
int
*
pnInps
,
int
*
pnObjs
)
{
int
i
,
nNodes
=
0
,
Marks
[
32
]
=
{
0
},
MaxVar
=
-
1
,
RetValue
=
1
;
int
i
,
nNodes
=
0
,
Marks
[
32
]
=
{
0
},
MaxVar
=
-
1
;
for
(
i
=
0
;
pStr
[
i
];
i
++
)
{
if
(
Inf_ManOpenSymb
(
pStr
+
i
)
)
...
...
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