aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/ghdlsynth_gates.h47
-rw-r--r--src/synth/netlists-builders.adb5
-rw-r--r--src/synth/netlists-disp_vhdl.adb6
-rw-r--r--src/synth/synth-expr.adb17
4 files changed, 50 insertions, 25 deletions
diff --git a/src/synth/ghdlsynth_gates.h b/src/synth/ghdlsynth_gates.h
index b923652aa..ed5fd5a48 100644
--- a/src/synth/ghdlsynth_gates.h
+++ b/src/synth/ghdlsynth_gates.h
@@ -40,27 +40,28 @@ enum Module_Id {
Id_Signal = 35,
Id_Isignal = 36,
Id_Output = 37,
- Id_Dff = 38,
- Id_Adff = 39,
- Id_Idff = 40,
- Id_Iadff = 41,
- Id_Utrunc = 42,
- Id_Strunc = 43,
- Id_Uextend = 44,
- Id_Sextend = 45,
- Id_Extract = 46,
- Id_Dyn_Extract = 47,
- Id_Insert = 48,
- Id_Dyn_Insert = 49,
- Id_Edge = 50,
- Id_Assert = 51,
- Id_Assume = 52,
- Id_Const_UB32 = 56,
- Id_Const_SB32 = 57,
- Id_Const_UB64 = 58,
- Id_Const_SB64 = 59,
- Id_Const_UB128 = 60,
- Id_Const_SB128 = 61,
- Id_Const_UL32 = 62,
- Id_Const_SL32 = 63,
+ Id_Port = 38,
+ Id_Dff = 40,
+ Id_Adff = 41,
+ Id_Idff = 42,
+ Id_Iadff = 43,
+ Id_Utrunc = 46,
+ Id_Strunc = 47,
+ Id_Uextend = 48,
+ Id_Sextend = 49,
+ Id_Extract = 50,
+ Id_Dyn_Extract = 51,
+ Id_Insert = 52,
+ Id_Dyn_Insert = 53,
+ Id_Edge = 55,
+ Id_Assert = 56,
+ Id_Assume = 57,
+ Id_Const_UB32 = 64,
+ Id_Const_SB32 = 65,
+ Id_Const_UB64 = 66,
+ Id_Const_SB64 = 67,
+ Id_Const_UB128 = 68,
+ Id_Const_SB128 = 69,
+ Id_Const_UL32 = 70,
+ Id_Const_SL32 = 71,
};
diff --git a/src/synth/netlists-builders.adb b/src/synth/netlists-builders.adb
index 27364f109..78ed38a41 100644
--- a/src/synth/netlists-builders.adb
+++ b/src/synth/netlists-builders.adb
@@ -401,6 +401,11 @@ package body Netlists.Builders is
Create_Compare_Module (Design, Res.M_Compare (Id_Ule),
Get_Identifier ("ule"), Id_Ule);
+ Create_Compare_Module (Design, Res.M_Compare (Id_Ugt),
+ Get_Identifier ("ugt"), Id_Ugt);
+ Create_Compare_Module (Design, Res.M_Compare (Id_Uge),
+ Get_Identifier ("uge"), Id_Uge);
+
Create_Concat_Modules (Res);
Create_Const_Modules (Res);
diff --git a/src/synth/netlists-disp_vhdl.adb b/src/synth/netlists-disp_vhdl.adb
index f12dd7811..139b2c0d0 100644
--- a/src/synth/netlists-disp_vhdl.adb
+++ b/src/synth/netlists-disp_vhdl.adb
@@ -598,6 +598,12 @@ package body Netlists.Disp_Vhdl is
when Id_Ule =>
Disp_Template (" \o0 <= '1' when \ui0 <= \ui1 else '0';" & NL,
Inst);
+ when Id_Ugt =>
+ Disp_Template (" \o0 <= '1' when \ui0 > \ui1 else '0';" & NL,
+ Inst);
+ when Id_Uge =>
+ Disp_Template (" \o0 <= '1' when \ui0 >= \ui1 else '0';" & NL,
+ Inst);
when Id_Eq =>
Disp_Template (" \o0 <= '1' when \i0 = \i1 else '0';" & NL, Inst);
when Id_Ne =>
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index d978c5676..c6e77effd 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -773,12 +773,25 @@ package body Synth.Expr is
return Create_Value_Discrete (0);
end if;
return Synth_Compare_Uns_Nat (Id_Ult);
- when Iir_Predefined_Ieee_Std_Logic_Unsigned_Lt_Slv_Slv =>
+ when Iir_Predefined_Ieee_Numeric_Std_Lt_Uns_Uns
+ | Iir_Predefined_Ieee_Std_Logic_Unsigned_Lt_Slv_Slv =>
-- "<" (Unsigned, Unsigned) [resize]
return Synth_Compare_Uns_Uns (Id_Ult);
- when Iir_Predefined_Ieee_Std_Logic_Unsigned_Le_Slv_Slv =>
+ when Iir_Predefined_Ieee_Numeric_Std_Le_Uns_Uns
+ | Iir_Predefined_Ieee_Std_Logic_Unsigned_Le_Slv_Slv =>
-- "<=" (Unsigned, Unsigned) [resize]
return Synth_Compare_Uns_Uns (Id_Ule);
+ when Iir_Predefined_Ieee_Numeric_Std_Gt_Uns_Nat =>
+ -- ">" (Unsigned, Natural)
+ return Synth_Compare_Uns_Nat (Id_Ugt);
+ when Iir_Predefined_Ieee_Numeric_Std_Gt_Uns_Uns
+ | Iir_Predefined_Ieee_Std_Logic_Unsigned_Gt_Slv_Slv =>
+ -- ">" (Unsigned, Unsigned) [resize]
+ return Synth_Compare_Uns_Uns (Id_Ugt);
+ when Iir_Predefined_Ieee_Numeric_Std_Ge_Uns_Uns
+ | Iir_Predefined_Ieee_Std_Logic_Unsigned_Ge_Slv_Slv =>
+ -- ">=" (Unsigned, Unsigned) [resize]
+ return Synth_Compare_Uns_Uns (Id_Uge);
when Iir_Predefined_Array_Element_Concat =>
declare
L : constant Net := Get_Net (Left, Ltype);