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
d785775f
Commit
d785775f
authored
Apr 28, 2023
by
Andrey Rogov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. Fix bug (using pDesign without check if == NULL)
2. Switch type of variables containing file size to (int => long)
parent
b4170615
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
src/base/io/ioReadBlifMv.c
+5
-5
src/base/io/ioUtil.c
+3
-1
src/opt/sim/simUtils.c
+2
-1
No files found.
src/base/io/ioReadBlifMv.c
View file @
d785775f
...
...
@@ -548,10 +548,10 @@ typedef struct buflist {
struct
buflist
*
next
;
}
buflist
;
char
*
Io_MvLoadFileBz2
(
char
*
pFileName
,
int
*
pnFileSize
)
char
*
Io_MvLoadFileBz2
(
char
*
pFileName
,
long
*
pnFileSize
)
{
FILE
*
pFile
;
int
nFileSize
=
0
;
long
nFileSize
=
0
;
char
*
pContents
;
BZFILE
*
b
;
int
bzError
,
RetValue
;
...
...
@@ -628,12 +628,12 @@ char * Io_MvLoadFileBz2( char * pFileName, int * pnFileSize )
SeeAlso []
***********************************************************************/
static
char
*
Io_MvLoadFileGz
(
char
*
pFileName
,
int
*
pnFileSize
)
static
char
*
Io_MvLoadFileGz
(
char
*
pFileName
,
long
*
pnFileSize
)
{
const
int
READ_BLOCK_SIZE
=
100000
;
gzFile
pFile
;
char
*
pContents
;
int
amtRead
,
readBlock
,
nFileSize
=
READ_BLOCK_SIZE
;
long
amtRead
,
readBlock
,
nFileSize
=
READ_BLOCK_SIZE
;
pFile
=
gzopen
(
pFileName
,
"rb"
);
// if pFileName doesn't end in ".gz" then this acts as a passthrough to fopen
pContents
=
ABC_ALLOC
(
char
,
nFileSize
);
readBlock
=
0
;
...
...
@@ -665,7 +665,7 @@ static char * Io_MvLoadFileGz( char * pFileName, int * pnFileSize )
static
char
*
Io_MvLoadFile
(
char
*
pFileName
)
{
FILE
*
pFile
;
int
nFileSize
;
long
nFileSize
;
char
*
pContents
;
int
RetValue
;
if
(
!
strncmp
(
pFileName
+
strlen
(
pFileName
)
-
4
,
".bz2"
,
4
)
)
...
...
src/base/io/ioUtil.c
View file @
d785775f
...
...
@@ -157,8 +157,10 @@ Abc_Ntk_t * Io_ReadNetlist( char * pFileName, Io_FileType_t FileType, int fCheck
fprintf
(
stdout
,
"Reading network from file has failed.
\n
"
);
return
NULL
;
}
if
(
fCheck
&&
(
Abc_NtkBlackboxNum
(
pNtk
)
||
Abc_NtkWhiteboxNum
(
pNtk
))
)
if
(
fCheck
&&
(
Abc_NtkBlackboxNum
(
pNtk
)
||
Abc_NtkWhiteboxNum
(
pNtk
))
&&
pNtk
->
pDesign
)
{
int
i
,
fCycle
=
0
;
Abc_Ntk_t
*
pModel
;
// fprintf( stdout, "Warning: The network contains hierarchy.\n" );
...
...
src/opt/sim/simUtils.c
View file @
d785775f
...
...
@@ -60,7 +60,8 @@ Vec_Ptr_t * Sim_UtilInfoAlloc( int nSize, int nWords, int fClean )
int
i
;
assert
(
nSize
>
0
&&
nWords
>
0
);
vInfo
=
Vec_PtrAlloc
(
nSize
);
vInfo
->
pArray
[
0
]
=
ABC_ALLOC
(
unsigned
,
nSize
*
nWords
);
vInfo
->
pArray
[
0
]
=
ABC_ALLOC
(
unsigned
,
(
long
)
nSize
*
(
long
)
nWords
);
assert
(
vInfo
->
pArray
[
0
]);
if
(
fClean
)
memset
(
vInfo
->
pArray
[
0
],
0
,
sizeof
(
unsigned
)
*
nSize
*
nWords
);
for
(
i
=
1
;
i
<
nSize
;
i
++
)
...
...
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