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
e8ac4764
Commit
e8ac4764
authored
Aug 12, 2021
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suggested changes to collect and pass timing information.
parent
99ab99bf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
7 deletions
+58
-7
src/base/abci/abcTiming.c
+47
-5
src/base/io/ioReadBlif.c
+11
-2
No files found.
src/base/abci/abcTiming.c
View file @
e8ac4764
...
...
@@ -24,9 +24,11 @@
#include "base/main/main.h"
#include "map/mio/mio.h"
ABC_NAMESPACE_IMPL_START
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
...
...
@@ -187,8 +189,11 @@ void Abc_NtkTimeSetDefaultRequired( Abc_Ntk_t * pNtk, float Rise, float Fall )
pNtk
->
pManTime
->
tReqDef
.
Rise
=
Rise
;
pNtk
->
pManTime
->
tReqDef
.
Fall
=
Fall
;
// set the required times for each output
Abc_NtkForEachCo
(
pNtk
,
pObj
,
i
)
Abc_NtkForEachCo
(
pNtk
,
pObj
,
i
)
{
Abc_NtkTimeSetRequired
(
pNtk
,
Abc_ObjId
(
pObj
),
Rise
,
Fall
);
// printf("Debug: Setting *default* required time on object %d to R %f F %f\n",
// Abc_ObjId(pObj),Rise,Fall);
}
}
/**Function*************************************************************
...
...
@@ -204,6 +209,8 @@ void Abc_NtkTimeSetDefaultRequired( Abc_Ntk_t * pNtk, float Rise, float Fall )
***********************************************************************/
void
Abc_NtkTimeSetArrival
(
Abc_Ntk_t
*
pNtk
,
int
ObjId
,
float
Rise
,
float
Fall
)
{
static
int
debug
;
debug
++
;
Vec_Ptr_t
*
vTimes
;
Abc_Time_t
*
pTime
;
if
(
pNtk
->
pManTime
==
NULL
)
...
...
@@ -214,9 +221,13 @@ void Abc_NtkTimeSetArrival( Abc_Ntk_t * pNtk, int ObjId, float Rise, float Fall
pTime
=
(
Abc_Time_t
*
)
vTimes
->
pArray
[
ObjId
];
pTime
->
Rise
=
Rise
;
pTime
->
Fall
=
Fall
;
// printf("Debug:%d Setting arrival time on object %d to R %f and F %f\n",debug,
// ObjId, Rise, Fall);
}
void
Abc_NtkTimeSetRequired
(
Abc_Ntk_t
*
pNtk
,
int
ObjId
,
float
Rise
,
float
Fall
)
{
Vec_Ptr_t
*
vTimes
;
Abc_Time_t
*
pTime
;
if
(
pNtk
->
pManTime
==
NULL
)
...
...
@@ -227,6 +238,10 @@ void Abc_NtkTimeSetRequired( Abc_Ntk_t * pNtk, int ObjId, float Rise, float Fall
pTime
=
(
Abc_Time_t
*
)
vTimes
->
pArray
[
ObjId
];
pTime
->
Rise
=
Rise
;
pTime
->
Fall
=
Fall
;
static
int
debug
;
debug
++
;
// printf("Debug:%d Setting required time on object %d to R %f and F %f\n",debug,
// ObjId, Rise, Fall);
}
/**Function*************************************************************
...
...
@@ -480,16 +495,40 @@ Abc_ManTime_t * Abc_ManTimeStart( Abc_Ntk_t * pNtk )
p
->
vReqs
=
Vec_PtrAlloc
(
0
);
// set default default input=arrivals (assumed to be 0)
// set default default output-requireds (can be either 0 or +infinity, based on the flag)
p
->
tReqDef
.
Rise
=
fUseZeroDefaultOutputRequired
?
0
:
ABC_INFINITY
;
p
->
tReqDef
.
Fall
=
fUseZeroDefaultOutputRequired
?
0
:
ABC_INFINITY
;
//AF: hack support the values read in. Not defaults !
// p->tReqDef.Rise = fUseZeroDefaultOutputRequired ? 0 : ABC_INFINITY;
// p->tReqDef.Fall = fUseZeroDefaultOutputRequired ? 0 : ABC_INFINITY;
Abc_Time_t
*
pTime
;
// extend manager
Abc_ManTimeExpand
(
p
,
Abc_NtkObjNumMax
(
pNtk
)
+
1
,
0
);
// set the default timing for CIs
Abc_NtkForEachCi
(
pNtk
,
pObj
,
i
)
Abc_NtkForEachCi
(
pNtk
,
pObj
,
i
){
Vec_Ptr_t
*
vTimes
;
vTimes
=
pNtk
->
pManTime
->
vArrs
;
pTime
=
(
Abc_Time_t
*
)
vTimes
->
pArray
[
Abc_ObjId
(
pObj
)];
if
(
pTime
){
p
->
tArrDef
.
Fall
=
pTime
->
Fall
;
p
->
tArrDef
.
Rise
=
pTime
->
Rise
;
}
Abc_NtkTimeSetArrival
(
pNtk
,
Abc_ObjId
(
pObj
),
p
->
tArrDef
.
Rise
,
p
->
tArrDef
.
Rise
);
}
// set the default timing for COs
Abc_NtkForEachCo
(
pNtk
,
pObj
,
i
)
Abc_NtkForEachCo
(
pNtk
,
pObj
,
i
){
Vec_Ptr_t
*
vTimes
;
vTimes
=
pNtk
->
pManTime
->
vArrs
;
pTime
=
(
Abc_Time_t
*
)
vTimes
->
pArray
[
Abc_ObjId
(
pObj
)];
if
(
pTime
){
p
->
tReqDef
.
Fall
=
pTime
->
Fall
;
p
->
tReqDef
.
Rise
=
pTime
->
Rise
;
}
Abc_NtkTimeSetRequired
(
pNtk
,
Abc_ObjId
(
pObj
),
p
->
tReqDef
.
Rise
,
p
->
tReqDef
.
Rise
);
}
return
p
;
}
...
...
@@ -571,6 +610,9 @@ void Abc_ManTimeDup( Abc_Ntk_t * pNtkOld, Abc_Ntk_t * pNtkNew )
pNtkNew
->
pManTime
->
tOutLoad
=
ABC_ALLOC
(
Abc_Time_t
,
Abc_NtkCiNum
(
pNtkOld
)
);
memcpy
(
pNtkNew
->
pManTime
->
tOutLoad
,
pNtkOld
->
pManTime
->
tOutLoad
,
sizeof
(
Abc_Time_t
)
*
Abc_NtkCoNum
(
pNtkOld
)
);
}
printf
(
"State of abc timing manager
\n
"
);
Abc_NtkTimePrint
(
pNtkNew
);
}
/**Function*************************************************************
...
...
src/base/io/ioReadBlif.c
View file @
e8ac4764
...
...
@@ -22,6 +22,9 @@
#include "base/main/main.h"
#include "map/mio/mio.h"
ABC_NAMESPACE_IMPL_START
...
...
@@ -877,10 +880,13 @@ int Io_ReadBlifNetworkInputArrival( Io_ReadBlif_t * p, Vec_Ptr_t * vTokens )
return
1
;
}
// set timing info
//Abc_NtkTimeSetArrival( p->pNtkCur, Abc_ObjFanin0(pNet)->Id, (float)TimeRise, (float)TimeFall );
// printf("Debug: Forcing setting of arrival times\n");
if
(
Abc_ObjFaninNum
(
pNet
)
>
0
){
Abc_NtkTimeSetArrival
(
p
->
pNtkCur
,
Abc_ObjFanin0
(
pNet
)
->
Id
,
(
float
)
TimeRise
,
(
float
)
TimeFall
);
Vec_IntPush
(
p
->
vInArrs
,
Abc_ObjFanin0
(
pNet
)
->
Id
);
Vec_IntPush
(
p
->
vInArrs
,
Abc_Float2Int
((
float
)
TimeRise
)
);
Vec_IntPush
(
p
->
vInArrs
,
Abc_Float2Int
((
float
)
TimeFall
)
);
}
return
0
;
}
...
...
@@ -928,7 +934,10 @@ int Io_ReadBlifNetworkOutputRequired( Io_ReadBlif_t * p, Vec_Ptr_t * vTokens )
return
1
;
}
// set timing info
// Abc_NtkTimeSetRequired( p->pNtkCur, Abc_ObjFanout0(pNet)->Id, (float)TimeRise, (float)TimeFall );
// printf("Setting required time for object %d to R %f F %f\n",
// Abc_ObjFanout0(pNet)->Id, (float)TimeRise, (float)TimeFall );
Abc_NtkTimeSetRequired
(
p
->
pNtkCur
,
Abc_ObjFanout0
(
pNet
)
->
Id
,
(
float
)
TimeRise
,
(
float
)
TimeFall
);
Vec_IntPush
(
p
->
vOutReqs
,
Abc_ObjFanout0
(
pNet
)
->
Id
);
Vec_IntPush
(
p
->
vOutReqs
,
Abc_Float2Int
((
float
)
TimeRise
)
);
Vec_IntPush
(
p
->
vOutReqs
,
Abc_Float2Int
((
float
)
TimeFall
)
);
...
...
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