diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-09-28 08:20:51 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-09-28 08:20:51 +0200 |
commit | b8f15ba84d5d7561bfdc20bc3ee96bb52949114e (patch) | |
tree | a6e9351877a3b70e572b6976648e54c9f834219e | |
parent | 7115fb5dc5d3c4e429ae139d47ab5c6efd734134 (diff) | |
download | ghdl-b8f15ba84d5d7561bfdc20bc3ee96bb52949114e.tar.gz ghdl-b8f15ba84d5d7561bfdc20bc3ee96bb52949114e.tar.bz2 ghdl-b8f15ba84d5d7561bfdc20bc3ee96bb52949114e.zip |
netlists-disp_vhdl: improve disp_x_lit.
-rw-r--r-- | src/synth/netlists-disp_vhdl.adb | 12 |
1 files 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); |