aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-07-08 07:50:03 +0200
committerTristan Gingold <tgingold@free.fr>2019-07-08 18:27:03 +0200
commit19a81f348c8e80d97ab85439bca66749f66b399d (patch)
tree95488732a39ec21ae2e73370bf2366b40db976db /src/synth
parent2d7183dee4006d32bfa895be06d80b3e29f80cf3 (diff)
downloadghdl-19a81f348c8e80d97ab85439bca66749f66b399d.tar.gz
ghdl-19a81f348c8e80d97ab85439bca66749f66b399d.tar.bz2
ghdl-19a81f348c8e80d97ab85439bca66749f66b399d.zip
synth-environement: add comments.
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/synth-environment.adb3
-rw-r--r--src/synth/synth-environment.ads5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/synth/synth-environment.adb b/src/synth/synth-environment.adb
index fd91f1f2e..d747f08a7 100644
--- a/src/synth/synth-environment.adb
+++ b/src/synth/synth-environment.adb
@@ -252,6 +252,7 @@ package body Synth.Environment is
or else (F_Asgns /= No_Assign
and then Get_Wire_Id (F_Asgns) < Get_Wire_Id (T_Asgns))
then
+ -- Has an assignment only for the false branch.
W := Get_Wire_Id (F_Asgns);
Te := Get_Last_Assigned_Value (W);
Fe := Get_Assign_Value (F_Asgns);
@@ -260,11 +261,13 @@ package body Synth.Environment is
or else (T_Asgns /= No_Assign
and then Get_Wire_Id (T_Asgns) < Get_Wire_Id (F_Asgns))
then
+ -- Has an assignment only for the true branch.
W := Get_Wire_Id (T_Asgns);
Te := Get_Assign_Value (T_Asgns);
Fe := Get_Last_Assigned_Value (W);
T_Asgns := Get_Assign_Chain (T_Asgns);
else
+ -- Has assignments for both the true and the false branch.
pragma Assert (Get_Wire_Id (F_Asgns) = Get_Wire_Id (T_Asgns));
W := Get_Wire_Id (F_Asgns);
Te := Get_Assign_Value (T_Asgns);
diff --git a/src/synth/synth-environment.ads b/src/synth/synth-environment.ads
index ca1fcf709..6dc040c11 100644
--- a/src/synth/synth-environment.ads
+++ b/src/synth/synth-environment.ads
@@ -114,15 +114,14 @@ package Synth.Environment is
-- first non-top level phi context.
procedure Pop_And_Merge_Phi (Ctxt : Builders.Context_Acc);
+ -- Handle if statement. According to SEL, the value of the wires are
+ -- those from T or from F.
procedure Merge_Phis (Ctxt : Builders.Context_Acc;
Sel : Net;
T, F : Phi_Type);
function Sort_Phi (P : Phi_Type) return Assign;
- -- Add a new wire in the phi context.
- procedure Phi_Insert_Assign (Asgn : Assign);
-
-- In the current phi context, assign VAL to DEST.
procedure Phi_Assign (Dest : Wire_Id; Val : Net);