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
59aea763
Commit
59aea763
authored
Feb 07, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix in liberty parser and change suggested by Clifford.
parent
02240391
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
src/map/mio/mioRead.c
+14
-0
src/map/scl/sclLiberty.c
+2
-0
No files found.
src/map/mio/mioRead.c
View file @
59aea763
...
@@ -335,13 +335,27 @@ int Mio_LibraryReadInternal( Mio_Library_t * pLib, char * pBuffer, int fExtended
...
@@ -335,13 +335,27 @@ int Mio_LibraryReadInternal( Mio_Library_t * pLib, char * pBuffer, int fExtended
char
*
Mio_LibraryCleanStr
(
char
*
p
)
char
*
Mio_LibraryCleanStr
(
char
*
p
)
{
{
int
i
,
k
;
int
i
,
k
;
int
whitespace_state
=
0
;
char
*
pRes
=
Abc_UtilStrsav
(
p
);
char
*
pRes
=
Abc_UtilStrsav
(
p
);
for
(
i
=
k
=
0
;
pRes
[
i
];
i
++
)
for
(
i
=
k
=
0
;
pRes
[
i
];
i
++
)
if
(
pRes
[
i
]
!=
' '
&&
pRes
[
i
]
!=
'\t'
&&
pRes
[
i
]
!=
'\r'
&&
pRes
[
i
]
!=
'\n'
)
if
(
pRes
[
i
]
!=
' '
&&
pRes
[
i
]
!=
'\t'
&&
pRes
[
i
]
!=
'\r'
&&
pRes
[
i
]
!=
'\n'
)
{
if
(
pRes
[
i
]
!=
'('
&&
pRes
[
i
]
!=
')'
&&
pRes
[
i
]
!=
'+'
&&
pRes
[
i
]
!=
'*'
&&
pRes
[
i
]
!=
'|'
&&
pRes
[
i
]
!=
'&'
&&
pRes
[
i
]
!=
'^'
&&
pRes
[
i
]
!=
'\''
&&
pRes
[
i
]
!=
'!'
)
{
if
(
whitespace_state
==
2
)
pRes
[
k
++
]
=
' '
;
whitespace_state
=
1
;
}
else
whitespace_state
=
0
;
pRes
[
k
++
]
=
pRes
[
i
];
pRes
[
k
++
]
=
pRes
[
i
];
}
else
whitespace_state
=
whitespace_state
?
2
:
0
;
pRes
[
k
]
=
0
;
pRes
[
k
]
=
0
;
return
pRes
;
return
pRes
;
}
}
Mio_Gate_t
*
Mio_LibraryReadGate
(
char
**
ppToken
,
int
fExtendedFormat
)
Mio_Gate_t
*
Mio_LibraryReadGate
(
char
**
ppToken
,
int
fExtendedFormat
)
{
{
Mio_Gate_t
*
pGate
;
Mio_Gate_t
*
pGate
;
...
...
src/map/scl/sclLiberty.c
View file @
59aea763
...
@@ -1517,6 +1517,8 @@ Vec_Str_t * Scl_LibertyReadSclStr( Scl_Tree_t * p, int fVerbose, int fVeryVerbos
...
@@ -1517,6 +1517,8 @@ Vec_Str_t * Scl_LibertyReadSclStr( Scl_Tree_t * p, int fVerbose, int fVeryVerbos
Vec_StrPutS_
(
vOut
,
pFormula
);
Vec_StrPutS_
(
vOut
,
pFormula
);
// write truth table
// write truth table
vTruth
=
Mio_ParseFormulaTruth
(
pFormula
,
(
char
**
)
Vec_PtrArray
(
vNameIns
),
Vec_PtrSize
(
vNameIns
)
);
vTruth
=
Mio_ParseFormulaTruth
(
pFormula
,
(
char
**
)
Vec_PtrArray
(
vNameIns
),
Vec_PtrSize
(
vNameIns
)
);
if
(
vTruth
==
NULL
)
return
NULL
;
for
(
i
=
0
;
i
<
Abc_Truth6WordNum
(
Vec_PtrSize
(
vNameIns
));
i
++
)
for
(
i
=
0
;
i
<
Abc_Truth6WordNum
(
Vec_PtrSize
(
vNameIns
));
i
++
)
Vec_StrPutW_
(
vOut
,
Vec_WrdEntry
(
vTruth
,
i
)
);
Vec_StrPutW_
(
vOut
,
Vec_WrdEntry
(
vTruth
,
i
)
);
Vec_WrdFree
(
vTruth
);
Vec_WrdFree
(
vTruth
);
...
...
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