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
7e805e5c
Commit
7e805e5c
authored
Mar 02, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Making GENLIB parser skip LATCHes.
parent
7fa9de2d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
1 deletions
+34
-1
src/map/amap/amapRead.c
+4
-0
src/map/mio/mio.c
+5
-0
src/map/mio/mioInt.h
+1
-0
src/map/mio/mioRead.c
+24
-1
No files found.
src/map/amap/amapRead.c
View file @
7e805e5c
...
...
@@ -183,6 +183,10 @@ Vec_Ptr_t * Amap_DeriveTokens( char * pBuffer )
{
Vec_PtrPush
(
vTokens
,
pToken
);
pToken
=
strtok
(
NULL
,
" =
\t\r\n
"
);
// skip latches
if
(
pToken
&&
strcmp
(
pToken
,
"LATCH"
)
==
0
)
while
(
pToken
&&
strcmp
(
pToken
,
"GATE"
)
!=
0
)
pToken
=
strtok
(
NULL
,
" =
\t\r\n
"
);
}
return
vTokens
;
}
...
...
src/map/mio/mio.c
View file @
7e805e5c
...
...
@@ -446,6 +446,11 @@ int Mio_CommandPrintLibrary( Abc_Frame_t * pAbc, int argc, char **argv )
goto
usage
;
}
}
if
(
Abc_FrameReadLibGen
()
==
NULL
)
{
printf
(
"Library is not available.
\n
"
);
return
1
;
}
FileName
=
argv
[
globalUtilOptind
];
if
(
argc
==
globalUtilOptind
+
1
)
{
...
...
src/map/mio/mioInt.h
View file @
7e805e5c
...
...
@@ -41,6 +41,7 @@ ABC_NAMESPACE_HEADER_START
////////////////////////////////////////////////////////////////////////
#define MIO_STRING_GATE "GATE"
#define MIO_STRING_LATCH "LATCH"
#define MIO_STRING_PIN "PIN"
#define MIO_STRING_NONINV "NONINV"
#define MIO_STRING_INV "INV"
...
...
src/map/mio/mioRead.c
View file @
7e805e5c
...
...
@@ -186,8 +186,25 @@ int Mio_LibraryReadInternal( Mio_Library_t * pLib, char * pBuffer, int fExtended
// read gates one by one
pToken
=
strtok
(
pBuffer
,
"
\t\r\n
"
);
while
(
pToken
&&
strcmp
(
pToken
,
MIO_STRING_GATE
)
==
0
)
while
(
pToken
&&
(
strcmp
(
pToken
,
MIO_STRING_GATE
)
==
0
||
strcmp
(
pToken
,
MIO_STRING_LATCH
)
==
0
)
)
{
// skip latches
if
(
strcmp
(
pToken
,
MIO_STRING_LATCH
)
==
0
)
{
while
(
pToken
&&
strcmp
(
pToken
,
MIO_STRING_GATE
)
!=
0
&&
strcmp
(
pToken
,
".end"
)
!=
0
)
{
if
(
strcmp
(
pToken
,
MIO_STRING_LATCH
)
==
0
)
{
pToken
=
strtok
(
NULL
,
"
\t\r\n
"
);
printf
(
"Skipping latch
\"
%s
\"
...
\n
"
,
pToken
);
continue
;
}
pToken
=
strtok
(
NULL
,
"
\t\r\n
"
);
}
if
(
!
(
pToken
&&
strcmp
(
pToken
,
MIO_STRING_GATE
)
==
0
)
)
break
;
}
// derive the next gate
pGate
=
Mio_LibraryReadGate
(
&
pToken
,
fExtendedFormat
);
if
(
pGate
==
NULL
)
...
...
@@ -221,6 +238,12 @@ int Mio_LibraryReadInternal( Mio_Library_t * pLib, char * pBuffer, int fExtended
if
(
fVerbose
)
printf
(
"The number of gates read = %d.
\n
"
,
nGates
);
if
(
nGates
==
0
)
{
printf
(
"The library contains no gates.
\n
"
);
return
1
;
}
// check what is the last word read
if
(
pToken
&&
strcmp
(
pToken
,
".end"
)
!=
0
)
return
1
;
...
...
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