aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-expr.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-09-08 17:35:35 +0200
committerTristan Gingold <tgingold@free.fr>2019-09-11 06:37:27 +0200
commit52dcf8712d0186c5a5d38fcdeac4f8d015af281b (patch)
tree007241d1314f6be436b762ef7e2a3f069f20495c /src/synth/synth-expr.adb
parent43f70120eb51d9d5ff8e429e0128d12b8c302fe2 (diff)
downloadghdl-52dcf8712d0186c5a5d38fcdeac4f8d015af281b.tar.gz
ghdl-52dcf8712d0186c5a5d38fcdeac4f8d015af281b.tar.bz2
ghdl-52dcf8712d0186c5a5d38fcdeac4f8d015af281b.zip
synth: move synth_user_function_call to synth-stmts.
Diffstat (limited to 'src/synth/synth-expr.adb')
-rw-r--r--src/synth/synth-expr.adb57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index 11777c079..366e83d8e 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -35,8 +35,6 @@ with Vhdl.Annotations; use Vhdl.Annotations;
with Synth.Errors; use Synth.Errors;
with Synth.Types; use Synth.Types;
with Synth.Stmts; use Synth.Stmts;
-with Synth.Decls;
-with Synth.Environment; use Synth.Environment;
with Netlists.Gates; use Netlists.Gates;
with Netlists.Builders; use Netlists.Builders;
@@ -2139,61 +2137,6 @@ package body Synth.Expr is
return Create_Value_Const_Array (Bnd, Arr);
end Eval_To_Unsigned;
- function Synth_User_Function_Call
- (Syn_Inst : Synth_Instance_Acc; Expr : Node) return Value_Acc
- is
- Imp : constant Node := Get_Implementation (Expr);
- Assoc_Chain : constant Node := Get_Parameter_Association_Chain (Expr);
- Inter_Chain : constant Node := Get_Interface_Declaration_Chain (Imp);
- Bod : constant Node := Get_Subprogram_Body (Imp);
- Subprg_Inst : Synth_Instance_Acc;
- M : Areapools.Mark_Type;
- Res : Value_Acc;
- begin
- -- Is it a call to an ieee function ?
- declare
- Pkg : constant Node := Get_Parent (Imp);
- Unit : Node;
- Lib : Node;
- begin
- if Get_Kind (Pkg) = Iir_Kind_Package_Declaration then
- Unit := Get_Parent (Pkg);
- if Get_Kind (Unit) = Iir_Kind_Design_Unit then
- Lib := Get_Library (Get_Design_File (Unit));
- if Get_Identifier (Lib) = Std_Names.Name_Ieee then
- Error_Msg_Synth
- (+Expr, "unhandled call to an ieee function");
- raise Internal_Error;
- end if;
- end if;
- end if;
- end;
-
- Areapools.Mark (M, Instance_Pool.all);
- Subprg_Inst := Make_Instance (Syn_Inst, Get_Info (Bod));
-
- Subprg_Inst.Name := New_Internal_Name (Build_Context);
-
- Synth_Subprogram_Association
- (Subprg_Inst, Syn_Inst, Inter_Chain, Assoc_Chain);
-
- Push_Phi;
-
- Decls.Synth_Declarations (Subprg_Inst, Get_Declaration_Chain (Bod));
-
- Synth_Sequential_Statements
- (Subprg_Inst, Get_Sequential_Statement_Chain (Bod));
-
- Res := Subprg_Inst.Return_Value;
-
- Pop_And_Merge_Phi (Build_Context, Bod);
-
- Free_Instance (Subprg_Inst);
- Areapools.Release (M, Instance_Pool.all);
-
- return Res;
- end Synth_User_Function_Call;
-
function Synth_Predefined_Function_Call
(Syn_Inst : Synth_Instance_Acc; Expr : Node) return Value_Acc
is