diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-11-28 05:54:08 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-11-28 05:54:08 +0100 |
commit | bfa61a8886ec2d3ff20f55b6192eea5c808a07ea (patch) | |
tree | 8e04f4777a7152f17558048bf0cd4fdcaf6c4f0e | |
parent | e9448d5bfebee7a46e20fb99540cad2e5f4160b1 (diff) | |
download | ghdl-bfa61a8886ec2d3ff20f55b6192eea5c808a07ea.tar.gz ghdl-bfa61a8886ec2d3ff20f55b6192eea5c808a07ea.tar.bz2 ghdl-bfa61a8886ec2d3ff20f55b6192eea5c808a07ea.zip |
netlists: add Get_Design.
-rw-r--r-- | src/synth/netlists-builders.adb | 6 | ||||
-rw-r--r-- | src/synth/netlists-builders.ads | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/synth/netlists-builders.adb b/src/synth/netlists-builders.adb index 48ebe51c2..fea58c988 100644 --- a/src/synth/netlists-builders.adb +++ b/src/synth/netlists-builders.adb @@ -379,6 +379,7 @@ package body Netlists.Builders is Id_Mux2, 3, 1, 0); Set_Port_Desc (Ctxt.M_Mux2, Inputs (0 .. 2), Outputs); + Inputs (0).W := 2; Ctxt.M_Mux4 := New_User_Module (Ctxt.Design, New_Sname_Artificial (Get_Identifier ("mux4")), Id_Mux4, 5, 1, 0); @@ -639,6 +640,11 @@ package body Netlists.Builders is Ctxt.Parent := Parent; end Set_Parent; + function Get_Design (Ctxt : Context_Acc) return Module is + begin + return Ctxt.Design; + end Get_Design; + function New_Internal_Name (Ctxt : Context_Acc; Prefix : Sname := No_Sname) return Sname is diff --git a/src/synth/netlists-builders.ads b/src/synth/netlists-builders.ads index 9e97abeac..776b74111 100644 --- a/src/synth/netlists-builders.ads +++ b/src/synth/netlists-builders.ads @@ -36,6 +36,8 @@ package Netlists.Builders is -- Create a builder for Design. Must be called once. function Build_Builders (Design : Module) return Context_Acc; + function Get_Design (Ctxt : Context_Acc) return Module; + -- Set the parent for the new instances. procedure Set_Parent (Ctxt : Context_Acc; Parent : Module); |