diff options
-rw-r--r-- | src/synth/synth-environment.adb | 3 | ||||
-rw-r--r-- | src/synth/synth-environment.ads | 5 |
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); |