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
2fca2b2b
Commit
2fca2b2b
authored
Nov 21, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix in reading flop classes.
parent
9e6d74bc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
src/aig/gia/giaAiger.c
+8
-6
No files found.
src/aig/gia/giaAiger.c
View file @
2fca2b2b
...
@@ -571,10 +571,12 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fSkipS
...
@@ -571,10 +571,12 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fSkipS
// read flop classes
// read flop classes
else
if
(
*
pCur
==
'f'
)
else
if
(
*
pCur
==
'f'
)
{
{
int
nFlops
;
pCur
++
;
pCur
++
;
assert
(
Gia_AigerReadInt
(
pCur
)
==
4
*
Gia_ManRegNum
(
pNew
)
);
pCur
+=
4
;
nFlops
=
Gia_AigerReadInt
(
pCur
);
pCur
+=
4
;
pNew
->
vFlopClasses
=
Vec_IntStart
(
Gia_ManRegNum
(
pNew
)
);
//assert( Gia_AigerReadInt(pCur) == 4*Gia_ManRegNum(pNew) ); pCur += 4;
memcpy
(
Vec_IntArray
(
pNew
->
vFlopClasses
),
pCur
,
4
*
Gia_ManRegNum
(
pNew
)
);
pCur
+=
4
*
Gia_ManRegNum
(
pNew
);
pNew
->
vFlopClasses
=
Vec_IntStart
(
nFlops
);
memcpy
(
Vec_IntArray
(
pNew
->
vFlopClasses
),
pCur
,
4
*
nFlops
);
pCur
+=
4
*
nFlops
;
if
(
fVerbose
)
printf
(
"Finished reading extension
\"
f
\"
.
\n
"
);
if
(
fVerbose
)
printf
(
"Finished reading extension
\"
f
\"
.
\n
"
);
}
}
// read gate classes
// read gate classes
...
@@ -1186,9 +1188,9 @@ void Gia_AigerWrite( Gia_Man_t * pInit, char * pFileName, int fWriteSymbols, int
...
@@ -1186,9 +1188,9 @@ void Gia_AigerWrite( Gia_Man_t * pInit, char * pFileName, int fWriteSymbols, int
if
(
p
->
vFlopClasses
)
if
(
p
->
vFlopClasses
)
{
{
fprintf
(
pFile
,
"f"
);
fprintf
(
pFile
,
"f"
);
Gia_FileWriteBufferSize
(
pFile
,
4
*
Gia_ManRegNum
(
p
)
);
Gia_FileWriteBufferSize
(
pFile
,
4
*
Vec_IntSize
(
p
->
vFlopClasses
)
);
assert
(
Vec_IntSize
(
p
->
vFlopClasses
)
==
Gia_ManRegNum
(
p
)
);
//
assert( Vec_IntSize(p->vFlopClasses) == Gia_ManRegNum(p) );
fwrite
(
Vec_IntArray
(
p
->
vFlopClasses
),
1
,
4
*
Gia_ManRegNum
(
p
),
pFile
);
fwrite
(
Vec_IntArray
(
p
->
vFlopClasses
),
1
,
4
*
Vec_IntSize
(
p
->
vFlopClasses
),
pFile
);
}
}
// write gate classes
// write gate classes
if
(
p
->
vGateClasses
)
if
(
p
->
vGateClasses
)
...
...
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