aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-disp_vhdl.adb
diff options
context:
space:
mode:
authorPepijn de Vos <pepijndevos@gmail.com>2019-08-15 09:59:45 +0200
committertgingold <tgingold@users.noreply.github.com>2019-08-15 09:59:45 +0200
commitf7f0f0a48f49e0328401c1f60575f07c92c0c15f (patch)
treefaf86e849be57a31d082fb322b65a5270c7e772f /src/synth/synth-disp_vhdl.adb
parent473e61a9f37534d08aab4dc26c5eada258637974 (diff)
downloadghdl-f7f0f0a48f49e0328401c1f60575f07c92c0c15f.tar.gz
ghdl-f7f0f0a48f49e0328401c1f60575f07c92c0c15f.tar.bz2
ghdl-f7f0f0a48f49e0328401c1f60575f07c92c0c15f.zip
add synthesis support for logic operators on numeric types (#893)
* add logic operators on unsigned * handle signed too * handle unary not
Diffstat (limited to 'src/synth/synth-disp_vhdl.adb')
-rw-r--r--src/synth/synth-disp_vhdl.adb11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/synth/synth-disp_vhdl.adb b/src/synth/synth-disp_vhdl.adb
index e7d61b11c..2abd0da44 100644
--- a/src/synth/synth-disp_vhdl.adb
+++ b/src/synth/synth-disp_vhdl.adb
@@ -25,6 +25,7 @@ with Name_Table;
with Vhdl.Prints;
with Vhdl.Std_Package;
with Vhdl.Ieee.Std_Logic_1164;
+with Vhdl.Ieee.Numeric;
with Vhdl.Errors; use Vhdl.Errors;
with Vhdl.Utils; use Vhdl.Utils;
@@ -101,6 +102,16 @@ package body Synth.Disp_Vhdl is
end if;
Put_Line (";");
Idx := Idx + 1;
+ elsif Btype = Vhdl.Ieee.Numeric.Numeric_Std_Unsigned_Type
+ or Btype = Vhdl.Ieee.Numeric.Numeric_Std_Signed_Type then
+ Put (" wrap_" & Pfx & " <= std_logic_vector(" & Pfx);
+ if Desc.W = 1 then
+ -- This is an array of length 1. A scalar is used in the
+ -- netlist.
+ Put (" (" & Pfx & "'left)");
+ end if;
+ Put_Line (");");
+ Idx := Idx + 1;
else
Error_Kind ("disp_in_converter(arr)", Ptype);
end if;