aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-context.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-09-21 08:52:24 +0200
committerTristan Gingold <tgingold@free.fr>2019-09-21 08:52:24 +0200
commit3e83d4aa5076b1a8cf2ec2214de36c4f507078c9 (patch)
tree5fd7176bbe65f3a27b4ed9459e89867138ab2a4d /src/synth/synth-context.adb
parent108c98263d15c50fd19fd39926dd6aa213d30b52 (diff)
downloadghdl-3e83d4aa5076b1a8cf2ec2214de36c4f507078c9.tar.gz
ghdl-3e83d4aa5076b1a8cf2ec2214de36c4f507078c9.tar.bz2
ghdl-3e83d4aa5076b1a8cf2ec2214de36c4f507078c9.zip
synth: add bit0/bit1 in instance.
Diffstat (limited to 'src/synth/synth-context.adb')
-rw-r--r--src/synth/synth-context.adb13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/synth/synth-context.adb b/src/synth/synth-context.adb
index b6c5916b5..730f5b6aa 100644
--- a/src/synth/synth-context.adb
+++ b/src/synth/synth-context.adb
@@ -112,6 +112,9 @@ package body Synth.Context is
Cur_Module => M,
Bit0 => No_Net,
Bit1 => No_Net);
+ Builders.Set_Parent (Base.Builder, M);
+ Base.Bit0 := Build_Const_UB32 (Base.Builder, 0, 1);
+ Base.Bit1 := Build_Const_UB32 (Base.Builder, 1, 1);
Inst.Base := Base;
end Set_Instance_Module;
@@ -136,6 +139,16 @@ package body Synth.Context is
return Inst.Base.Builder;
end Get_Build;
+ function Get_Inst_Bit0 (Inst : Synth_Instance_Acc) return Net is
+ begin
+ return Inst.Base.Bit0;
+ end Get_Inst_Bit0;
+
+ function Get_Inst_Bit1 (Inst : Synth_Instance_Acc) return Net is
+ begin
+ return Inst.Base.Bit1;
+ end Get_Inst_Bit1;
+
function Create_Value_Instance (Inst : Synth_Instance_Acc)
return Value_Acc is
begin