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
42cebe99
Commit
42cebe99
authored
Nov 29, 2010
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix: unhandled & symbol in Liberty formula representation
parent
9bff0309
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
src/map/amap/amapParse.c
+4
-2
src/map/mio/mioFunc.c
+7
-4
No files found.
src/map/amap/amapParse.c
View file @
42cebe99
...
...
@@ -37,6 +37,7 @@ ABC_NAMESPACE_IMPL_START
#define AMAP_EQN_SYM_NEG '!' // negation before the variable
#define AMAP_EQN_SYM_NEGAFT '\'' // negation after the variable
#define AMAP_EQN_SYM_AND '*' // logic AND
#define AMAP_EQN_SYM_AND2 '&' // logic AND
#define AMAP_EQN_SYM_XOR '^' // logic XOR
#define AMAP_EQN_SYM_OR '+' // logic OR
#define AMAP_EQN_SYM_OR2 '|' // logic OR
...
...
@@ -184,6 +185,7 @@ Hop_Obj_t * Amap_ParseFormula( FILE * pOutput, char * pFormInit, Vec_Ptr_t * vVa
Vec_PtrPush
(
pStackFn
,
Hop_Not
(
(
Hop_Obj_t
*
)
Vec_PtrPop
(
pStackFn
)
)
);
break
;
case
AMAP_EQN_SYM_AND
:
case
AMAP_EQN_SYM_AND2
:
case
AMAP_EQN_SYM_OR
:
case
AMAP_EQN_SYM_OR2
:
case
AMAP_EQN_SYM_XOR
:
...
...
@@ -193,7 +195,7 @@ Hop_Obj_t * Amap_ParseFormula( FILE * pOutput, char * pFormInit, Vec_Ptr_t * vVa
Flag
=
AMAP_EQN_FLAG_ERROR
;
break
;
}
if
(
*
pTemp
==
AMAP_EQN_SYM_AND
)
if
(
*
pTemp
==
AMAP_EQN_SYM_AND
||
*
pTemp
==
AMAP_EQN_SYM_AND2
)
Vec_IntPush
(
pStackOp
,
AMAP_EQN_OPER_AND
);
else
if
(
*
pTemp
==
AMAP_EQN_SYM_OR
||
*
pTemp
==
AMAP_EQN_SYM_OR2
)
Vec_IntPush
(
pStackOp
,
AMAP_EQN_OPER_OR
);
...
...
@@ -252,7 +254,7 @@ Hop_Obj_t * Amap_ParseFormula( FILE * pOutput, char * pFormInit, Vec_Ptr_t * vVa
// scan the next name
for
(
i
=
0
;
pTemp
[
i
]
&&
pTemp
[
i
]
!=
' '
&&
pTemp
[
i
]
!=
'\t'
&&
pTemp
[
i
]
!=
'\r'
&&
pTemp
[
i
]
!=
'\n'
&&
pTemp
[
i
]
!=
AMAP_EQN_SYM_AND
&&
pTemp
[
i
]
!=
AMAP_EQN_SYM_OR
&&
pTemp
[
i
]
!=
AMAP_EQN_SYM_OR2
&&
pTemp
[
i
]
!=
AMAP_EQN_SYM_AND
&&
pTemp
[
i
]
!=
AMAP_EQN_SYM_
AND2
&&
pTemp
[
i
]
!=
AMAP_EQN_SYM_
OR
&&
pTemp
[
i
]
!=
AMAP_EQN_SYM_OR2
&&
pTemp
[
i
]
!=
AMAP_EQN_SYM_XOR
&&
pTemp
[
i
]
!=
AMAP_EQN_SYM_NEGAFT
&&
pTemp
[
i
]
!=
AMAP_EQN_SYM_CLOSE
;
i
++
)
{
...
...
src/map/mio/mioFunc.c
View file @
42cebe99
...
...
@@ -28,7 +28,8 @@ ABC_NAMESPACE_IMPL_START
// these symbols (and no other) can appear in the formulas
#define MIO_SYMB_AND '*'
#define MIO_SYMB_OR1 '+'
#define MIO_SYMB_AND2 '&'
#define MIO_SYMB_OR '+'
#define MIO_SYMB_OR2 '|'
#define MIO_SYMB_XOR '^'
#define MIO_SYMB_NOT '!'
...
...
@@ -246,9 +247,11 @@ int Mio_GateCollectNames( char * pFormula, char * pPinNames[] )
// remove the non-name symbols
for
(
pTemp
=
Buffer
;
*
pTemp
;
pTemp
++
)
if
(
*
pTemp
==
MIO_SYMB_AND
||
*
pTemp
==
MIO_SYMB_OR1
||
*
pTemp
==
MIO_SYMB_OR2
||
*
pTemp
==
MIO_SYMB_XOR
||
*
pTemp
==
MIO_SYMB_NOT
||
*
pTemp
==
MIO_SYMB_OPEN
||
*
pTemp
==
MIO_SYMB_CLOSE
||
*
pTemp
==
MIO_SYMB_AFTNOT
)
if
(
*
pTemp
==
MIO_SYMB_AND
||
*
pTemp
==
MIO_SYMB_AND2
||
*
pTemp
==
MIO_SYMB_OR
||
*
pTemp
==
MIO_SYMB_OR2
||
*
pTemp
==
MIO_SYMB_XOR
||
*
pTemp
==
MIO_SYMB_NOT
||
*
pTemp
==
MIO_SYMB_AFTNOT
||
*
pTemp
==
MIO_SYMB_OPEN
||
*
pTemp
==
MIO_SYMB_CLOSE
)
*
pTemp
=
' '
;
// save the names
...
...
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