diff options
-rw-r--r-- | src/synth/netlists-disp_vhdl.adb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/synth/netlists-disp_vhdl.adb b/src/synth/netlists-disp_vhdl.adb index 0ebb67c87..702945c3e 100644 --- a/src/synth/netlists-disp_vhdl.adb +++ b/src/synth/netlists-disp_vhdl.adb @@ -982,8 +982,13 @@ package body Netlists.Disp_Vhdl is declare W : constant Width := Get_Width (Get_Output (Inst, 0)); begin - Disp_Template (" \o0 <= \i0 (\n0 downto 0); -- trunc" & NL, - Inst, (0 => W - 1)); + Disp_Template (" \o0 <= \i0 ", Inst); + if W = 1 then + Disp_Template ("(0)", Inst); + else + Disp_Template ("(\n0 downto 0)", Inst, (0 => W - 1)); + end if; + Disp_Template ("; -- trunc" & NL, Inst); end; when Id_Uextend => declare |