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
cda61cb2
Commit
cda61cb2
authored
Feb 18, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrating sweeping information.
parent
d415a1ad
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
488 additions
and
6 deletions
+488
-6
abclib.dsp
+4
-0
src/aig/gia/gia.h
+1
-0
src/aig/gia/giaMan.c
+2
-0
src/aig/gia/giaSweep.c
+325
-0
src/aig/gia/giaTim.c
+19
-0
src/aig/gia/module.make
+1
-0
src/misc/tim/tim.h
+1
-0
src/misc/tim/timMan.c
+135
-6
No files found.
abclib.dsp
View file @
cda61cb2
...
...
@@ -3559,6 +3559,10 @@ SOURCE=.\src\aig\gia\giaSupMin.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaSweep.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaSwitch.c
# End Source File
# Begin Source File
...
...
src/aig/gia/gia.h
View file @
cda61cb2
...
...
@@ -976,6 +976,7 @@ extern Gia_Man_t * Gia_ManDupWithHierarchy( Gia_Man_t * p, Vec_Int_t **
extern
Gia_Man_t
*
Gia_ManDupWithBoxes
(
Gia_Man_t
*
p
,
Gia_Man_t
*
pBoxes
);
extern
int
Gia_ManLevelWithBoxes
(
Gia_Man_t
*
p
);
extern
int
Gia_ManVerifyWithBoxes
(
Gia_Man_t
*
pGia
,
void
*
pParsInit
);
extern
void
*
Gia_ManUpdateTimMan
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vBoxPres
);
/*=== giaTruth.c ===========================================================*/
extern
word
Gia_ObjComputeTruthTable6
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
,
Vec_Int_t
*
vSupp
,
Vec_Wrd_t
*
vTruths
);
extern
int
Gia_ObjCollectInternal
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
);
...
...
src/aig/gia/giaMan.c
View file @
cda61cb2
...
...
@@ -334,6 +334,8 @@ void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch, int fCut )
Gia_ManPrintPackingStats
(
p
);
if
(
p
->
pPlacement
)
Gia_ManPrintPlacement
(
p
);
if
(
p
->
pManTime
)
Tim_ManPrintStats
(
p
->
pManTime
);
// print register classes
Gia_ManPrintFlopClasses
(
p
);
Gia_ManPrintGateClasses
(
p
);
...
...
src/aig/gia/giaSweep.c
0 → 100644
View file @
cda61cb2
This diff is collapsed.
Click to expand it.
src/aig/gia/giaTim.c
View file @
cda61cb2
...
...
@@ -559,6 +559,25 @@ int Gia_ManVerifyWithBoxes( Gia_Man_t * pGia, void * pParsInit )
return
Status
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
*
Gia_ManUpdateTimMan
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vBoxPres
)
{
assert
(
p
->
pManTime
!=
NULL
);
assert
(
Tim_ManBoxNum
(
p
->
pManTime
)
==
Vec_IntSize
(
vBoxPres
)
);
return
Tim_ManTrim
(
p
->
pManTime
,
vBoxPres
);
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
...
...
src/aig/gia/module.make
View file @
cda61cb2
...
...
@@ -36,6 +36,7 @@ SRC += src/aig/gia/gia.c \
src/aig/gia/giaSort.c
\
src/aig/gia/giaSpeedup.c
\
src/aig/gia/giaSupMin.c
\
src/aig/gia/giaSweep.c
\
src/aig/gia/giaSwitch.c
\
src/aig/gia/giaTest.c
\
src/aig/gia/giaTim.c
\
...
...
src/misc/tim/tim.h
View file @
cda61cb2
...
...
@@ -132,6 +132,7 @@ extern int Tim_ManGetArrsReqs( Tim_Man_t * p, Vec_Flt_t ** pvInArrs,
extern
void
Tim_ManStop
(
Tim_Man_t
*
p
);
extern
void
Tim_ManStopP
(
Tim_Man_t
**
p
);
extern
void
Tim_ManPrint
(
Tim_Man_t
*
p
);
extern
void
Tim_ManPrintStats
(
Tim_Man_t
*
p
);
extern
int
Tim_ManCiNum
(
Tim_Man_t
*
p
);
extern
int
Tim_ManCoNum
(
Tim_Man_t
*
p
);
extern
int
Tim_ManPiNum
(
Tim_Man_t
*
p
);
...
...
src/misc/tim/timMan.c
View file @
cda61cb2
...
...
@@ -93,13 +93,13 @@ Tim_Man_t * Tim_ManDup( Tim_Man_t * p, int fUnitDelay )
// create new manager
pNew
=
Tim_ManStart
(
p
->
nCis
,
p
->
nCos
);
// copy box connectivity information
memcpy
(
pNew
->
pCis
,
p
->
pCis
,
sizeof
(
Tim_Obj_t
)
*
p
->
nCis
);
memcpy
(
pNew
->
pCos
,
p
->
pCos
,
sizeof
(
Tim_Obj_t
)
*
p
->
nCos
);
memcpy
(
pNew
->
pCis
,
p
->
pCis
,
sizeof
(
Tim_Obj_t
)
*
p
->
nCis
);
// why do we need this?
memcpy
(
pNew
->
pCos
,
p
->
pCos
,
sizeof
(
Tim_Obj_t
)
*
p
->
nCos
);
// why do we need this?
// clear traversal IDs
Tim_ManForEachCi
(
p
,
pObj
,
i
)
pObj
->
TravId
=
0
;
Tim_ManForEachCo
(
p
,
pObj
,
i
)
pObj
->
TravId
=
0
;
Tim_ManForEachCi
(
p
,
pObj
,
i
)
// why do we need this?
pObj
->
TravId
=
0
;
// why do we need this?
Tim_ManForEachCo
(
p
,
pObj
,
i
)
// why do we need this?
pObj
->
TravId
=
0
;
// why do we need this?
if
(
fUnitDelay
)
{
// discretize PI arrival times
...
...
@@ -148,6 +148,83 @@ Tim_Man_t * Tim_ManDup( Tim_Man_t * p, int fUnitDelay )
/**Function*************************************************************
Synopsis [Trims the timing manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Tim_Man_t
*
Tim_ManTrim
(
Tim_Man_t
*
p
,
Vec_Int_t
*
vBoxPres
)
{
Tim_Man_t
*
pNew
;
Tim_Box_t
*
pBox
;
Tim_Obj_t
*
pObj
;
float
*
pDelayTable
,
*
pDelayTableNew
;
int
i
,
k
,
nInputs
,
nOutputs
,
nRemCis
,
nRemCos
;
assert
(
Vec_IntSize
(
vBoxPres
)
==
Tim_ManBoxNum
(
p
)
);
// count the number of CIs and COs due to removed boxes
Tim_ManForEachBox
(
p
,
pBox
,
i
)
if
(
Vec_IntEntry
(
vBoxPres
,
i
)
==
0
)
{
nRemCis
+=
pBox
->
nOutputs
;
nRemCos
+=
pBox
->
nInputs
;
}
if
(
nRemCos
==
0
&&
nRemCis
==
0
)
return
Tim_ManDup
(
p
,
0
);
assert
(
Tim_ManCiNum
(
p
)
-
Tim_ManPiNum
(
p
)
>=
nRemCis
);
assert
(
Tim_ManCoNum
(
p
)
-
Tim_ManPoNum
(
p
)
>=
nRemCos
);
// create new manager
pNew
=
Tim_ManStart
(
p
->
nCis
-
nRemCis
,
p
->
nCos
-
nRemCos
);
// copy box connectivity information
memcpy
(
pNew
->
pCis
,
p
->
pCis
,
sizeof
(
Tim_Obj_t
)
*
p
->
nCis
);
// why do we need this?
memcpy
(
pNew
->
pCos
,
p
->
pCos
,
sizeof
(
Tim_Obj_t
)
*
p
->
nCos
);
// why do we need this?
// clear traversal IDs
Tim_ManForEachCi
(
p
,
pObj
,
i
)
// why do we need this?
pObj
->
TravId
=
0
;
// why do we need this?
Tim_ManForEachCo
(
p
,
pObj
,
i
)
// why do we need this?
pObj
->
TravId
=
0
;
// why do we need this?
// duplicate delay tables
if
(
Tim_ManDelayTableNum
(
p
)
>
0
)
{
pNew
->
vDelayTables
=
Vec_PtrStart
(
Vec_PtrSize
(
p
->
vDelayTables
)
);
Tim_ManForEachTable
(
p
,
pDelayTable
,
i
)
{
if
(
pDelayTable
==
NULL
)
continue
;
assert
(
i
==
(
int
)
pDelayTable
[
0
]
);
nInputs
=
(
int
)
pDelayTable
[
1
];
nOutputs
=
(
int
)
pDelayTable
[
2
];
pDelayTableNew
=
ABC_ALLOC
(
float
,
3
+
nInputs
*
nOutputs
);
pDelayTableNew
[
0
]
=
(
int
)
pDelayTable
[
0
];
pDelayTableNew
[
1
]
=
(
int
)
pDelayTable
[
1
];
pDelayTableNew
[
2
]
=
(
int
)
pDelayTable
[
2
];
for
(
k
=
0
;
k
<
nInputs
*
nOutputs
;
k
++
)
pDelayTableNew
[
3
+
k
]
=
pDelayTable
[
3
+
k
];
// assert( (int)pDelayTableNew[0] == Vec_PtrSize(pNew->vDelayTables) );
assert
(
Vec_PtrEntry
(
pNew
->
vDelayTables
,
i
)
==
NULL
);
Vec_PtrWriteEntry
(
pNew
->
vDelayTables
,
i
,
pDelayTableNew
);
//printf( "Finished duplicating delay table %d.\n", i );
}
}
// duplicate boxes
if
(
Tim_ManBoxNum
(
p
)
>
0
)
{
pNew
->
vBoxes
=
Vec_PtrAlloc
(
Tim_ManBoxNum
(
p
)
);
Tim_ManForEachBox
(
p
,
pBox
,
i
)
if
(
Vec_IntEntry
(
vBoxPres
,
i
)
)
Tim_ManCreateBox
(
pNew
,
pBox
->
Inouts
[
0
],
pBox
->
nInputs
,
pBox
->
Inouts
[
pBox
->
nInputs
],
pBox
->
nOutputs
,
pBox
->
iDelayTable
);
}
return
pNew
;
}
/**Function*************************************************************
Synopsis [Stops the timing manager.]
Description []
...
...
@@ -392,6 +469,58 @@ void Tim_ManPrint( Tim_Man_t * p )
/**Function*************************************************************
Synopsis [Prints statistics of the timing manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Tim_ManPrintStats
(
Tim_Man_t
*
p
)
{
Tim_Box_t
*
pBox
;
Vec_Int_t
*
vCounts
;
Vec_Ptr_t
*
vBoxes
;
int
i
,
Count
,
IdMax
;
if
(
p
==
NULL
)
return
;
Abc_Print
(
1
,
"hierarchy : "
);
printf
(
"PI/CI = %d/%d PO/CO = %d/%d Box = %d"
,
Tim_ManPiNum
(
p
),
Tim_ManCiNum
(
p
),
Tim_ManPoNum
(
p
),
Tim_ManCoNum
(
p
),
Tim_ManBoxNum
(
p
)
);
printf
(
"
\n
"
);
if
(
Tim_ManBoxNum
(
p
)
==
0
)
return
;
IdMax
=
0
;
Tim_ManForEachBox
(
p
,
pBox
,
i
)
IdMax
=
Abc_MaxInt
(
IdMax
,
pBox
->
iDelayTable
);
vCounts
=
Vec_IntStart
(
IdMax
+
1
);
vBoxes
=
Vec_PtrStart
(
IdMax
+
1
);
Tim_ManForEachBox
(
p
,
pBox
,
i
)
{
Vec_IntAddToEntry
(
vCounts
,
pBox
->
iDelayTable
,
1
);
Vec_PtrWriteEntry
(
vBoxes
,
pBox
->
iDelayTable
,
pBox
);
}
// print statistics about boxes
Vec_IntForEachEntry
(
vCounts
,
Count
,
i
)
{
if
(
Count
==
0
)
continue
;
pBox
=
(
Tim_Box_t
*
)
Vec_PtrEntry
(
vBoxes
,
i
);
printf
(
" Box %4d "
,
i
);
printf
(
"Num = %4d "
,
Count
);
printf
(
"Ins = %4d "
,
pBox
->
nInputs
);
printf
(
"Outs = %4d"
,
pBox
->
nOutputs
);
printf
(
"
\n
"
);
}
Vec_IntFree
(
vCounts
);
Vec_PtrFree
(
vBoxes
);
}
/**Function*************************************************************
Synopsis [Read parameters.]
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