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
d137fd3d
Commit
d137fd3d
authored
Dec 07, 2020
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix premature elaboration of single element patterns
parent
ad18c583
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
src/Convert/ExprUtils.hs
+1
-0
test/basic/struct_unit_array.sv
+16
-0
test/basic/struct_unit_array.v
+4
-0
No files found.
src/Convert/ExprUtils.hs
View file @
d137fd3d
...
@@ -36,6 +36,7 @@ simplifyStep (UniOp LogNot (BinOp Ne a b)) = BinOp Eq a b
...
@@ -36,6 +36,7 @@ simplifyStep (UniOp LogNot (BinOp Ne a b)) = BinOp Eq a b
simplifyStep
(
UniOp
UniSub
(
UniOp
UniSub
e
))
=
e
simplifyStep
(
UniOp
UniSub
(
UniOp
UniSub
e
))
=
e
simplifyStep
(
UniOp
UniSub
(
BinOp
Sub
e1
e2
))
=
BinOp
Sub
e2
e1
simplifyStep
(
UniOp
UniSub
(
BinOp
Sub
e1
e2
))
=
BinOp
Sub
e2
e1
simplifyStep
(
e
@
(
Concat
[
Pattern
{}]))
=
e
simplifyStep
(
Concat
[
e
])
=
e
simplifyStep
(
Concat
[
e
])
=
e
simplifyStep
(
Concat
es
)
=
Concat
$
filter
(
/=
Concat
[]
)
es
simplifyStep
(
Concat
es
)
=
Concat
$
filter
(
/=
Concat
[]
)
es
simplifyStep
(
Repeat
(
Dec
0
)
_
)
=
Concat
[]
simplifyStep
(
Repeat
(
Dec
0
)
_
)
=
Concat
[]
...
...
test/basic/struct_unit_array.sv
0 → 100644
View file @
d137fd3d
module
top
;
typedef
struct
packed
{
logic
a
,
b
;
}
T
;
typedef
struct
packed
{
logic
x
;
T
y
;
}
S
;
localparam
WIDTH
=
1
;
S
[
WIDTH
]
s
=
'
{
'
{
x
:
1
,
y
:
'
{
a
:
1
,
b
:
0
}}
};
initial
#
1
$
display
(
"%b"
,
s
)
;
endmodule
test/basic/struct_unit_array.v
0 → 100644
View file @
d137fd3d
module
top
;
wire
[
2
:
0
]
s
=
3'b110
;
initial
#
1
$
display
(
"%b"
,
s
)
;
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