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
04be8af5
Commit
04be8af5
authored
Aug 28, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Important bug fixes in standard-cell library handling and mapper &nf.
parent
cb439f2e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
14 deletions
+34
-14
src/aig/gia/giaNf.c
+0
-0
src/map/amap/amapParse.c
+3
-3
src/map/amap/amapRead.c
+2
-1
src/map/mapper/mapperTime.c
+2
-1
src/map/mio/mioUtils.c
+27
-9
No files found.
src/aig/gia/giaNf.c
View file @
04be8af5
This diff is collapsed.
Click to expand it.
src/map/amap/amapParse.c
View file @
04be8af5
...
...
@@ -103,7 +103,7 @@ Hop_Obj_t * Amap_ParseFormulaOper( Hop_Man_t * pMan, Vec_Ptr_t * pStackFn, int O
SeeAlso []
***********************************************************************/
Hop_Obj_t
*
Amap_ParseFormula
(
FILE
*
pOutput
,
char
*
pFormInit
,
Vec_Ptr_t
*
vVarNames
,
Hop_Man_t
*
pMan
)
Hop_Obj_t
*
Amap_ParseFormula
(
FILE
*
pOutput
,
char
*
pFormInit
,
Vec_Ptr_t
*
vVarNames
,
Hop_Man_t
*
pMan
,
char
*
pGateName
)
{
char
*
pFormula
;
Vec_Ptr_t
*
pStackFn
;
...
...
@@ -278,7 +278,7 @@ Hop_Obj_t * Amap_ParseFormula( FILE * pOutput, char * pFormInit, Vec_Ptr_t * vVa
}
if
(
!
fFound
)
{
fprintf
(
pOutput
,
"Amap_ParseFormula(): The parser cannot find var
\"
%s
\"
in the input var list
.
\n
"
,
pTemp
);
fprintf
(
pOutput
,
"Amap_ParseFormula(): The parser cannot find var
\"
%s
\"
in the input var list
of gate
\"
%s
\"
.
\n
"
,
pTemp
,
pGateName
);
Flag
=
AMAP_EQN_FLAG_ERROR
;
break
;
}
...
...
@@ -428,7 +428,7 @@ int Amap_LibParseEquations( Amap_Lib_t * p, int fVerbose )
Vec_PtrClear
(
vNames
);
Amap_GateForEachPin
(
pGate
,
pPin
)
Vec_PtrPush
(
vNames
,
pPin
->
pName
);
pObj
=
Amap_ParseFormula
(
stdout
,
pGate
->
pForm
,
vNames
,
pMan
);
pObj
=
Amap_ParseFormula
(
stdout
,
pGate
->
pForm
,
vNames
,
pMan
,
pGate
->
pName
);
if
(
pObj
==
NULL
)
break
;
pTruth
=
Hop_ManConvertAigToTruth
(
pMan
,
pObj
,
pGate
->
nPins
,
vTruth
,
0
);
...
...
src/map/amap/amapRead.c
View file @
04be8af5
...
...
@@ -36,6 +36,7 @@ ABC_NAMESPACE_IMPL_START
// these symbols (and no other) can appear in the formulas
#define AMAP_SYMB_AND '*'
#define AMAP_SYMB_AND2 '&'
#define AMAP_SYMB_OR1 '+'
#define AMAP_SYMB_OR2 '|'
#define AMAP_SYMB_XOR '^'
...
...
@@ -236,7 +237,7 @@ int Amap_GateCollectNames( Aig_MmFlex_t * pMem, char * pForm, char * pPinNames[]
for
(
pTemp
=
Buffer
;
*
pTemp
;
pTemp
++
)
if
(
*
pTemp
==
AMAP_SYMB_AND
||
*
pTemp
==
AMAP_SYMB_OR1
||
*
pTemp
==
AMAP_SYMB_OR2
||
*
pTemp
==
AMAP_SYMB_XOR
||
*
pTemp
==
AMAP_SYMB_NOT
||
*
pTemp
==
AMAP_SYMB_OPEN
||
*
pTemp
==
AMAP_SYMB_CLOSE
||
*
pTemp
==
AMAP_SYMB_AFTNOT
)
||
*
pTemp
==
AMAP_SYMB_CLOSE
||
*
pTemp
==
AMAP_SYMB_AFTNOT
||
*
pTemp
==
AMAP_SYMB_AND2
)
*
pTemp
=
' '
;
// save the names
nPins
=
0
;
...
...
src/map/mapper/mapperTime.c
View file @
04be8af5
...
...
@@ -349,7 +349,7 @@ void Map_TimePropagateRequired( Map_Man_t * p )
if
(
pNode
->
pCutBest
[
1
]
&&
pNode
->
tRequired
[
1
].
Worst
<
MAP_FLOAT_LARGE
)
Map_TimePropagateRequiredPhase
(
p
,
pNode
,
1
);
}
/*
// in the end, we verify the required times
// for this, we compute the arrival times of the outputs of each phase
// of the supergates using the fanins' required times as the fanins' arrival times
...
...
@@ -377,6 +377,7 @@ void Map_TimePropagateRequired( Map_Man_t * p )
// assert( ptReqOutTest->Fall < pNode->tRequired[1].Fall + p->fEpsilon );
}
}
*/
}
void
Map_TimeComputeRequiredGlobal
(
Map_Man_t
*
p
)
{
...
...
src/map/mio/mioUtils.c
View file @
04be8af5
...
...
@@ -280,22 +280,40 @@ void Mio_WriteLibrary( FILE * pFile, Mio_Library_t * pLib, int fPrintSops )
***********************************************************************/
int
Mio_DelayCompare
(
Mio_Gate_t
**
ppG1
,
Mio_Gate_t
**
ppG2
)
{
if
(
(
*
ppG1
)
->
dDelayMax
<
(
*
ppG2
)
->
dDelayMax
)
int
Comp
;
float
Eps
=
(
float
)
0
.
00
94636
;
if
(
(
*
ppG1
)
->
dDelayMax
<
(
*
ppG2
)
->
dDelayMax
-
Eps
)
return
-
1
;
if
(
(
*
ppG1
)
->
dDelayMax
>
(
*
ppG2
)
->
dDelayMax
)
if
(
(
*
ppG1
)
->
dDelayMax
>
(
*
ppG2
)
->
dDelayMax
+
Eps
)
return
1
;
// compare names
Comp
=
strcmp
(
(
*
ppG1
)
->
pName
,
(
*
ppG2
)
->
pName
);
if
(
Comp
<
0
)
return
-
1
;
if
(
Comp
>
0
)
return
1
;
assert
(
0
);
return
0
;
}
int
Mio_AreaCompare
(
Mio_Cell_t
*
pG1
,
Mio_Cell_t
*
pG2
)
{
if
(
(
pG1
)
->
nFanins
<
(
pG2
)
->
nFanins
)
int
Comp
;
float
Eps
=
(
float
)
0
.
00
94636
;
if
(
pG1
->
nFanins
<
pG2
->
nFanins
)
return
-
1
;
if
(
(
pG1
)
->
nFanins
>
(
pG2
)
->
nFanins
)
if
(
pG1
->
nFanins
>
pG2
->
nFanins
)
return
1
;
if
(
(
pG1
)
->
Area
<
(
pG2
)
->
Area
)
if
(
pG1
->
Area
<
pG2
->
Area
-
Eps
)
return
-
1
;
if
(
(
pG1
)
->
Area
>
(
pG2
)
->
Area
)
if
(
pG1
->
Area
>
pG2
->
Area
+
Eps
)
return
1
;
// compare names
Comp
=
strcmp
(
pG1
->
pName
,
pG2
->
pName
);
if
(
Comp
<
0
)
return
-
1
;
if
(
Comp
>
0
)
return
1
;
assert
(
0
);
return
0
;
}
...
...
@@ -333,7 +351,7 @@ static inline float Mio_GateDelayAve( Mio_Gate_t * pGate )
static
inline
int
Mio_CompareTwoGates
(
Mio_Gate_t
*
pCell
,
Mio_Gate_t
*
pGate
)
{
int
Comp
;
float
Eps
=
(
float
)
0
.
0
1
;
float
Eps
=
(
float
)
0
.
0
0
94636
;
float
CellDelay
,
GateDelay
;
// compare areas
if
(
pCell
->
dArea
>
(
float
)
pGate
->
dArea
+
Eps
)
...
...
@@ -424,7 +442,7 @@ Mio_Gate_t ** Mio_CollectRoots( Mio_Library_t * pLib, int nInputs, float tDelay,
static
inline
int
Mio_CompareTwo
(
Mio_Cell_t
*
pCell
,
Mio_Gate_t
*
pGate
)
{
int
Comp
;
float
Eps
=
(
float
)
0
.
0
1
;
float
Eps
=
(
float
)
0
.
0
0
94636
;
float
CellDelay
,
GateDelay
;
// compare areas
if
(
pCell
->
Area
>
(
float
)
pGate
->
dArea
+
Eps
)
...
...
@@ -541,7 +559,7 @@ Mio_Cell_t * Mio_CollectRootsNew( Mio_Library_t * pLib, int nInputs, int * pnGat
if
(
pCell
->
pName
==
NULL
)
printf
(
"None
\n
"
);
else
printf
(
"%-20s In = %d N = %3d A = %
7.2f D = %7.2
f
\n
"
,
printf
(
"%-20s In = %d N = %3d A = %
12.6f D = %12.6
f
\n
"
,
pCell
->
pName
,
pCell
->
nFanins
,
pCounts
[
i
],
pCell
->
Area
,
Mio_CellDelayAve
(
pCell
)
);
}
ABC_FREE
(
pCounts
);
...
...
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