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
bc44087b
Commit
bc44087b
authored
Sep 20, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified 'read' to read all types of libraries (genlib, liberty, scl).
parent
fdfb083c
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
8 deletions
+27
-8
src/base/io/io.c
+16
-2
src/base/io/ioAbc.h
+1
-0
src/map/amap/amap.h
+1
-1
src/map/amap/amapInt.h
+1
-0
src/map/amap/amapLiberty.c
+2
-2
src/map/mio/mio.c
+5
-2
src/misc/extra/extraUtilFile.c
+1
-1
No files found.
src/base/io/io.c
View file @
bc44087b
...
...
@@ -165,10 +165,10 @@ void Io_End( Abc_Frame_t * pAbc )
***********************************************************************/
int
IoCommandRead
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
char
Command
[
1000
];
Abc_Ntk_t
*
pNtk
;
char
*
pFileName
,
*
pTemp
;
int
fCheck
;
int
c
;
int
c
,
fCheck
;
fCheck
=
1
;
glo_fMapped
=
0
;
...
...
@@ -197,6 +197,20 @@ int IoCommandRead( Abc_Frame_t * pAbc, int argc, char ** argv )
for
(
pTemp
=
pFileName
;
*
pTemp
;
pTemp
++
)
if
(
*
pTemp
==
'>'
)
*
pTemp
=
'\\'
;
// read libraries
Command
[
0
]
=
0
;
assert
(
strlen
(
pFileName
)
<
900
);
if
(
!
strcmp
(
Extra_FileNameExtension
(
pFileName
),
"genlib"
)
)
sprintf
(
Command
,
"read_library %s"
,
pFileName
);
else
if
(
!
strcmp
(
Extra_FileNameExtension
(
pFileName
),
"lib"
)
)
sprintf
(
Command
,
"read_liberty %s"
,
pFileName
);
else
if
(
!
strcmp
(
Extra_FileNameExtension
(
pFileName
),
"scl"
)
)
sprintf
(
Command
,
"read_scl %s"
,
pFileName
);
if
(
Command
[
0
]
)
{
Cmd_CommandExecute
(
pAbc
,
Command
);
return
0
;
}
// check if the library is available
if
(
glo_fMapped
&&
Abc_FrameReadLibGen
()
==
NULL
)
{
...
...
src/base/io/ioAbc.h
View file @
bc44087b
...
...
@@ -134,6 +134,7 @@ extern int Io_WriteSmv( Abc_Ntk_t * pNtk, char * FileName );
extern
void
Io_WriteVerilog
(
Abc_Ntk_t
*
pNtk
,
char
*
FileName
);
/*=== abcUtil.c ===============================================================*/
extern
Io_FileType_t
Io_ReadFileType
(
char
*
pFileName
);
extern
Io_FileType_t
Io_ReadLibType
(
char
*
pFileName
);
extern
Abc_Ntk_t
*
Io_ReadNetlist
(
char
*
pFileName
,
Io_FileType_t
FileType
,
int
fCheck
);
extern
Abc_Ntk_t
*
Io_Read
(
char
*
pFileName
,
Io_FileType_t
FileType
,
int
fCheck
);
extern
void
Io_Write
(
Abc_Ntk_t
*
pNtk
,
char
*
pFileName
,
Io_FileType_t
FileType
);
...
...
src/map/amap/amap.h
View file @
bc44087b
...
...
@@ -78,7 +78,7 @@ extern void Amap_LibFree( Amap_Lib_t * p );
extern
void
Amap_LibPrintSelectedGates
(
Amap_Lib_t
*
p
,
int
fAllGates
);
extern
Amap_Lib_t
*
Amap_LibReadAndPrepare
(
char
*
pFileName
,
int
fVerbose
,
int
fVeryVerbose
);
/*=== amapLiberty.c ==========================================================*/
extern
int
Amap_LibertyParse
(
char
*
pFileName
,
char
*
pFileGenlib
,
int
fVerbose
);
extern
int
Amap_LibertyParse
(
char
*
pFileName
,
int
fVerbose
);
ABC_NAMESPACE_HEADER_END
...
...
src/map/amap/amapInt.h
View file @
bc44087b
...
...
@@ -26,6 +26,7 @@
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////
#include "misc/extra/extra.h"
#include "aig/aig/aig.h"
#include "amap.h"
...
...
src/map/amap/amapLiberty.c
View file @
bc44087b
...
...
@@ -914,7 +914,7 @@ void Amap_LibertyStop( Amap_Tree_t * p )
SeeAlso []
***********************************************************************/
int
Amap_LibertyParse
(
char
*
pFileName
,
char
*
pFileGenlib
,
int
fVerbose
)
int
Amap_LibertyParse
(
char
*
pFileName
,
int
fVerbose
)
{
Amap_Tree_t
*
p
;
char
*
pPos
;
...
...
@@ -930,7 +930,7 @@ int Amap_LibertyParse( char * pFileName, char * pFileGenlib, int fVerbose )
if
(
fVerbose
)
printf
(
"Parsing finished successfully.
\n
"
);
// Amap_LibertyPrintLiberty( p, "temp_.lib" );
Amap_LibertyPrintGenlib
(
p
,
"temp.genlib"
,
fVerbose
);
Amap_LibertyPrintGenlib
(
p
,
Extra_FileNameGenericAppend
(
pFileName
,
".genlib"
)
,
fVerbose
);
RetValue
=
1
;
}
else
...
...
src/map/mio/mio.c
View file @
bc44087b
...
...
@@ -149,6 +149,7 @@ void Mio_End( Abc_Frame_t * pAbc )
***********************************************************************/
int
Mio_CommandReadLiberty
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
char
Command
[
1000
];
FILE
*
pFile
;
FILE
*
pOut
,
*
pErr
;
Abc_Ntk_t
*
pNet
;
...
...
@@ -196,9 +197,11 @@ int Mio_CommandReadLiberty( Abc_Frame_t * pAbc, int argc, char **argv )
}
fclose
(
pFile
);
if
(
!
Amap_LibertyParse
(
FileName
,
"temp.genlib"
,
fVerbose
)
)
if
(
!
Amap_LibertyParse
(
FileName
,
fVerbose
)
)
return
0
;
Cmd_CommandExecute
(
pAbc
,
"read_library temp.genlib"
);
assert
(
strlen
(
FileName
)
<
900
);
sprintf
(
Command
,
"read_library %s"
,
Extra_FileNameGenericAppend
(
FileName
,
".genlib"
)
);
Cmd_CommandExecute
(
pAbc
,
Command
);
return
0
;
usage:
...
...
src/misc/extra/extraUtilFile.c
View file @
bc44087b
...
...
@@ -129,7 +129,7 @@ char * Extra_FileNameExtension( char * FileName )
for
(
pDot
=
FileName
+
strlen
(
FileName
)
-
1
;
pDot
>=
FileName
;
pDot
--
)
if
(
*
pDot
==
'.'
)
return
pDot
+
1
;
return
NULL
;
return
FileName
;
}
/**Function*************************************************************
...
...
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