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
c16f5d64
Commit
c16f5d64
authored
Nov 12, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix in GLA PBA.
parent
3beb3677
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
src/aig/gia/gia.h
+2
-0
src/aig/gia/giaDup.c
+17
-5
No files found.
src/aig/gia/gia.h
View file @
c16f5d64
...
@@ -350,6 +350,8 @@ static inline int Gia_ObjFaninLit1p( Gia_Man_t * p, Gia_Obj_t * pObj) {
...
@@ -350,6 +350,8 @@ static inline int Gia_ObjFaninLit1p( Gia_Man_t * p, Gia_Obj_t * pObj) {
static
inline
void
Gia_ObjFlipFaninC0
(
Gia_Obj_t
*
pObj
)
{
assert
(
Gia_ObjIsCo
(
pObj
)
);
pObj
->
fCompl0
^=
1
;
}
static
inline
void
Gia_ObjFlipFaninC0
(
Gia_Obj_t
*
pObj
)
{
assert
(
Gia_ObjIsCo
(
pObj
)
);
pObj
->
fCompl0
^=
1
;
}
static
inline
int
Gia_ObjWhatFanin
(
Gia_Obj_t
*
pObj
,
Gia_Obj_t
*
pFanin
)
{
return
Gia_ObjFanin0
(
pObj
)
==
pFanin
?
0
:
(
Gia_ObjFanin1
(
pObj
)
==
pFanin
?
1
:
-
1
);
}
static
inline
int
Gia_ObjWhatFanin
(
Gia_Obj_t
*
pObj
,
Gia_Obj_t
*
pFanin
)
{
return
Gia_ObjFanin0
(
pObj
)
==
pFanin
?
0
:
(
Gia_ObjFanin1
(
pObj
)
==
pFanin
?
1
:
-
1
);
}
static
inline
Gia_Obj_t
*
Gia_ObjCopy
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
return
Gia_ManObj
(
p
,
Gia_Lit2Var
(
pObj
->
Value
)
);
}
static
inline
int
Gia_ObjFanin0Copy
(
Gia_Obj_t
*
pObj
)
{
return
Gia_LitNotCond
(
Gia_ObjFanin0
(
pObj
)
->
Value
,
Gia_ObjFaninC0
(
pObj
)
);
}
static
inline
int
Gia_ObjFanin0Copy
(
Gia_Obj_t
*
pObj
)
{
return
Gia_LitNotCond
(
Gia_ObjFanin0
(
pObj
)
->
Value
,
Gia_ObjFaninC0
(
pObj
)
);
}
static
inline
int
Gia_ObjFanin1Copy
(
Gia_Obj_t
*
pObj
)
{
return
Gia_LitNotCond
(
Gia_ObjFanin1
(
pObj
)
->
Value
,
Gia_ObjFaninC1
(
pObj
)
);
}
static
inline
int
Gia_ObjFanin1Copy
(
Gia_Obj_t
*
pObj
)
{
return
Gia_LitNotCond
(
Gia_ObjFanin1
(
pObj
)
->
Value
,
Gia_ObjFaninC1
(
pObj
)
);
}
...
...
src/aig/gia/giaDup.c
View file @
c16f5d64
...
@@ -1619,7 +1619,7 @@ Gia_Man_t * Gia_ManDupAbsGates( Gia_Man_t * p, Vec_Int_t * vGateClasses )
...
@@ -1619,7 +1619,7 @@ Gia_Man_t * Gia_ManDupAbsGates( Gia_Man_t * p, Vec_Int_t * vGateClasses )
{
{
Vec_Int_t
*
vAssigned
,
*
vPis
,
*
vPPis
,
*
vFlops
,
*
vNodes
;
Vec_Int_t
*
vAssigned
,
*
vPis
,
*
vPPis
,
*
vFlops
,
*
vNodes
;
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Obj_t
*
pObj
;
Gia_Obj_t
*
pObj
,
*
pCopy
;
int
i
,
nFlops
=
0
;
int
i
,
nFlops
=
0
;
assert
(
Gia_ManPoNum
(
p
)
==
1
);
assert
(
Gia_ManPoNum
(
p
)
==
1
);
assert
(
Vec_IntSize
(
vGateClasses
)
==
Gia_ManObjNum
(
p
)
);
assert
(
Vec_IntSize
(
vGateClasses
)
==
Gia_ManObjNum
(
p
)
);
...
@@ -1672,11 +1672,23 @@ Gia_Man_t * Gia_ManDupAbsGates( Gia_Man_t * p, Vec_Int_t * vGateClasses )
...
@@ -1672,11 +1672,23 @@ Gia_Man_t * Gia_ManDupAbsGates( Gia_Man_t * p, Vec_Int_t * vGateClasses )
Gia_ObjRoToRi
(
p
,
pObj
)
->
Value
=
Gia_ManAppendCo
(
pNew
,
Gia_ObjFanin0Copy
(
Gia_ObjRoToRi
(
p
,
pObj
))
);
Gia_ObjRoToRi
(
p
,
pObj
)
->
Value
=
Gia_ManAppendCo
(
pNew
,
Gia_ObjFanin0Copy
(
Gia_ObjRoToRi
(
p
,
pObj
))
);
Gia_ManSetRegNum
(
pNew
,
Vec_IntSize
(
vFlops
)
);
Gia_ManSetRegNum
(
pNew
,
Vec_IntSize
(
vFlops
)
);
// clean up
// clean up
//
pNew = Gia_ManSeqCleanup( pTemp = pNew );
pNew
=
Gia_ManSeqCleanup
(
pTemp
=
pNew
);
pNew
=
Gia_ManCleanup
(
pTemp
=
pNew
);
// transfer copy values: (p -> pTemp -> pNew) => (p -> pNew)
if
(
Gia_ManObjNum
(
pTemp
)
!=
Gia_ManObjNum
(
pNew
)
)
if
(
Gia_ManObjNum
(
pTemp
)
!=
Gia_ManObjNum
(
pNew
)
)
printf
(
"Gia_ManDupAbsGates() Internal error: object mismatch.
\n
"
);
{
assert
(
Gia_ManObjNum
(
pTemp
)
==
Gia_ManObjNum
(
pNew
)
);
// printf( "Gia_ManDupAbsGates() Internal error: object mismatch.\n" );
Gia_ManForEachObj
(
p
,
pObj
,
i
)
{
if
(
!~
pObj
->
Value
)
continue
;
assert
(
!
Gia_LitIsCompl
(
pObj
->
Value
)
);
pCopy
=
Gia_ObjCopy
(
pTemp
,
pObj
);
if
(
!~
pCopy
->
Value
)
continue
;
assert
(
!
Gia_LitIsCompl
(
pCopy
->
Value
)
);
pObj
->
Value
=
pCopy
->
Value
;
}
}
Gia_ManStop
(
pTemp
);
Gia_ManStop
(
pTemp
);
Vec_IntFree
(
vPis
);
Vec_IntFree
(
vPis
);
...
...
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