diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-02-25 08:22:51 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-02-25 08:22:51 +0100 |
commit | b7c5831f6b6ca8978b1e98f316553d1d537b27c1 (patch) | |
tree | 0ac157bc490b4d405f8223adad4bfba02889560b | |
parent | 822e1031ab3aca255fa1eb39843cf63d7d86e9b0 (diff) | |
download | ghdl-b7c5831f6b6ca8978b1e98f316553d1d537b27c1.tar.gz ghdl-b7c5831f6b6ca8978b1e98f316553d1d537b27c1.tar.bz2 ghdl-b7c5831f6b6ca8978b1e98f316553d1d537b27c1.zip |
synth: handle unaffected in simple sequential signal assignment.
Fix #2361
-rw-r--r-- | src/synth/synth-vhdl_stmts.adb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb index a61137cdd..5cfa48c31 100644 --- a/src/synth/synth-vhdl_stmts.adb +++ b/src/synth/synth-vhdl_stmts.adb @@ -85,11 +85,11 @@ package body Synth.Vhdl_Stmts is raise Internal_Error; end if; if Get_Chain (Wf) /= Null_Node then - -- Warning. + -- TODO: warning for multiple waveform elements. null; end if; if Get_Time (Wf) /= Null_Node then - -- Warning + -- TODO: warning for a time value. null; end if; if Targ_Type = null then @@ -833,14 +833,19 @@ package body Synth.Vhdl_Stmts is procedure Synth_Simple_Signal_Assignment (Syn_Inst : Synth_Instance_Acc; Stmt : Node) is + Wf : constant Node := Get_Waveform_Chain (Stmt); Marker : Mark_Type; Targ : Target_Info; Val : Valtyp; begin + if Get_Kind (Wf) = Iir_Kind_Unaffected_Waveform then + -- Ignore this useless statement. + return; + end if; + Mark_Expr_Pool (Marker); Targ := Synth_Target (Syn_Inst, Get_Target (Stmt)); - Val := Synth_Waveform - (Syn_Inst, Get_Waveform_Chain (Stmt), Targ.Targ_Type); + Val := Synth_Waveform (Syn_Inst, Wf, Targ.Targ_Type); Synth_Assignment (Syn_Inst, Targ, Val, Stmt); Release_Expr_Pool (Marker); end Synth_Simple_Signal_Assignment; |