diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-07-04 18:20:07 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-07-04 18:20:07 +0200 |
commit | e669bf61068a516e54e6547490164a54728d81aa (patch) | |
tree | 51b0d6cede6892102cb2b77aeca5160d2e46fa45 /src/vhdl/vhdl-canon.adb | |
parent | 76482ce0e7ce6e03bc5e17e217ac6d8b6f075846 (diff) | |
download | ghdl-e669bf61068a516e54e6547490164a54728d81aa.tar.gz ghdl-e669bf61068a516e54e6547490164a54728d81aa.tar.bz2 ghdl-e669bf61068a516e54e6547490164a54728d81aa.zip |
vhdl: parse and analyze restrict directive.
Diffstat (limited to 'src/vhdl/vhdl-canon.adb')
-rw-r--r-- | src/vhdl/vhdl-canon.adb | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/src/vhdl/vhdl-canon.adb b/src/vhdl/vhdl-canon.adb index 5e1011a36..8c8922fce 100644 --- a/src/vhdl/vhdl-canon.adb +++ b/src/vhdl/vhdl-canon.adb @@ -1763,6 +1763,25 @@ package body Vhdl.Canon is Set_PSL_Clock_Sensitivity (Stmt, List); end Canon_Psl_Clocked_NFA; + procedure Canon_Psl_Sequence_Directive (Stmt : Iir) + is + Seq : PSL_Node; + Fa : PSL_NFA; + begin + Seq := Get_Psl_Sequence (Stmt); + Seq := PSL.Rewrites.Rewrite_SERE (Seq); + Set_Psl_Sequence (Stmt, Seq); + + -- Generate the NFA. + Fa := PSL.Build.Build_SERE_FA (Seq); + Set_PSL_NFA (Stmt, Fa); + + Canon_Psl_Clocked_NFA (Stmt); + if Canon_Flag_Expressions then + Canon_PSL_Expression (Get_PSL_Clock (Stmt)); + end if; + end Canon_Psl_Sequence_Directive; + procedure Canon_Psl_Directive (Stmt : Iir) is begin Canon_Psl_Clocked_NFA (Stmt); @@ -2123,20 +2142,13 @@ package body Vhdl.Canon is end; when Iir_Kind_Psl_Cover_Statement => - declare - Seq : PSL_Node; - Fa : PSL_NFA; - begin - Seq := Get_Psl_Sequence (El); - Seq := PSL.Rewrites.Rewrite_SERE (Seq); - Set_Psl_Sequence (El, Seq); - - -- Generate the NFA. - Fa := PSL.Build.Build_SERE_FA (Seq); - Set_PSL_NFA (El, Fa); - - Canon_Psl_Directive (El); - end; + Canon_Psl_Sequence_Directive (El); + if Canon_Flag_Expressions then + Canon_Expression (Get_Severity_Expression (El)); + Canon_Expression (Get_Report_Expression (El)); + end if; + when Iir_Kind_Psl_Restrict_Directive => + Canon_Psl_Sequence_Directive (El); when Iir_Kind_Psl_Default_Clock => null; |