aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-disp_vhdl.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-01-12 20:59:52 +0100
committerTristan Gingold <tgingold@free.fr>2020-01-12 20:59:52 +0100
commit93aa98b608bae5993cd45d53036ed6fde3cbebc6 (patch)
tree4a49a5c9382a144511298aa871640b7594bdfc3a /src/synth/netlists-disp_vhdl.adb
parent9b6efb7a8f978124ec14767230dd652b144f0d5e (diff)
downloadghdl-93aa98b608bae5993cd45d53036ed6fde3cbebc6.tar.gz
ghdl-93aa98b608bae5993cd45d53036ed6fde3cbebc6.tar.bz2
ghdl-93aa98b608bae5993cd45d53036ed6fde3cbebc6.zip
netlists-disp_vhdl: handle 0 bit truncation.
Diffstat (limited to 'src/synth/netlists-disp_vhdl.adb')
-rw-r--r--src/synth/netlists-disp_vhdl.adb2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/synth/netlists-disp_vhdl.adb b/src/synth/netlists-disp_vhdl.adb
index 121016cac..6fd40a773 100644
--- a/src/synth/netlists-disp_vhdl.adb
+++ b/src/synth/netlists-disp_vhdl.adb
@@ -1046,6 +1046,8 @@ package body Netlists.Disp_Vhdl is
Disp_Template (" \o0 <= \i0 ", Inst);
if W = 1 then
Disp_Template ("(0)", Inst);
+ elsif W = 0 then
+ Disp_Template ("(-1 downto 0)", Inst);
else
Disp_Template ("(\n0 downto 0)", Inst, (0 => W - 1));
end if;