diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-11-06 19:09:28 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-11-06 19:09:28 +0100 |
commit | e89e64a25bc2bceb40c3beca78a842df9c257dfa (patch) | |
tree | 304c8121368bcdea778e41493ef3773db092bd38 /src/synth/synth-expr.adb | |
parent | c6023180ffa061cf4394633642763b7d3546c737 (diff) | |
download | ghdl-e89e64a25bc2bceb40c3beca78a842df9c257dfa.tar.gz ghdl-e89e64a25bc2bceb40c3beca78a842df9c257dfa.tar.bz2 ghdl-e89e64a25bc2bceb40c3beca78a842df9c257dfa.zip |
synth: handle edge operators in synth_predefined_function_call.
Diffstat (limited to 'src/synth/synth-expr.adb')
-rw-r--r-- | src/synth/synth-expr.adb | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index 0e3b4cc46..c580fb613 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -1472,16 +1472,6 @@ package body Synth.Expr is end case; end Synth_Type_Conversion; - function Synth_Assoc_In (Syn_Inst : Synth_Instance_Acc; - Assoc : Node) return Value_Acc is - begin - if Get_Kind (Assoc) = Iir_Kind_Association_Element_By_Expression then - return Synth_Expression (Syn_Inst, Get_Actual (Assoc)); - else - Error_Kind ("synth_assoc_in", Assoc); - end if; - end Synth_Assoc_In; - procedure Error_Unknown_Operator (Imp : Node; Loc : Node) is begin if Get_Kind (Get_Parent (Imp)) = Iir_Kind_Package_Declaration @@ -1664,23 +1654,8 @@ package body Synth.Expr is when Iir_Kind_Function_Call => declare Imp : constant Node := Get_Implementation (Expr); - Clk : Net; - Edge : Net; begin - if Imp = Vhdl.Ieee.Std_Logic_1164.Rising_Edge then - Clk := Get_Net - (Synth_Assoc_In - (Syn_Inst, Get_Parameter_Association_Chain (Expr))); - Edge := Build_Edge (Build_Context, Clk); - return Create_Value_Net (Edge, Boolean_Type); - elsif Imp = Vhdl.Ieee.Std_Logic_1164.Falling_Edge then - Clk := Get_Net - (Synth_Assoc_In - (Syn_Inst, Get_Parameter_Association_Chain (Expr))); - Clk := Build_Monadic (Build_Context, Id_Not, Clk); - Edge := Build_Edge (Build_Context, Clk); - return Create_Value_Net (Edge, Boolean_Type); - elsif Get_Implicit_Definition (Imp) /= Iir_Predefined_None then + if Get_Implicit_Definition (Imp) /= Iir_Predefined_None then return Synth_Predefined_Function_Call (Syn_Inst, Expr); else return Synth_User_Function_Call (Syn_Inst, Expr); |