aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-07-04 18:21:29 +0200
committerTristan Gingold <tgingold@free.fr>2019-07-04 18:21:29 +0200
commit418c851e9bed5154a7127ce2dc504f7ed64880fd (patch)
tree392b4a59de1f4adaaad0480b613db6df430b1151 /src/synth
parent7dbd4e08569c9a7284ccbd67a8189a6cfdcc4cc9 (diff)
downloadghdl-418c851e9bed5154a7127ce2dc504f7ed64880fd.tar.gz
ghdl-418c851e9bed5154a7127ce2dc504f7ed64880fd.tar.bz2
ghdl-418c851e9bed5154a7127ce2dc504f7ed64880fd.zip
netlists: export new_internal_name.
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/netlists-builders.adb14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/synth/netlists-builders.adb b/src/synth/netlists-builders.adb
index 6836a8d71..8d6534b42 100644
--- a/src/synth/netlists-builders.adb
+++ b/src/synth/netlists-builders.adb
@@ -436,15 +436,21 @@ package body Netlists.Builders is
Ctxt.Parent := Parent;
end Set_Parent;
- function New_Internal_Instance (Ctxt : Context_Acc; M : Module)
- return Instance
+ function New_Internal_Name (Ctxt : Context_Acc) return Sname
is
- pragma Assert (M /= No_Module);
Name : Sname;
begin
Name := New_Sname_Version (Get_Name (Ctxt.Parent), Ctxt.Num);
Ctxt.Num := Ctxt.Num + 1;
- return New_Instance (Ctxt.Parent, M, Name);
+ return Name;
+ end New_Internal_Name;
+
+ function New_Internal_Instance (Ctxt : Context_Acc; M : Module)
+ return Instance
+ is
+ pragma Assert (M /= No_Module);
+ begin
+ return New_Instance (Ctxt.Parent, M, New_Internal_Name (Ctxt));
end New_Internal_Instance;
function Build_Dyadic (Ctxt : Context_Acc;