Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv2v
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
sv2v
Commits
487685e0
Commit
487685e0
authored
Jun 16, 2020
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove ternary operators from wildcard conversion
parent
5d02b918
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/Convert/Wildcard.hs
+5
-5
No files found.
src/Convert/Wildcard.hs
View file @
487685e0
...
...
@@ -31,18 +31,18 @@ convert =
convertExpr
::
Expr
->
Expr
convertExpr
(
BinOp
WEq
l
r
)
=
Mux
noteq
(
Number
"1'b0"
)
$
Mux
badxs
(
Number
"1'bx"
)
(
Number
"1'b1"
)
BinOp
BitAnd
couldMatch
$
BinOp
BitOr
noExtraXZs
$
Number
"1'bx"
where
lxl
=
BinOp
BitXor
l
l
rxr
=
BinOp
BitXor
r
r
-- Step #1: definitive mismatch
noteq
=
BinOp
TNe
rxlxl
lxrxr
couldMatch
=
BinOp
TEq
rxlxl
lxrxr
rxlxl
=
BinOp
BitXor
r
lxl
lxrxr
=
BinOp
BitXor
l
rxr
-- Step #2: extra X or Z
badxs
=
BinOp
TNe
lxlxrxr
rxr
noExtraXZs
=
BinOp
TEq
lxlxrxr
rxr
lxlxrxr
=
BinOp
BitXor
lxl
rxr
convertExpr
(
BinOp
WNe
l
r
)
=
UniOp
LogNot
$
...
...
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