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
77dd1011
Commit
77dd1011
authored
Oct 03, 2019
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support multiple assignments in one `assign`
parent
89de289b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
src/Language/SystemVerilog/Parser/Parse.y
+6
-6
test/basic/part_select.sv
+1
-2
test/basic/part_select.v
+1
-2
No files found.
src/Language/SystemVerilog/Parser/Parse.y
View file @
77dd1011
...
...
@@ -637,8 +637,8 @@ NonGenerateModuleItem :: { [ModuleItem] }
-- This item covers module instantiations and all declarations
: DeclTokens(";") { parseDTsAsModuleItems $1 }
| ParameterDecl(";") { map (MIPackageItem . Decl) $1 }
| "defparam"
DefparamAsgns ";"
{ map (uncurry Defparam) $2 }
| "assign" opt(DelayControl) LHS
"=" Expr ";" { [Assign $2 $3 $5]
}
| "defparam"
LHSAsgns ";"
{ map (uncurry Defparam) $2 }
| "assign" opt(DelayControl) LHS
Asgns ";" { map (uncurry $ Assign $2) $3
}
| AlwaysKW Stmt { [AlwaysC $1 $2] }
| "initial" Stmt { [Initial $2] }
| "genvar" Identifiers ";" { map Genvar $2 }
...
...
@@ -750,10 +750,10 @@ NOutputGateKW :: { NOutputGateKW }
: "buf" { GateBuf }
| "not" { GateNot }
Defparam
Asgns :: { [(LHS, Expr)] }
:
Defparam
Asgn { [$1] }
|
DefparamAsgns "," Defparam
Asgn { $1 ++ [$3] }
Defparam
Asgn :: { (LHS, Expr) }
LHS
Asgns :: { [(LHS, Expr)] }
:
LHS
Asgn { [$1] }
|
LHSAsgns "," LHS
Asgn { $1 ++ [$3] }
LHS
Asgn :: { (LHS, Expr) }
: LHS "=" Expr { ($1, $3) }
PackageItems :: { [PackageItem] }
...
...
test/basic/part_select.sv
View file @
77dd1011
module
top
;
wire
[
31
:
0
]
a
;
wire
[
0
:
31
]
b
;
assign
a
=
'h64ded943
;
assign
b
=
'hb7151d17
;
assign
a
=
'h64ded943
,
b
=
'hb7151d17
;
initial
begin
$
display
(
a
[
0
+:
8
])
;
$
display
(
a
[
15
-:
8
])
;
...
...
test/basic/part_select.v
View file @
77dd1011
module
top
;
wire
[
31
:
0
]
a
;
wire
[
0
:
31
]
b
;
assign
a
=
'h64ded943
;
assign
b
=
'hb7151d17
;
assign
a
=
'h64ded943
,
b
=
'hb7151d17
;
initial
begin
$
display
(
a
[
7
:
0
])
;
$
display
(
a
[
15
:
8
])
;
...
...
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