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
dce7f149
Commit
dce7f149
authored
Apr 08, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix precedence of non-blocking assignment
parent
2a4d1cc5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
+19
-1
src/Language/SystemVerilog/Parser/Parse.y
+2
-1
test/basic/nblk_asgn_prec.sv
+17
-0
No files found.
src/Language/SystemVerilog/Parser/Parse.y
View file @
dce7f149
...
...
@@ -398,6 +398,7 @@ time { Token Lit_time _ _ }
-- operator precedences, from *lowest* to *highest*
%
nonassoc
Asgn
%
nonassoc
NoElse
%
nonassoc
"else"
%
right
"|->"
"|=>"
"#-#"
"#=#"
...
...
@@ -647,8 +648,8 @@ DeclToken :: { DeclToken }
|
"{"
StreamOp
StreamSize
Concat
"}"
{
%
posInject
\
p
->
DTStream
p
$
2
$
3
(
map
toLHS
$
4
)
}
|
"{"
StreamOp
Concat
"}"
{
%
posInject
\
p
->
DTStream
p
$
2
(
RawNum
1
)
(
map
toLHS
$
3
)
}
|
opt
(
"var"
)
"type"
"("
Expr
")"
{
%
posInject
\
p
->
DTType
p
(
\
Unspecified
->
\
[]
->
TypeOf
$
4
)
}
|
"<="
opt
(
DelayOrEvent
)
Expr
{
%
posInject
\
p
->
DTAsgn
p
AsgnOpNonBlocking
$
2
$
3
}
|
IncOrDecOperator
{
%
posInject
\
p
->
DTAsgn
p
(
AsgnOp
$
1
)
Nothing
(
RawNum
1
)
}
|
"<="
opt
(
DelayOrEvent
)
Expr
%
prec
Asgn
{
%
posInject
\
p
->
DTAsgn
p
AsgnOpNonBlocking
$
2
$
3
}
|
Identifier
"::"
Identifier
{
%
posInject
\
p
->
DTPSIdent
p
$
1
$
3
}
|
Identifier
ParamBindings
"::"
Identifier
{
%
posInject
\
p
->
DTCSIdent
p
$
1
$
2
$
4
}
DeclTokenAsgn
::
{
DeclToken
}
...
...
test/basic/nblk_asgn_prec.sv
0 → 100644
View file @
dce7f149
`define
TEST
(
stmt
)
\
begin
\
stmt
;
\
#
1
$
display
(
"%b"
,
foo
)
;
\
stmt
;
\
#
1
$
display
(
"%b"
,
foo
)
;
\
end
module
top
;
reg
foo
;
localparam
bar
=
10
;
initial
begin
`TEST
(
foo
<=
bar
<=
11
)
`TEST
(
foo
<=
bar
<=
11
<=
0
)
`TEST
(
foo
<=
bar
<=
11
<=
0
<=
0
)
end
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