aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-07-25 07:20:46 +0200
committerTristan Gingold <tgingold@free.fr>2019-07-25 07:20:46 +0200
commit6e1f2bbd6eabc81206b136d749182426196bb6d9 (patch)
tree5e9e680b59ae4e14cee66c3b8e8db4acb132347b
parentf992c33f302b0e5060d30dedff94ee9fa15190ef (diff)
downloadghdl-6e1f2bbd6eabc81206b136d749182426196bb6d9.tar.gz
ghdl-6e1f2bbd6eabc81206b136d749182426196bb6d9.tar.bz2
ghdl-6e1f2bbd6eabc81206b136d749182426196bb6d9.zip
synth: array inequality, integer in choices.
-rw-r--r--src/synth/synth-expr.adb7
-rw-r--r--src/synth/synth-stmts.adb4
2 files changed, 11 insertions, 0 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index 5ace33ed3..caf0135df 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -784,6 +784,13 @@ package body Synth.Expr is
else
raise Internal_Error;
end if;
+ when Iir_Predefined_Array_Inequality =>
+ -- TODO: check size, handle non-vector.
+ if Is_Vector_Type (Ltype) then
+ return Synth_Compare (Id_Ne);
+ else
+ raise Internal_Error;
+ end if;
when Iir_Predefined_Array_Greater =>
-- TODO: check size, non-vector.
-- TODO: that's certainly not the correct operator.
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb
index 53d4f4515..5aad73c76 100644
--- a/src/synth/synth-stmts.adb
+++ b/src/synth/synth-stmts.adb
@@ -355,6 +355,10 @@ package body Synth.Stmts is
when Iir_Kind_Enumeration_Type_Definition =>
Dc := 0;
Val := Uns64 (Get_Enum_Pos (Strip_Denoting_Name (Expr)));
+ when Iir_Kind_Integer_Type_Definition =>
+ -- TODO: signed values.
+ Dc := 0;
+ Val := Uns64 (Get_Value (Expr));
when others =>
Error_Kind ("convert_to_uns64", Expr_Type);
end case;