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
8ecd2c6e
Unverified
Commit
8ecd2c6e
authored
Sep 12, 2021
by
Saw Xue Zheng
Committed by
GitHub
Sep 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix common_module_item to include deferred_assertion_item (#178)
parent
88d632fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
4 deletions
+34
-4
src/Language/SystemVerilog/Parser/Parse.y
+19
-4
test/nosim/assert.sv
+15
-0
No files found.
src/Language/SystemVerilog/Parser/Parse.y
View file @
8ecd2c6e
...
@@ -720,28 +720,43 @@ AssignOption :: { AssignOption }
...
@@ -720,28 +720,43 @@ AssignOption :: { AssignOption }
-- for ModuleItem, for now
-- for ModuleItem, for now
AssertionItem
::
{
AssertionItem
}
AssertionItem
::
{
AssertionItem
}
:
ConcurrentAssertionItem
{
$
1
}
:
ConcurrentAssertionItem
{
$
1
}
|
DeferredImmediateAssertionItem
{
$
1
}
-- for Stmt, for now
-- for Stmt, for now
ProceduralAssertionStatement
::
{
Assertion
}
ProceduralAssertionStatement
::
{
Assertion
}
:
ConcurrentAssertionStatement
{
$
1
}
:
ConcurrentAssertionStatement
{
$
1
}
|
ImmediateAssertionStatement
{
$
1
}
|
ImmediateAssertionStatement
{
$
1
}
ImmediateAssertionStatement
::
{
Assertion
}
:
SimpleImmediateAssertionStatement
{
$
1
}
|
DeferredImmediateAssertionStatement
{
$
1
}
DeferredImmediateAssertionItem
::
{
AssertionItem
}
:
Identifier
":"
DeferredImmediateAssertionStatement
{
(
$
1
,
$
3
)
}
|
DeferredImmediateAssertionStatement
{
(
""
,
$
1
)
}
ConcurrentAssertionItem
::
{
AssertionItem
}
ConcurrentAssertionItem
::
{
AssertionItem
}
:
Identifier
":"
ConcurrentAssertionStatement
{
(
$
1
,
$
3
)
}
:
Identifier
":"
ConcurrentAssertionStatement
{
(
$
1
,
$
3
)
}
|
ConcurrentAssertionStatement
{
(
""
,
$
1
)
}
|
ConcurrentAssertionStatement
{
(
""
,
$
1
)
}
ConcurrentAssertionStatement
::
{
Assertion
}
ConcurrentAssertionStatement
::
{
Assertion
}
:
"assert"
"property"
"("
PropertySpec
")"
ActionBlock
{
Assert
(
Concurrent
$
4
)
$
6
}
:
"assert"
"property"
"("
PropertySpec
")"
ActionBlock
{
Assert
(
Concurrent
$
4
)
$
6
}
|
"assume"
"property"
"("
PropertySpec
")"
ActionBlock
{
Assume
(
Concurrent
$
4
)
$
6
}
|
"assume"
"property"
"("
PropertySpec
")"
ActionBlock
{
Assume
(
Concurrent
$
4
)
$
6
}
|
"cover"
"property"
"("
PropertySpec
")"
Stmt
{
Cover
(
Concurrent
$
4
)
$
6
}
|
"cover"
"property"
"("
PropertySpec
")"
Stmt
{
Cover
(
Concurrent
$
4
)
$
6
}
ImmediateAssertionStatement
::
{
Assertion
}
Deferred
ImmediateAssertionStatement
::
{
Assertion
}
:
"assert"
Deferral
"("
Expr
")"
ActionBlock
{
Assert
(
Immediate
$
2
$
4
)
$
6
}
:
"assert"
Deferral
"("
Expr
")"
ActionBlock
{
Assert
(
Immediate
$
2
$
4
)
$
6
}
|
"assume"
Deferral
"("
Expr
")"
ActionBlock
{
Assume
(
Immediate
$
2
$
4
)
$
6
}
|
"assume"
Deferral
"("
Expr
")"
ActionBlock
{
Assume
(
Immediate
$
2
$
4
)
$
6
}
|
"cover"
Deferral
"("
Expr
")"
Stmt
{
Cover
(
Immediate
$
2
$
4
)
$
6
}
|
"cover"
Deferral
"("
Expr
")"
Stmt
{
Cover
(
Immediate
$
2
$
4
)
$
6
}
SimpleImmediateAssertionStatement
::
{
Assertion
}
:
"assert"
"("
Expr
")"
ActionBlock
{
Assert
(
Immediate
NotDeferred
$
3
)
$
5
}
|
"assume"
"("
Expr
")"
ActionBlock
{
Assume
(
Immediate
NotDeferred
$
3
)
$
5
}
|
"cover"
"("
Expr
")"
Stmt
{
Cover
(
Immediate
NotDeferred
$
3
)
$
5
}
Deferral
::
{
Deferral
}
Deferral
::
{
Deferral
}
:
{- empty -}
{
NotDeferred
}
:
"#"
number
{
%
expectZeroDelay
$
2
ObservedDeferred
}
|
"#"
number
{
%
expectZeroDelay
$
2
ObservedDeferred
}
|
"final"
{
FinalDeferred
}
|
"final"
{
FinalDeferred
}
PropertySpec
::
{
PropertySpec
}
PropertySpec
::
{
PropertySpec
}
...
...
test/nosim/assert.sv
View file @
8ecd2c6e
...
@@ -22,6 +22,21 @@ module top;
...
@@ -22,6 +22,21 @@ module top;
assume
final
(
1
)
;
assume
final
(
1
)
;
cover
final
(
1
)
;
cover
final
(
1
)
;
end
end
assert
final
(
1
)
;
assume
final
(
1
)
;
cover
final
(
1
)
;
a1:
assert
final
(
1
)
;
a2:
assume
final
(
1
)
;
a3:
cover
final
(
1
)
;
assert
#
0
(
1
)
;
assume
#
0
(
1
)
;
cover
#
0
(
1
)
;
b1:
assert
#
0
(
1
)
;
b2:
assume
#
0
(
1
)
;
b3:
cover
#
0
(
1
)
;
assert
property
(
@
(
posedge
clk
)
1
)
assert
property
(
@
(
posedge
clk
)
1
)
else
$
display
(
"FOO"
)
;
else
$
display
(
"FOO"
)
;
assume
property
(
@
(
posedge
clk
)
1
)
assume
property
(
@
(
posedge
clk
)
1
)
...
...
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