aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOndrej Ille <ondrej.ille@gmail.com>2021-03-26 21:56:25 +0100
committertgingold <tgingold@users.noreply.github.com>2021-03-28 09:46:05 +0200
commit14ca9272bdf9a6a33944e92d4eac0dfea79634ee (patch)
treee74f020c4e15a950fc470f3b92c56ec97f90270b /src
parenta05d3cb7bd8eb037c3057c2ef8d066df1489ce2d (diff)
downloadghdl-14ca9272bdf9a6a33944e92d4eac0dfea79634ee.tar.gz
ghdl-14ca9272bdf9a6a33944e92d4eac0dfea79634ee.tar.bz2
ghdl-14ca9272bdf9a6a33944e92d4eac0dfea79634ee.zip
psl, vhdl: Extend semantic pass for PSL to allow "assert never <Sequence>" with suffixed repetition operator without surrounding sequence braces.
Diffstat (limited to 'src')
-rw-r--r--src/psl/psl-rewrites.adb1
-rw-r--r--src/vhdl/vhdl-sem_psl.adb10
2 files changed, 11 insertions, 0 deletions
diff --git a/src/psl/psl-rewrites.adb b/src/psl/psl-rewrites.adb
index ad71ccd74..be9477088 100644
--- a/src/psl/psl-rewrites.adb
+++ b/src/psl/psl-rewrites.adb
@@ -502,6 +502,7 @@ package body PSL.Rewrites is
case Get_Kind (N) is
when N_Star_Repeat_Seq
| N_Plus_Repeat_Seq
+ | N_Equal_Repeat_Seq
| N_Goto_Repeat_Seq
| N_Sequence_Instance
| N_Endpoint_Instance
diff --git a/src/vhdl/vhdl-sem_psl.adb b/src/vhdl/vhdl-sem_psl.adb
index c73681b7c..5b3248aef 100644
--- a/src/vhdl/vhdl-sem_psl.adb
+++ b/src/vhdl/vhdl-sem_psl.adb
@@ -505,6 +505,16 @@ package body Vhdl.Sem_Psl is
case Get_Kind (Prop) is
when N_Braced_SERE =>
return Sem_Sequence (Prop);
+ when N_Star_Repeat_Seq
+ | N_Equal_Repeat_Seq
+ | N_Plus_Repeat_Seq
+ | N_Goto_Repeat_Seq =>
+ Res := Get_Sequence (Prop);
+ if Res /= Null_PSL_Node then
+ Res := Sem_Sequence (Get_Sequence (Prop));
+ Set_Sequence (Prop, Res);
+ end if;
+ return Prop;
when N_Always
| N_Never =>
-- By extension, clock_event is allowed within outermost