diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/synth/netlists-butils.adb | 4 | ||||
| -rw-r--r-- | src/synth/netlists-butils.ads | 4 | ||||
| -rw-r--r-- | src/synth/netlists-locations.adb | 12 | ||||
| -rw-r--r-- | src/synth/netlists-locations.ads | 1 | ||||
| -rw-r--r-- | src/synth/synth-stmts.adb | 6 | 
5 files changed, 21 insertions, 6 deletions
diff --git a/src/synth/netlists-butils.adb b/src/synth/netlists-butils.adb index d26e1762c..7b74def6d 100644 --- a/src/synth/netlists-butils.adb +++ b/src/synth/netlists-butils.adb @@ -18,13 +18,15 @@  --  Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,  --  MA 02110-1301, USA. +with Netlists.Locations; use Netlists.Locations; +  package body Netlists.Butils is     procedure Synth_Case (Ctxt : Context_Acc;                           Sel : Net;                           Els : in out Case_Element_Array;                           Default : Net;                           Res : out Net; -                         Sel_Loc : Syn_Src) +                         Sel_Loc : Location_Type)     is        Wd : constant Width := Get_Width (Sel);        Mask : Uns64; diff --git a/src/synth/netlists-butils.ads b/src/synth/netlists-butils.ads index c0d79734a..ebf03863e 100644 --- a/src/synth/netlists-butils.ads +++ b/src/synth/netlists-butils.ads @@ -22,8 +22,6 @@ with Ada.Unchecked_Deallocation;  with Netlists.Builders; use Netlists.Builders; -with Synth.Source; use Synth.Source; -  package Netlists.Butils is     type Case_Element is record        Sel : Uns64; @@ -51,5 +49,5 @@ package Netlists.Butils is                           Els : in out Case_Element_Array;                           Default : Net;                           Res : out Net; -                         Sel_Loc : Syn_Src); +                         Sel_Loc : Location_Type);  end Netlists.Butils; diff --git a/src/synth/netlists-locations.adb b/src/synth/netlists-locations.adb index c651fc752..4db65c85a 100644 --- a/src/synth/netlists-locations.adb +++ b/src/synth/netlists-locations.adb @@ -40,6 +40,11 @@ package body Netlists.Locations is        Loc_Table.Table (Inst) := Loc;     end Set_Location1; +   procedure Set_Location2 (N : Net; Loc : Location_Type) is +   begin +      Set_Location (Get_Net_Parent (N), Loc); +   end Set_Location2; +     procedure Set_Location (Inst : Instance; Loc : Location_Type) is     begin        if Flag_Locations then @@ -47,6 +52,13 @@ package body Netlists.Locations is        end if;     end Set_Location; +   procedure Set_Location (Dest : Net; Loc : Location_Type) is +   begin +      if Flag_Locations then +         Set_Location2 (Dest, Loc); +      end if; +   end Set_Location; +     function Get_Location1 (Inst : Instance) return Location_Type is     begin        if Inst > Loc_Table.Last then diff --git a/src/synth/netlists-locations.ads b/src/synth/netlists-locations.ads index 1990a8b67..3aa66b2df 100644 --- a/src/synth/netlists-locations.ads +++ b/src/synth/netlists-locations.ads @@ -30,6 +30,7 @@ package Netlists.Locations is     function Get_Location (Inst : Instance) return Location_Type;     --  Utilities. +   procedure Set_Location (Dest : Net; Loc : Location_Type);     procedure Copy_Location (Dest : Net; Src : Net);     procedure Copy_Location (Dest : Net; Src : Instance);     pragma Inline (Copy_Location); diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb index 187232534..2fb059ea7 100644 --- a/src/synth/synth-stmts.adb +++ b/src/synth/synth-stmts.adb @@ -957,7 +957,8 @@ package body Synth.Stmts is                 --  Generate the muxes tree.                 Synth_Case (Get_Build (C.Inst), -                           Sel_Net, Case_El.all, Default, Res, Expr); +                           Sel_Net, Case_El.all, Default, Res, +                           Get_Location (Expr));                 Partial_Assign_Append (List, New_Partial_Assign (Res, Off));                 Min_Off := Off + Wd; @@ -1101,7 +1102,8 @@ package body Synth.Stmts is           --  Generate the muxes tree.           Synth_Case (Get_Build (Syn_Inst), -                     Sel_Net, Case_El.all, Default, Res, Expr); +                     Sel_Net, Case_El.all, Default, Res, +                     Get_Location (Expr));           Synth_Assignment (Syn_Inst, Get_Target (Stmt),                             Create_Value_Net (Res, Targ_Type),                             Stmt);  | 
