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
17b01b16
Commit
17b01b16
authored
Jul 26, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify mod 1 to 0
parent
5345a72c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
src/Convert/ExprUtils.hs
+1
-0
test/core/stream_unit.sv
+6
-0
test/core/stream_unit.v
+5
-0
No files found.
src/Convert/ExprUtils.hs
View file @
17b01b16
...
...
@@ -84,6 +84,7 @@ simplifyBinOp Mul (Dec 0) _ = toDec 0
simplifyBinOp
Mul
(
Dec
1
)
e
=
e
simplifyBinOp
Mul
_
(
Dec
0
)
=
toDec
0
simplifyBinOp
Mul
e
(
Dec
1
)
=
e
simplifyBinOp
Mod
_
(
Dec
1
)
=
toDec
0
simplifyBinOp
Add
e1
(
UniOp
UniSub
e2
)
=
BinOp
Sub
e1
e2
simplifyBinOp
Add
(
UniOp
UniSub
e1
)
e2
=
BinOp
Sub
e2
e1
...
...
test/core/stream_unit.sv
0 → 100644
View file @
17b01b16
module
top
;
parameter
W
=
8
;
logic
[
W
-
1
:
0
]
x
,
y
;
assign
y
=
{<<{
x
}};
initial
x
=
8'b1101_0100
;
endmodule
test/core/stream_unit.v
0 → 100644
View file @
17b01b16
module
top
;
parameter
W
=
8
;
reg
[
W
-
1
:
0
]
x
=
8'b1101_0100
;
wire
[
W
-
1
:
0
]
y
=
8'b0010_1011
;
endmodule
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