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
b30791ba
Commit
b30791ba
authored
Feb 29, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating 'print_library' to write GENLIB library into a file.
parent
d5480404
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
src/map/mio/mio.c
+20
-10
No files found.
src/map/mio/mio.c
View file @
b30791ba
...
@@ -419,8 +419,9 @@ usage:
...
@@ -419,8 +419,9 @@ usage:
***********************************************************************/
***********************************************************************/
int
Mio_CommandPrintLibrary
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Mio_CommandPrintLibrary
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
FILE
*
pOut
,
*
pErr
;
FILE
*
pOut
,
*
pErr
,
*
pFile
;
Abc_Ntk_t
*
pNet
;
Abc_Ntk_t
*
pNet
;
char
*
FileName
;
int
fVerbose
;
int
fVerbose
;
int
c
;
int
c
;
...
@@ -445,22 +446,31 @@ int Mio_CommandPrintLibrary( Abc_Frame_t * pAbc, int argc, char **argv )
...
@@ -445,22 +446,31 @@ int Mio_CommandPrintLibrary( Abc_Frame_t * pAbc, int argc, char **argv )
goto
usage
;
goto
usage
;
}
}
}
}
FileName
=
argv
[
globalUtilOptind
];
if
(
argc
==
globalUtilOptind
+
1
)
if
(
argc
!=
globalUtilOptind
)
{
{
goto
usage
;
pFile
=
fopen
(
FileName
,
"w"
);
if
(
pFile
==
NULL
)
{
printf
(
"Error! Cannot open file
\"
%s
\"
for writing the library.
\n
"
,
FileName
);
return
1
;
}
Mio_WriteLibrary
(
pFile
,
(
Mio_Library_t
*
)
Abc_FrameReadLibGen
(),
0
);
fclose
(
pFile
);
printf
(
"The current GENLIB library is written into file
\"
%s
\"
.
\n
"
,
FileName
);
}
}
else
if
(
argc
==
globalUtilOptind
)
// set the new network
Mio_WriteLibrary
(
stdout
,
(
Mio_Library_t
*
)
Abc_FrameReadLibGen
(),
0
);
Mio_WriteLibrary
(
stdout
,
(
Mio_Library_t
*
)
Abc_FrameReadLibGen
(),
0
);
else
goto
usage
;
return
0
;
return
0
;
usage:
usage:
fprintf
(
pErr
,
"
\n
usage: print_library [-vh]
\n
"
);
fprintf
(
pErr
,
"
\n
usage: print_library [-vh]
<file>
\n
"
);
fprintf
(
pErr
,
"
\t
print the current genlib library
\n
"
);
fprintf
(
pErr
,
"
\t
print the current genlib library
\n
"
);
fprintf
(
pErr
,
"
\t
-v : toggles enabling of verbose output [default = %s]
\n
"
,
(
fVerbose
?
"yes"
:
"no"
)
);
fprintf
(
pErr
,
"
\t
-v : toggles enabling of verbose output [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
fprintf
(
pErr
,
"
\t
-h : print the command usage
\n
"
);
fprintf
(
pErr
,
"
\t
-h : print the command usage
\n
"
);
fprintf
(
pErr
,
"
\t
<file> : optional file name to write the library
\n
"
);
return
1
;
/* error exit */
return
1
;
/* error exit */
}
}
...
...
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