diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-10-18 04:23:38 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-10-18 04:23:38 +0200 |
commit | c292477ba8388ba9ae6926f932effb03a8704f4a (patch) | |
tree | 0a9de3947a35424b51364b6e5ecf6e8ce473edce /src/synth | |
parent | f7a7752f1e3bfe9ff164795bd94b39d74005bf3a (diff) | |
download | ghdl-c292477ba8388ba9ae6926f932effb03a8704f4a.tar.gz ghdl-c292477ba8388ba9ae6926f932effb03a8704f4a.tar.bz2 ghdl-c292477ba8388ba9ae6926f932effb03a8704f4a.zip |
synth-stmts: ignore EOS in PSL expressions.
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/synth-stmts.adb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index 4706268c2..6ffb56fab 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -2183,6 +2183,10 @@ package body Synth.Stmts is return Edge; end if; end if; + if Get_Kind (R) = N_EOS then + -- It is never EOS! + return Build_Const_UB32 (Build_Context, 0, 1); + end if; return Build_Dyadic (Build_Context, Netlists.Gates.Id_And, Synth_PSL_Expression (Syn_Inst, L), @@ -2195,7 +2199,8 @@ package body Synth.Stmts is Synth_PSL_Expression (Syn_Inst, Get_Right (Expr))); when N_True => return Build_Const_UB32 (Build_Context, 1, 1); - when N_False => + when N_False + | N_EOS => return Build_Const_UB32 (Build_Context, 0, 1); when others => PSL.Errors.Error_Kind ("translate_psl_expr", Expr); @@ -2233,6 +2238,8 @@ package body Synth.Stmts is (Build_Context, Netlists.Gates.Id_And, I, Synth_PSL_Expression (Syn_Inst, Get_Edge_Expr (E))); + -- TODO: if EOS is present, then this is a live state. + -- Reverse order for final concatenation. D_Num := Nbr_States - 1 - Get_State_Label (Get_Edge_Dest (E)); if D_Arr (D_Num) = No_Net then |