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
02393a2a
Commit
02393a2a
authored
Dec 17, 2019
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix in collapsing with boxes.
parent
7a9311ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
1 deletions
+51
-1
src/aig/gia/giaTim.c
+51
-1
No files found.
src/aig/gia/giaTim.c
View file @
02393a2a
...
@@ -732,6 +732,49 @@ Gia_Man_t * Gia_ManUpdateExtraAig2( void * pTime, Gia_Man_t * p, Vec_Int_t * vBo
...
@@ -732,6 +732,49 @@ Gia_Man_t * Gia_ManUpdateExtraAig2( void * pTime, Gia_Man_t * p, Vec_Int_t * vBo
/**Function*************************************************************
/**Function*************************************************************
Synopsis [Duplicates AIG while moving the last CIs to be after PIs.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Gia_Man_t
*
Gia_ManDupMoveLast
(
Gia_Man_t
*
p
,
int
iInsert
,
int
nItems
)
{
Gia_Man_t
*
pNew
;
Gia_Obj_t
*
pObj
;
int
i
;
pNew
=
Gia_ManStart
(
Gia_ManObjNum
(
p
)
);
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pName
);
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
Gia_ManConst0
(
p
)
->
Value
=
0
;
Gia_ManForEachCi
(
p
,
pObj
,
i
)
if
(
i
<
iInsert
)
pObj
->
Value
=
Gia_ManAppendCi
(
pNew
);
Gia_ManForEachCi
(
p
,
pObj
,
i
)
if
(
i
>=
Gia_ManCiNum
(
p
)
-
nItems
)
pObj
->
Value
=
Gia_ManAppendCi
(
pNew
);
Gia_ManForEachCi
(
p
,
pObj
,
i
)
if
(
i
>=
iInsert
&&
i
<
Gia_ManCiNum
(
p
)
-
nItems
)
pObj
->
Value
=
Gia_ManAppendCi
(
pNew
);
Gia_ManForEachObj1
(
p
,
pObj
,
i
)
{
if
(
Gia_ObjIsCi
(
pObj
)
)
continue
;
if
(
Gia_ObjIsAnd
(
pObj
)
)
pObj
->
Value
=
Gia_ManAppendAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
else
if
(
Gia_ObjIsCo
(
pObj
)
)
pObj
->
Value
=
Gia_ManAppendCo
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
)
);
else
assert
(
0
);
}
Gia_ManSetRegNum
(
pNew
,
Gia_ManRegNum
(
p
)
);
return
pNew
;
}
/**Function*************************************************************
Synopsis [Computes AIG with boxes.]
Synopsis [Computes AIG with boxes.]
Description []
Description []
...
@@ -762,7 +805,7 @@ Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * v
...
@@ -762,7 +805,7 @@ Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * v
Tim_Man_t
*
pManTime
=
(
Tim_Man_t
*
)
p
->
pManTime
;
Tim_Man_t
*
pManTime
=
(
Tim_Man_t
*
)
p
->
pManTime
;
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Obj_t
*
pObj
,
*
pObjBox
;
Gia_Obj_t
*
pObj
,
*
pObjBox
;
int
i
,
k
,
curCi
,
curCo
,
nBBins
=
0
,
nBBouts
=
0
;
int
i
,
k
,
curCi
,
curCo
,
nBBins
=
0
,
nBBouts
=
0
,
nNewPis
=
0
;
assert
(
!
fSeq
||
p
->
vRegClasses
);
assert
(
!
fSeq
||
p
->
vRegClasses
);
//assert( Gia_ManRegNum(p) == 0 );
//assert( Gia_ManRegNum(p) == 0 );
assert
(
Gia_ManCiNum
(
p
)
==
Tim_ManPiNum
(
pManTime
)
+
Gia_ManCoNum
(
pBoxes
)
);
assert
(
Gia_ManCiNum
(
p
)
==
Tim_ManPiNum
(
pManTime
)
+
Gia_ManCoNum
(
pBoxes
)
);
...
@@ -810,6 +853,7 @@ Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * v
...
@@ -810,6 +853,7 @@ Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * v
pObj
->
Value
=
fSkip
?
0
:
Gia_ManAppendCi
(
pNew
);
pObj
->
Value
=
fSkip
?
0
:
Gia_ManAppendCi
(
pNew
);
Gia_ObjSetTravIdCurrent
(
p
,
pObj
);
Gia_ObjSetTravIdCurrent
(
p
,
pObj
);
nBBins
++
;
nBBins
++
;
nNewPis
+=
!
fSkip
;
}
}
}
}
else
else
...
@@ -855,6 +899,12 @@ Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * v
...
@@ -855,6 +899,12 @@ Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * v
pNew
=
Gia_ManCleanup
(
pTemp
=
pNew
);
pNew
=
Gia_ManCleanup
(
pTemp
=
pNew
);
Gia_ManCleanupRemap
(
p
,
pTemp
);
Gia_ManCleanupRemap
(
p
,
pTemp
);
Gia_ManStop
(
pTemp
);
Gia_ManStop
(
pTemp
);
if
(
nNewPis
)
{
pNew
=
Gia_ManDupMoveLast
(
pTemp
=
pNew
,
Tim_ManPiNum
(
pManTime
)
-
Gia_ManRegNum
(
pNew
),
nNewPis
);
Gia_ManCleanupRemap
(
p
,
pTemp
);
Gia_ManStop
(
pTemp
);
}
/*
/*
printf( "%d = %d - %d Diff = %d\n",
printf( "%d = %d - %d Diff = %d\n",
Tim_ManPoNum(pManTime), Gia_ManCoNum(pNew), nBBouts,
Tim_ManPoNum(pManTime), Gia_ManCoNum(pNew), nBBouts,
...
...
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