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
65ee47c5
Commit
65ee47c5
authored
Mar 18, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Supporting bit-wise XNOR operator in Wlc_Ntk_t.
parent
b2ad140a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
3 deletions
+9
-3
src/base/wlc/wlc.h
+1
-0
src/base/wlc/wlcBlast.c
+2
-2
src/base/wlc/wlcNtk.c
+3
-0
src/base/wlc/wlcReadVer.c
+1
-1
src/base/wlc/wlcWriteVer.c
+2
-0
No files found.
src/base/wlc/wlc.h
View file @
65ee47c5
...
@@ -61,6 +61,7 @@ typedef enum {
...
@@ -61,6 +61,7 @@ typedef enum {
WLC_OBJ_BIT_AND
,
// 16: bitwise AND
WLC_OBJ_BIT_AND
,
// 16: bitwise AND
WLC_OBJ_BIT_OR
,
// 17: bitwise OR
WLC_OBJ_BIT_OR
,
// 17: bitwise OR
WLC_OBJ_BIT_XOR
,
// 18: bitwise XOR
WLC_OBJ_BIT_XOR
,
// 18: bitwise XOR
WLC_OBJ_BIT_NXOR
,
// 18: bitwise NXOR
WLC_OBJ_BIT_SELECT
,
// 19: bit selection
WLC_OBJ_BIT_SELECT
,
// 19: bit selection
WLC_OBJ_BIT_CONCAT
,
// 20: bit concatenation
WLC_OBJ_BIT_CONCAT
,
// 20: bit concatenation
WLC_OBJ_BIT_ZEROPAD
,
// 21: zero padding
WLC_OBJ_BIT_ZEROPAD
,
// 21: zero padding
...
...
src/base/wlc/wlcBlast.c
View file @
65ee47c5
...
@@ -930,13 +930,13 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds )
...
@@ -930,13 +930,13 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds )
for
(
k
=
0
;
k
<
nRange
;
k
++
)
for
(
k
=
0
;
k
<
nRange
;
k
++
)
Vec_IntPush
(
vRes
,
Gia_ManHashOr
(
pNew
,
pArg0
[
k
],
pArg1
[
k
])
);
Vec_IntPush
(
vRes
,
Gia_ManHashOr
(
pNew
,
pArg0
[
k
],
pArg1
[
k
])
);
}
}
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_XOR
)
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_XOR
||
pObj
->
Type
==
WLC_OBJ_BIT_NXOR
)
{
{
int
nRangeMax
=
Abc_MaxInt
(
nRange
,
Abc_MaxInt
(
nRange0
,
nRange1
)
);
int
nRangeMax
=
Abc_MaxInt
(
nRange
,
Abc_MaxInt
(
nRange0
,
nRange1
)
);
int
*
pArg0
=
Wlc_VecLoadFanins
(
vTemp0
,
pFans0
,
nRange0
,
nRangeMax
,
Wlc_ObjIsSignedFanin01
(
p
,
pObj
)
);
int
*
pArg0
=
Wlc_VecLoadFanins
(
vTemp0
,
pFans0
,
nRange0
,
nRangeMax
,
Wlc_ObjIsSignedFanin01
(
p
,
pObj
)
);
int
*
pArg1
=
Wlc_VecLoadFanins
(
vTemp1
,
pFans1
,
nRange1
,
nRangeMax
,
Wlc_ObjIsSignedFanin01
(
p
,
pObj
)
);
int
*
pArg1
=
Wlc_VecLoadFanins
(
vTemp1
,
pFans1
,
nRange1
,
nRangeMax
,
Wlc_ObjIsSignedFanin01
(
p
,
pObj
)
);
for
(
k
=
0
;
k
<
nRange
;
k
++
)
for
(
k
=
0
;
k
<
nRange
;
k
++
)
Vec_IntPush
(
vRes
,
Gia_ManHashXor
(
pNew
,
pArg0
[
k
],
pArg1
[
k
]
)
);
Vec_IntPush
(
vRes
,
Abc_LitNotCond
(
Gia_ManHashXor
(
pNew
,
pArg0
[
k
],
pArg1
[
k
]),
pObj
->
Type
==
WLC_OBJ_BIT_NXOR
)
);
}
}
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_SELECT
)
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_SELECT
)
{
{
...
...
src/base/wlc/wlcNtk.c
View file @
65ee47c5
...
@@ -50,6 +50,7 @@ static char * Wlc_Names[WLC_OBJ_NUMBER+1] = {
...
@@ -50,6 +50,7 @@ static char * Wlc_Names[WLC_OBJ_NUMBER+1] = {
"&"
,
// 16: bitwise AND
"&"
,
// 16: bitwise AND
"|"
,
// 17: bitwise OR
"|"
,
// 17: bitwise OR
"^"
,
// 18: bitwise XOR
"^"
,
// 18: bitwise XOR
"~|"
,
// 18: bitwise NXOR
"[:]"
,
// 19: bit selection
"[:]"
,
// 19: bit selection
"{,}"
,
// 20: bit concatenation
"{,}"
,
// 20: bit concatenation
"zeroPad"
,
// 21: zero padding
"zeroPad"
,
// 21: zero padding
...
@@ -360,6 +361,8 @@ void Wlc_NtkPrintDistrib( Wlc_Ntk_t * p, int fVerbose )
...
@@ -360,6 +361,8 @@ void Wlc_NtkPrintDistrib( Wlc_Ntk_t * p, int fVerbose )
Vec_IntAddToEntry
(
vAnds
,
WLC_OBJ_BIT_OR
,
Wlc_ObjRange
(
Wlc_ObjFanin0
(
p
,
pObj
))
);
Vec_IntAddToEntry
(
vAnds
,
WLC_OBJ_BIT_OR
,
Wlc_ObjRange
(
Wlc_ObjFanin0
(
p
,
pObj
))
);
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_XOR
)
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_XOR
)
Vec_IntAddToEntry
(
vAnds
,
WLC_OBJ_BIT_XOR
,
3
*
Wlc_ObjRange
(
Wlc_ObjFanin0
(
p
,
pObj
))
);
Vec_IntAddToEntry
(
vAnds
,
WLC_OBJ_BIT_XOR
,
3
*
Wlc_ObjRange
(
Wlc_ObjFanin0
(
p
,
pObj
))
);
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_NXOR
)
Vec_IntAddToEntry
(
vAnds
,
WLC_OBJ_BIT_NXOR
,
3
*
Wlc_ObjRange
(
Wlc_ObjFanin0
(
p
,
pObj
))
);
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_SELECT
)
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_SELECT
)
Vec_IntAddToEntry
(
vAnds
,
WLC_OBJ_BIT_SELECT
,
0
);
Vec_IntAddToEntry
(
vAnds
,
WLC_OBJ_BIT_SELECT
,
0
);
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_CONCAT
)
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_CONCAT
)
...
...
src/base/wlc/wlcReadVer.c
View file @
65ee47c5
...
@@ -782,10 +782,10 @@ static inline int Wlc_PrsFindDefinition( Wlc_Prs_t * p, char * pStr, Vec_Int_t *
...
@@ -782,10 +782,10 @@ static inline int Wlc_PrsFindDefinition( Wlc_Prs_t * p, char * pStr, Vec_Int_t *
else
if
(
pStr
[
0
]
==
'&'
&&
pStr
[
1
]
!=
'&'
)
pStr
+=
1
,
Type
=
WLC_OBJ_BIT_AND
;
else
if
(
pStr
[
0
]
==
'&'
&&
pStr
[
1
]
!=
'&'
)
pStr
+=
1
,
Type
=
WLC_OBJ_BIT_AND
;
else
if
(
pStr
[
0
]
==
'|'
&&
pStr
[
1
]
!=
'|'
)
pStr
+=
1
,
Type
=
WLC_OBJ_BIT_OR
;
else
if
(
pStr
[
0
]
==
'|'
&&
pStr
[
1
]
!=
'|'
)
pStr
+=
1
,
Type
=
WLC_OBJ_BIT_OR
;
else
if
(
pStr
[
0
]
==
'^'
&&
pStr
[
1
]
!=
'^'
)
pStr
+=
1
,
Type
=
WLC_OBJ_BIT_XOR
;
else
if
(
pStr
[
0
]
==
'^'
&&
pStr
[
1
]
!=
'^'
)
pStr
+=
1
,
Type
=
WLC_OBJ_BIT_XOR
;
else
if
(
pStr
[
0
]
==
'~'
&&
pStr
[
1
]
==
'^'
)
pStr
+=
2
,
Type
=
WLC_OBJ_BIT_NXOR
;
else
if
(
pStr
[
0
]
==
'&'
&&
pStr
[
1
]
==
'&'
)
pStr
+=
2
,
Type
=
WLC_OBJ_LOGIC_AND
;
else
if
(
pStr
[
0
]
==
'&'
&&
pStr
[
1
]
==
'&'
)
pStr
+=
2
,
Type
=
WLC_OBJ_LOGIC_AND
;
else
if
(
pStr
[
0
]
==
'|'
&&
pStr
[
1
]
==
'|'
)
pStr
+=
2
,
Type
=
WLC_OBJ_LOGIC_OR
;
else
if
(
pStr
[
0
]
==
'|'
&&
pStr
[
1
]
==
'|'
)
pStr
+=
2
,
Type
=
WLC_OBJ_LOGIC_OR
;
else
if
(
pStr
[
0
]
==
'='
&&
pStr
[
1
]
==
'='
)
pStr
+=
2
,
Type
=
WLC_OBJ_COMP_EQU
;
else
if
(
pStr
[
0
]
==
'='
&&
pStr
[
1
]
==
'='
)
pStr
+=
2
,
Type
=
WLC_OBJ_COMP_EQU
;
else
if
(
pStr
[
0
]
==
'~'
&&
pStr
[
1
]
==
'^'
)
pStr
+=
2
,
Type
=
WLC_OBJ_COMP_EQU
;
else
if
(
pStr
[
0
]
==
'!'
&&
pStr
[
1
]
==
'='
)
pStr
+=
2
,
Type
=
WLC_OBJ_COMP_NOTEQU
;
else
if
(
pStr
[
0
]
==
'!'
&&
pStr
[
1
]
==
'='
)
pStr
+=
2
,
Type
=
WLC_OBJ_COMP_NOTEQU
;
else
if
(
pStr
[
0
]
==
'<'
&&
pStr
[
1
]
!=
'='
)
pStr
+=
1
,
Type
=
WLC_OBJ_COMP_LESS
;
else
if
(
pStr
[
0
]
==
'<'
&&
pStr
[
1
]
!=
'='
)
pStr
+=
1
,
Type
=
WLC_OBJ_COMP_LESS
;
else
if
(
pStr
[
0
]
==
'>'
&&
pStr
[
1
]
!=
'='
)
pStr
+=
1
,
Type
=
WLC_OBJ_COMP_MORE
;
else
if
(
pStr
[
0
]
==
'>'
&&
pStr
[
1
]
!=
'='
)
pStr
+=
1
,
Type
=
WLC_OBJ_COMP_MORE
;
...
...
src/base/wlc/wlcWriteVer.c
View file @
65ee47c5
...
@@ -308,6 +308,8 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p, int fNoFlops )
...
@@ -308,6 +308,8 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p, int fNoFlops )
fprintf
(
pFile
,
"|"
);
fprintf
(
pFile
,
"|"
);
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_XOR
)
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_XOR
)
fprintf
(
pFile
,
"^"
);
fprintf
(
pFile
,
"^"
);
else
if
(
pObj
->
Type
==
WLC_OBJ_BIT_NXOR
)
fprintf
(
pFile
,
"~^"
);
else
if
(
pObj
->
Type
==
WLC_OBJ_LOGIC_AND
)
else
if
(
pObj
->
Type
==
WLC_OBJ_LOGIC_AND
)
fprintf
(
pFile
,
"&&"
);
fprintf
(
pFile
,
"&&"
);
else
if
(
pObj
->
Type
==
WLC_OBJ_LOGIC_OR
)
else
if
(
pObj
->
Type
==
WLC_OBJ_LOGIC_OR
)
...
...
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