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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
src/map/mio/mio.c
+19
-9
No files found.
src/map/mio/mio.c
View file @
b30791ba
...
...
@@ -419,8 +419,9 @@ usage:
***********************************************************************/
int
Mio_CommandPrintLibrary
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
FILE
*
pOut
,
*
pErr
;
FILE
*
pOut
,
*
pErr
,
*
pFile
;
Abc_Ntk_t
*
pNet
;
char
*
FileName
;
int
fVerbose
;
int
c
;
...
...
@@ -445,22 +446,31 @@ int Mio_CommandPrintLibrary( Abc_Frame_t * pAbc, int argc, char **argv )
goto
usage
;
}
}
if
(
argc
!=
globalUtilOptind
)
FileName
=
argv
[
globalUtilOptind
];
if
(
argc
==
globalUtilOptind
+
1
)
{
goto
usage
;
pFile
=
fopen
(
FileName
,
"w"
);
if
(
pFile
==
NULL
)
{
printf
(
"Error! Cannot open file
\"
%s
\"
for writing the library.
\n
"
,
FileName
);
return
1
;
}
// set the new network
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
)
Mio_WriteLibrary
(
stdout
,
(
Mio_Library_t
*
)
Abc_FrameReadLibGen
(),
0
);
else
goto
usage
;
return
0
;
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
-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
<file> : optional file name to write the library
\n
"
);
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