diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/synth/synth-disp_vhdl.adb | 14 | 
1 files changed, 11 insertions, 3 deletions
| diff --git a/src/synth/synth-disp_vhdl.adb b/src/synth/synth-disp_vhdl.adb index d2e83fb6d..abff34d9e 100644 --- a/src/synth/synth-disp_vhdl.adb +++ b/src/synth/synth-disp_vhdl.adb @@ -203,6 +203,8 @@ package body Synth.Disp_Vhdl is        Disp_Pfx (Off, W, Full);     end Disp_Out_Rhs; +   --  PTYPE is the type of the original port, while TYP is the type of +   --  the netlist port.     procedure Disp_Out_Converter (Mname : String;                                   Pfx : String;                                   Off : Uns32; @@ -261,7 +263,11 @@ package body Synth.Disp_Vhdl is              if Btype = Vhdl.Ieee.Std_Logic_1164.Std_Logic_Vector_Type then                 --  Nothing to do.                 W := Typ.Vbound.Len; -               Put ("  " & Pfx & " <= "); +               Put ("  " & Pfx); +               if W = 1 then +                  Put (" (" & Pfx & "'left)"); +               end if; +               Put (" <= ");                 Disp_Out_Rhs (Mname, Off, W, Full);                 Put_Line (";");              elsif Btype = Vhdl.Std_Package.Bit_Vector_Type_Definition then @@ -314,6 +320,7 @@ package body Synth.Disp_Vhdl is              declare                 Els : constant Node_Flist :=                   Get_Elements_Declaration_List (Ptype); +               Rec_Full : constant Boolean := Full and Typ.W = 1;              begin                 for I in Flist_First .. Flist_Last (Els) loop                    declare @@ -324,7 +331,7 @@ package body Synth.Disp_Vhdl is                       Disp_Out_Converter                         (Mname,                          Pfx & '.' & Name_Table.Image (Get_Identifier (El)), -                        Off + Et.Off, Get_Type (El), Et.Typ, False); +                        Off + Et.Off, Get_Type (El), Et.Typ, Rec_Full);                    end;                 end loop;              end; @@ -333,8 +340,9 @@ package body Synth.Disp_Vhdl is        end case;     end Disp_Out_Converter; +   --  Disp conversion for output port (so in the form o <= wrap_o).     procedure Disp_Output_Port_Converter (Inst : Synth_Instance_Acc; -                                        Port : Node) +                                         Port : Node)     is        Port_Name : constant String :=          Name_Table.Image (Get_Identifier (Port)); | 
