diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-07-04 18:21:29 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-07-04 18:21:29 +0200 |
commit | 418c851e9bed5154a7127ce2dc504f7ed64880fd (patch) | |
tree | 392b4a59de1f4adaaad0480b613db6df430b1151 /src/synth | |
parent | 7dbd4e08569c9a7284ccbd67a8189a6cfdcc4cc9 (diff) | |
download | ghdl-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.adb | 14 |
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; |