From 2448cf3ff2f3b723fdece48c953a9f4c9b585570 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 11 Jan 2020 17:26:57 +0100 Subject: netlists-disp_vhdl: handle one bit memories. Fix #1083 --- src/synth/netlists-disp_vhdl.adb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/synth/netlists-disp_vhdl.adb b/src/synth/netlists-disp_vhdl.adb index 2348f669b..cf138b6d5 100644 --- a/src/synth/netlists-disp_vhdl.adb +++ b/src/synth/netlists-disp_vhdl.adb @@ -661,8 +661,12 @@ package body Netlists.Disp_Vhdl is -- Declare the memory. Disp_Template (" type \o0_type is array (0 to \n0)" & NL, Mem, (0 => Depth - 1)); - Disp_Template (" of std_logic_vector (\n0 downto 0);" & NL, - Mem, (0 => Data_W - 1)); + if Data_W = 1 then + Disp_Template (" of std_logic;" & NL, Mem); + else + Disp_Template (" of std_logic_vector (\n0 downto 0);" & NL, + Mem, (0 => Data_W - 1)); + end if; Disp_Template (" variable \o0 : \o0_type", Mem); if Get_Id (Mem) = Id_Memory_Init then declare -- cgit v1.2.3