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
27c3ff1f
Commit
27c3ff1f
authored
Jun 28, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New computation of tents for GIA package.
parent
7629fd6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
2 deletions
+61
-2
src/aig/gia/giaMan.c
+61
-2
No files found.
src/aig/gia/giaMan.c
View file @
27c3ff1f
...
...
@@ -352,6 +352,64 @@ void Gia_ManPrintPlacement( Gia_Man_t * p )
printf
(
"Placement: Objects = %8d. Fixed = %8d. Undef = %8d.
\n
"
,
Gia_ManObjNum
(
p
),
nFixed
,
nUndef
);
}
/**Function*************************************************************
Synopsis [Duplicates AIG for unrolling.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Gia_ManPrintTents_rec
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
,
Vec_Int_t
*
vObjs
)
{
if
(
Gia_ObjIsTravIdCurrent
(
p
,
pObj
)
)
return
;
Gia_ObjSetTravIdCurrent
(
p
,
pObj
);
Vec_IntPush
(
vObjs
,
Gia_ObjId
(
p
,
pObj
)
);
if
(
Gia_ObjIsCi
(
pObj
)
)
return
;
Gia_ManPrintTents_rec
(
p
,
Gia_ObjFanin0
(
pObj
),
vObjs
);
if
(
Gia_ObjIsAnd
(
pObj
)
)
Gia_ManPrintTents_rec
(
p
,
Gia_ObjFanin1
(
pObj
),
vObjs
);
}
void
Gia_ManPrintTents
(
Gia_Man_t
*
p
)
{
Vec_Int_t
*
vObjs
;
Gia_Obj_t
*
pObj
;
int
t
,
i
,
iObjId
,
nSizePrev
,
nSizeCurr
;
assert
(
Gia_ManPoNum
(
p
)
>
0
);
vObjs
=
Vec_IntAlloc
(
100
);
// save constant class
Gia_ManIncrementTravId
(
p
);
Gia_ObjSetTravIdCurrent
(
p
,
Gia_ManConst0
(
p
)
);
Vec_IntPush
(
vObjs
,
0
);
// create starting root
nSizePrev
=
Vec_IntSize
(
vObjs
);
Gia_ManForEachPo
(
p
,
pObj
,
i
)
Gia_ManPrintTents_rec
(
p
,
pObj
,
vObjs
);
// build tents
printf
(
"Tents: "
);
for
(
t
=
1
;
nSizePrev
<
Vec_IntSize
(
vObjs
);
t
++
)
{
nSizeCurr
=
Vec_IntSize
(
vObjs
);
Vec_IntForEachEntryStartStop
(
vObjs
,
iObjId
,
i
,
nSizePrev
,
nSizeCurr
)
if
(
Gia_ObjIsRo
(
p
,
Gia_ManObj
(
p
,
iObjId
))
)
Gia_ManPrintTents_rec
(
p
,
Gia_ObjRoToRi
(
p
,
Gia_ManObj
(
p
,
iObjId
)),
vObjs
);
printf
(
"%d=%d "
,
t
,
nSizeCurr
-
nSizePrev
);
nSizePrev
=
nSizeCurr
;
}
printf
(
" Unused=%d
\n
"
,
Gia_ManObjNum
(
p
)
-
Vec_IntSize
(
vObjs
)
);
Vec_IntFree
(
vObjs
);
// the remaining objects are PIs without fanout
// Gia_ManForEachObj( p, pObj, i )
// if ( !Gia_ObjIsTravIdCurrent(p, pObj) )
// Gia_ObjPrint( p, pObj );
}
/**Function*************************************************************
Synopsis [Prints stats for the AIG.]
...
...
@@ -406,11 +464,12 @@ void Gia_ManPrintStats( Gia_Man_t * p, int fTents, int fSwitch )
Gia_Man_t
*
pNew
=
Gia_ManUnrollDup
(
p
,
vLimit
);
printf
(
"Tents: "
);
Vec_IntForEachEntryStart
(
vLimit
,
Entry
,
k
,
1
)
printf
(
"%d
=
%d "
,
k
,
Entry
-
Prev
),
Prev
=
Entry
;
printf
(
" Unused
=
%d."
,
Gia_ManObjNum
(
p
)
-
Gia_ManObjNum
(
pNew
)
);
printf
(
"%d
=
%d "
,
k
,
Entry
-
Prev
),
Prev
=
Entry
;
printf
(
" Unused
=
%d."
,
Gia_ManObjNum
(
p
)
-
Gia_ManObjNum
(
pNew
)
);
printf
(
"
\n
"
);
Vec_IntFree
(
vLimit
);
Gia_ManStop
(
pNew
);
Gia_ManPrintTents
(
p
);
}
}
...
...
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