diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-10-15 20:39:54 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-10-15 20:39:54 +0200 |
commit | 847de3fbeb301f60b00d59524c14cf74f562c268 (patch) | |
tree | 4b7de2d449da44e80fc194a625249237ac414a2a /src/psl/psl-nfas-utils.adb | |
parent | bbdbb49e9c72b322eb2b07cd07ea164a508be7c3 (diff) | |
download | ghdl-847de3fbeb301f60b00d59524c14cf74f562c268.tar.gz ghdl-847de3fbeb301f60b00d59524c14cf74f562c268.tar.bz2 ghdl-847de3fbeb301f60b00d59524c14cf74f562c268.zip |
vhdl: Add the implicit [*] at start of PSL cover sequence.
Diffstat (limited to 'src/psl/psl-nfas-utils.adb')
-rw-r--r-- | src/psl/psl-nfas-utils.adb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/psl/psl-nfas-utils.adb b/src/psl/psl-nfas-utils.adb index 16c0ac6d5..a773b0702 100644 --- a/src/psl/psl-nfas-utils.adb +++ b/src/psl/psl-nfas-utils.adb @@ -347,4 +347,30 @@ package body PSL.NFAs.Utils is end case; end Has_EOS; + procedure Set_Init_Loop (N : NFA) + is + Start : constant NFA_State := Get_Start_State (N); + E : NFA_Edge; + Expr : Node; + begin + -- Look for existing edge. + E := Get_First_Src_Edge (Start); + while E /= No_Edge loop + if Get_Edge_Dest (E) = Start then + Expr := Get_Edge_Expr (E); + if Get_Kind (Expr) = N_True then + return; + end if; + Expr := Create_Node (N_True); + Set_Edge_Expr (E, Expr); + return; + end if; + E := Get_Next_Src_Edge (E); + end loop; + + -- No existing edge. Create one. + Expr := Create_Node (N_True); + Add_Edge (Start, Start, Expr); + end Set_Init_Loop; + end PSL.NFAs.Utils; |