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
8453afcf
Commit
8453afcf
authored
Mar 15, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable arrival/required times in &nf.
parent
05244dab
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
7 deletions
+47
-7
src/aig/gia/giaIf.c
+5
-0
src/aig/gia/giaNf.c
+14
-4
src/base/abci/abc.c
+23
-1
src/base/abci/abcPrint.c
+5
-2
No files found.
src/aig/gia/giaIf.c
View file @
8453afcf
...
...
@@ -2031,6 +2031,11 @@ void Gia_ManTransferPacking( Gia_Man_t * p, Gia_Man_t * pGia )
}
void
Gia_ManTransferTiming
(
Gia_Man_t
*
p
,
Gia_Man_t
*
pGia
)
{
if
(
pGia
->
vInArrs
||
pGia
->
vOutReqs
)
{
p
->
vInArrs
=
pGia
->
vInArrs
;
pGia
->
vInArrs
=
NULL
;
p
->
vOutReqs
=
pGia
->
vOutReqs
;
pGia
->
vOutReqs
=
NULL
;
}
if
(
pGia
->
pManTime
==
NULL
||
p
==
pGia
)
return
;
p
->
pManTime
=
pGia
->
pManTime
;
pGia
->
pManTime
=
NULL
;
...
...
src/aig/gia/giaNf.c
View file @
8453afcf
...
...
@@ -1250,15 +1250,18 @@ void Nf_ManCutMatchOne( Nf_Man_t * p, int iObj, int * pCut, int * pCutSet )
Nf_ManCutMatchPrint( p, iObj, 1, &pBest->M[1][1] );
*/
}
static
inline
void
Nf_ObjPrepareCi
(
Nf_Man_t
*
p
,
int
iObj
)
static
inline
void
Nf_ObjPrepareCi
(
Nf_Man_t
*
p
,
int
iObj
,
float
Time
)
{
Nf_Mat_t
*
pD0
=
Nf_ObjMatchD
(
p
,
iObj
,
0
);
Nf_Mat_t
*
pA0
=
Nf_ObjMatchA
(
p
,
iObj
,
0
);
Nf_Mat_t
*
pD
=
Nf_ObjMatchD
(
p
,
iObj
,
1
);
Nf_Mat_t
*
pA
=
Nf_ObjMatchA
(
p
,
iObj
,
1
);
pD0
->
D
=
pA0
->
D
=
pD
->
D
=
pA
->
D
=
Time
;
pD
->
fCompl
=
1
;
pD
->
D
=
p
->
InvDelay
;
pD
->
D
+
=
p
->
InvDelay
;
pD
->
A
=
p
->
InvArea
;
pA
->
fCompl
=
1
;
pA
->
D
=
p
->
InvDelay
;
pA
->
D
+
=
p
->
InvDelay
;
pA
->
A
=
p
->
InvArea
;
Nf_ObjMatchD
(
p
,
iObj
,
0
)
->
fBest
=
1
;
Nf_ObjMatchD
(
p
,
iObj
,
1
)
->
fBest
=
1
;
...
...
@@ -1551,6 +1554,13 @@ int Nf_ManSetMapRefs( Nf_Man_t * p )
{
Required
=
Nf_ObjMatchD
(
p
,
Gia_ObjFaninId0p
(
p
->
pGia
,
pObj
),
Gia_ObjFaninC0
(
pObj
)
)
->
D
;
Required
=
p
->
pPars
->
fDoAverage
?
Required
*
(
100
.
0
+
p
->
pPars
->
nRelaxRatio
)
/
100
.
0
:
p
->
pPars
->
MapDelay
;
// if external required time can be achieved, use it
if
(
p
->
pGia
->
vOutReqs
&&
Vec_FltEntry
(
p
->
pGia
->
vOutReqs
,
i
)
>
0
&&
Required
<=
Vec_FltEntry
(
p
->
pGia
->
vOutReqs
,
i
)
)
Required
=
Vec_FltEntry
(
p
->
pGia
->
vOutReqs
,
i
);
// if external required cannot be achieved, set the earliest possible arrival time
// else if ( p->pGia->vOutReqs && Vec_FltEntry(p->pGia->vOutReqs, i) > 0 && Required > Vec_FltEntry(p->pGia->vOutReqs, i) )
// ptTime->Rise = ptTime->Fall = ptTime->Worst = Required;
// otherwise, set the global required time
Nf_ObjUpdateRequired
(
p
,
Gia_ObjFaninId0p
(
p
->
pGia
,
pObj
),
Gia_ObjFaninC0
(
pObj
),
Required
);
Nf_ObjMapRefInc
(
p
,
Gia_ObjFaninId0p
(
p
->
pGia
,
pObj
),
Gia_ObjFaninC0
(
pObj
));
}
...
...
@@ -2111,7 +2121,7 @@ Gia_Man_t * Nf_ManPerformMapping( Gia_Man_t * pGia, Jf_Par_t * pPars )
Nf_ManComputeCuts
(
p
);
Nf_ManPrintQuit
(
p
);
Gia_ManForEachCiId
(
p
->
pGia
,
Id
,
i
)
Nf_ObjPrepareCi
(
p
,
Id
);
Nf_ObjPrepareCi
(
p
,
Id
,
p
->
pGia
->
vInArrs
?
Vec_FltEntry
(
p
->
pGia
->
vInArrs
,
i
)
:
0
.
0
);
for
(
p
->
Iter
=
0
;
p
->
Iter
<
p
->
pPars
->
nRounds
;
p
->
Iter
++
)
{
Nf_ManComputeMapping
(
p
);
...
...
src/base/abci/abc.c
View file @
8453afcf
...
...
@@ -25884,12 +25884,21 @@ int Abc_CommandAbc9Get( Abc_Frame_t * pAbc, int argc, char ** argv )
pGia
=
Gia_ManFromAig
(
pAig
);
Aig_ManStop
(
pAig
);
}
//
replace
//
copy names
if
(
fNames
)
{
pGia
->
vNamesIn
=
Abc_NtkCollectCiNames
(
pAbc
->
pNtkCur
);
pGia
->
vNamesOut
=
Abc_NtkCollectCoNames
(
pAbc
->
pNtkCur
);
}
// copy user timing information
if
(
pAbc
->
pNtkCur
->
pManTime
!=
NULL
)
{
Abc_Ntk_t
*
pNtk
=
pAbc
->
pNtkCur
;
Vec_FltFreeP
(
&
pGia
->
vInArrs
);
Vec_FltFreeP
(
&
pGia
->
vOutReqs
);
pGia
->
vInArrs
=
Vec_FltAllocArray
(
Abc_NtkGetCiArrivalFloats
(
pNtk
),
Abc_NtkCiNum
(
pNtk
)
);
pGia
->
vOutReqs
=
Vec_FltAllocArray
(
Abc_NtkGetCiArrivalFloats
(
pNtk
),
Abc_NtkCoNum
(
pNtk
)
);
}
Abc_FrameUpdateGia
(
pAbc
,
pGia
);
return
0
;
...
...
@@ -26003,6 +26012,19 @@ int Abc_CommandAbc9Put( Abc_Frame_t * pAbc, int argc, char ** argv )
}
}
}
// transfer timing information
if
(
pAbc
->
pGia
->
vInArrs
||
pAbc
->
pGia
->
vOutReqs
)
{
Abc_Obj_t
*
pObj
;
int
i
;
Abc_NtkTimeInitialize
(
pNtk
,
NULL
);
if
(
pAbc
->
pGia
->
vInArrs
)
Abc_NtkForEachCi
(
pNtk
,
pObj
,
i
)
Abc_NtkTimeSetArrival
(
pNtk
,
Abc_ObjId
(
pObj
),
Vec_FltEntry
(
pAbc
->
pGia
->
vInArrs
,
i
),
Vec_FltEntry
(
pAbc
->
pGia
->
vInArrs
,
i
)
);
if
(
pAbc
->
pGia
->
vOutReqs
)
Abc_NtkForEachCo
(
pNtk
,
pObj
,
i
)
Abc_NtkTimeSetRequired
(
pNtk
,
Abc_ObjId
(
pObj
),
Vec_FltEntry
(
pAbc
->
pGia
->
vOutReqs
,
i
),
Vec_FltEntry
(
pAbc
->
pGia
->
vOutReqs
,
i
)
);
}
// replace the current network
Abc_FrameReplaceCurrentNetwork
(
pAbc
,
pNtk
);
if
(
fStatusClear
)
src/base/abci/abcPrint.c
View file @
8453afcf
...
...
@@ -286,12 +286,15 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum
Abc_Print
(
1
,
" bdd =%6d"
,
Abc_NtkGetBddNodeNum
(
pNtk
)
-
nSingles
);
else
if
(
Abc_NtkHasMapping
(
pNtk
)
)
{
int
fHasTimeMan
=
(
int
)(
pNtk
->
pManTime
!=
NULL
);
assert
(
pNtk
->
pManFunc
==
Abc_FrameReadLibGen
()
);
Abc_Print
(
1
,
" area =%5.2f"
,
Abc_NtkGetMappedArea
(
pNtk
)
);
Abc_Print
(
1
,
" delay =%5.2f"
,
Abc_NtkDelayTrace
(
pNtk
,
NULL
,
NULL
,
0
)
);
if
(
pNtk
->
pManTime
)
if
(
!
fHasTimeMan
&&
pNtk
->
pManTime
)
{
Abc_ManTimeStop
(
pNtk
->
pManTime
);
pNtk
->
pManTime
=
NULL
;
pNtk
->
pManTime
=
NULL
;
}
}
else
if
(
!
Abc_NtkHasBlackbox
(
pNtk
)
)
{
...
...
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