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
d80071be
Commit
d80071be
authored
Mar 26, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing a bug in &cycle, which could generate an unreachable state.
parent
93b10316
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
src/aig/gia/giaDup.c
+8
-9
No files found.
src/aig/gia/giaDup.c
View file @
d80071be
...
...
@@ -442,13 +442,12 @@ void Gia_ManCycle( Gia_Man_t * p, int nFrames )
{
Gia_Obj_t
*
pObj
,
*
pObjRi
,
*
pObjRo
;
int
i
,
k
;
// Gia_ManRandom( 1 );
// assign random primary inputs
Gia_ManForEachPi
(
p
,
pObj
,
k
)
pObj
->
fMark0
=
(
1
&
Gia_ManRandom
(
0
));
Gia_ManRandom
(
1
);
// iterate for the given number of frames
for
(
i
=
0
;
i
<
nFrames
;
i
++
)
{
Gia_ManForEachPi
(
p
,
pObj
,
k
)
pObj
->
fMark0
=
(
1
&
Gia_ManRandom
(
0
));
Gia_ManForEachAnd
(
p
,
pObj
,
k
)
pObj
->
fMark0
=
(
Gia_ObjFanin0
(
pObj
)
->
fMark0
^
Gia_ObjFaninC0
(
pObj
))
&
(
Gia_ObjFanin1
(
pObj
)
->
fMark0
^
Gia_ObjFaninC1
(
pObj
));
...
...
@@ -461,16 +460,16 @@ void Gia_ManCycle( Gia_Man_t * p, int nFrames )
Gia_Man_t
*
Gia_ManDupCycled
(
Gia_Man_t
*
p
,
int
nFrames
)
{
Gia_Man_t
*
pNew
;
Vec_
In
t_t
*
vInits
;
Vec_
Bi
t_t
*
vInits
;
Gia_Obj_t
*
pObj
;
int
i
;
Gia_ManCleanMark0
(
p
);
Gia_ManCycle
(
p
,
nFrames
);
vInits
=
Vec_
In
tAlloc
(
Gia_ManRegNum
(
p
)
);
vInits
=
Vec_
Bi
tAlloc
(
Gia_ManRegNum
(
p
)
);
Gia_ManForEachRo
(
p
,
pObj
,
i
)
Vec_
In
tPush
(
vInits
,
pObj
->
fMark0
);
pNew
=
Gia_ManDupFlip
(
p
,
Vec_
In
tArray
(
vInits
)
);
Vec_
In
tFree
(
vInits
);
Vec_
Bi
tPush
(
vInits
,
pObj
->
fMark0
);
pNew
=
Gia_ManDupFlip
(
p
,
Vec_
Bi
tArray
(
vInits
)
);
Vec_
Bi
tFree
(
vInits
);
Gia_ManCleanMark0
(
p
);
return
pNew
;
}
...
...
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