diff options
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/ghdlsynth.h | 7 | ||||
-rw-r--r-- | src/synth/synth-context.adb | 7 | ||||
-rw-r--r-- | src/synth/synth-context.ads | 4 |
3 files changed, 15 insertions, 3 deletions
diff --git a/src/synth/ghdlsynth.h b/src/synth/ghdlsynth.h index ae43c2c72..0537ceaf7 100644 --- a/src/synth/ghdlsynth.h +++ b/src/synth/ghdlsynth.h @@ -122,10 +122,11 @@ namespace GhdlSynth { GHDLSYNTH_ADA_WRAPPER_WWD(get_input_net, Net, Instance, Port_Idx); - extern "C" unsigned int ghdlsynth__ghdl_synth(int argc, const char **argv); - inline Module ghdl_synth(int argc, const char **argv) { + extern "C" unsigned int ghdlsynth__ghdl_synth(int init, + int argc, const char **argv); + inline Module ghdl_synth(int init, int argc, const char **argv) { Module res; - res.id = ghdlsynth__ghdl_synth(argc, argv); + res.id = ghdlsynth__ghdl_synth(init, argc, argv); return res; } diff --git a/src/synth/synth-context.adb b/src/synth/synth-context.adb index ef9569c0c..c02604049 100644 --- a/src/synth/synth-context.adb +++ b/src/synth/synth-context.adb @@ -70,6 +70,13 @@ package body Synth.Context is return Res; end Make_Base_Instance; + procedure Free_Base_Instance is + begin + -- TODO: really free. + Build_Context := null; + Packages_Table.Init; + end Free_Base_Instance; + function Make_Instance (Parent : Synth_Instance_Acc; Blk : Node; Name : Sname := No_Sname) diff --git a/src/synth/synth-context.ads b/src/synth/synth-context.ads index f569a092e..e01011256 100644 --- a/src/synth/synth-context.ads +++ b/src/synth/synth-context.ads @@ -39,8 +39,12 @@ package Synth.Context is (Syn_Inst: Synth_Instance_Acc; Scope: Sim_Info_Acc) return Synth_Instance_Acc; + -- Create the first instance. function Make_Base_Instance return Synth_Instance_Acc; + -- Free the first instance. + procedure Free_Base_Instance; + -- Create and free the corresponding synth instance. function Make_Instance (Parent : Synth_Instance_Acc; Blk : Node; |