From b8f15ba84d5d7561bfdc20bc3ee96bb52949114e Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 28 Sep 2019 08:20:51 +0200 Subject: netlists-disp_vhdl: improve disp_x_lit. --- src/synth/netlists-disp_vhdl.adb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/synth/netlists-disp_vhdl.adb b/src/synth/netlists-disp_vhdl.adb index 6e2628384..b2bba0972 100644 --- a/src/synth/netlists-disp_vhdl.adb +++ b/src/synth/netlists-disp_vhdl.adb @@ -321,9 +321,15 @@ package body Netlists.Disp_Vhdl is is Q : constant Character := Get_Lit_Quote (W); begin - Put (Q); - Put ((1 .. Natural (W) => 'X')); - Put (Q); + if W <= 8 then + Put (Q); + Put ((1 .. Natural (W) => 'X')); + Put (Q); + else + Put ('('); + Put_Trim (Uns32'Image (W - 1)); + Put (" downto 0 => 'X')"); + end if; end Disp_X_Lit; procedure Disp_Extract (Inst : Instance); -- cgit v1.2.3