aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/netlists-disp_vhdl.adb
diff options
context:
space:
mode:
authorPepijn de Vos <pepijndevos@gmail.com>2019-08-01 19:07:53 +0200
committertgingold <tgingold@users.noreply.github.com>2019-08-01 19:07:53 +0200
commit9b64728925b49051e6ae489ae005c0f22df0110e (patch)
tree41bcb027ac5757e8c501fb8ce8892972d24bf463 /src/synth/netlists-disp_vhdl.adb
parentae6d2b79e508684f189b6d8cc093dbb6f586f767 (diff)
downloadghdl-9b64728925b49051e6ae489ae005c0f22df0110e.tar.gz
ghdl-9b64728925b49051e6ae489ae005c0f22df0110e.tar.bz2
ghdl-9b64728925b49051e6ae489ae005c0f22df0110e.zip
synth: handle signed integer comparisons (#878)
* comparisons with integer literals * display signed comparison nicely * revert literal size changes * properly display signed values
Diffstat (limited to 'src/synth/netlists-disp_vhdl.adb')
-rw-r--r--src/synth/netlists-disp_vhdl.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/synth/netlists-disp_vhdl.adb b/src/synth/netlists-disp_vhdl.adb
index 800fc585c..55026054d 100644
--- a/src/synth/netlists-disp_vhdl.adb
+++ b/src/synth/netlists-disp_vhdl.adb
@@ -635,6 +635,18 @@ package body Netlists.Disp_Vhdl is
when Id_Uge =>
Disp_Template (" \o0 <= '1' when \ui0 >= \ui1 else '0';" & NL,
Inst);
+ when Id_Slt =>
+ Disp_Template (" \o0 <= '1' when \si0 < \si1 else '0';" & NL,
+ Inst);
+ when Id_Sle =>
+ Disp_Template (" \o0 <= '1' when \si0 <= \si1 else '0';" & NL,
+ Inst);
+ when Id_Sgt =>
+ Disp_Template (" \o0 <= '1' when \si0 > \si1 else '0';" & NL,
+ Inst);
+ when Id_Sge =>
+ Disp_Template (" \o0 <= '1' when \si0 >= \si1 else '0';" & NL,
+ Inst);
when Id_Eq =>
Disp_Template (" \o0 <= '1' when \i0 = \i1 else '0';" & NL, Inst);
when Id_Ne =>