aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/ghdlsynth_gates.h9
-rw-r--r--src/synth/netlists-gates.ads9
-rw-r--r--src/synth/synth-expr.adb13
-rw-r--r--src/synth/synth-stmts.adb4
4 files changed, 18 insertions, 17 deletions
diff --git a/src/synth/ghdlsynth_gates.h b/src/synth/ghdlsynth_gates.h
index a8dfe2a7f..bef7a7d97 100644
--- a/src/synth/ghdlsynth_gates.h
+++ b/src/synth/ghdlsynth_gates.h
@@ -1,4 +1,5 @@
-/* This file is automatically generated by build_header.sh - DO NOT MODIFY */
+/* DO NOT MODIFY
+ This file is automatically generated by Makefile. */
enum Module_Id {
Id_None = 0,
Id_Free = 1,
@@ -57,12 +58,8 @@ enum Module_Id {
Id_Assume = 57,
Id_Const_UB32 = 64,
Id_Const_UL32 = 70,
- Id_Const_SB32 = 65,
Id_Const_UB64 = 66,
- Id_Const_SB64 = 67,
- Id_Const_UB128 = 68,
- Id_Const_SB128 = 69,
- Id_Const_SL32 = 71,
+ Id_Const_UL64 = 67,
Id_Const_Z = 72,
Id_Const_0 = 73,
Id_Const_Bit = 74,
diff --git a/src/synth/netlists-gates.ads b/src/synth/netlists-gates.ads
index 649503796..da72811e0 100644
--- a/src/synth/netlists-gates.ads
+++ b/src/synth/netlists-gates.ads
@@ -144,16 +144,11 @@ package Netlists.Gates is
-- Constants are gates with only one constant output. There are multiple
-- kind of constant gates: for small width, the value is stored as a
- -- parameter, possibly signed or unsigned extended. For large width
- -- (> 128), the value is stored in a table.
+ -- parameter, possibly signed or unsigned extended.
Id_Const_UB32 : constant Module_Id := 64;
Id_Const_UL32 : constant Module_Id := 70;
- Id_Const_SB32 : constant Module_Id := 65;
Id_Const_UB64 : constant Module_Id := 66;
- Id_Const_SB64 : constant Module_Id := 67;
- Id_Const_UB128 : constant Module_Id := 68;
- Id_Const_SB128 : constant Module_Id := 69;
- Id_Const_SL32 : constant Module_Id := 71;
+ Id_Const_UL64 : constant Module_Id := 67;
Id_Const_Z : constant Module_Id := 72;
Id_Const_0 : constant Module_Id := 73;
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index 6fdd413a5..4d443d999 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -43,6 +43,10 @@ with Netlists.Builders; use Netlists.Builders;
with Netlists.Locations; use Netlists.Locations;
package body Synth.Expr is
+ -- As log2(3m) is directly referenced, the program must be linked with -lm
+ -- (math library) on unix systems.
+ pragma Linker_Options ("-lm");
+
function Synth_Name (Syn_Inst : Synth_Instance_Acc; Name : Node)
return Value_Acc;
@@ -373,7 +377,9 @@ package body Synth.Expr is
end if;
end loop;
when Iir_Kind_Choice_By_Name =>
- Pos := Natural (Get_Element_Position (Get_Name (Assoc)));
+ Pos := Natural (Get_Element_Position
+ (Get_Named_Entity
+ (Get_Choice_Name (Assoc))));
Set_Elem (Pos);
when others =>
Error_Msg_Synth
@@ -586,7 +592,8 @@ package body Synth.Expr is
case Get_Kind (Bound) is
when Iir_Kind_Range_Expression =>
return Synth_Discrete_Range_Expression (Syn_Inst, Bound);
- when Iir_Kind_Integer_Subtype_Definition =>
+ when Iir_Kind_Integer_Subtype_Definition
+ | Iir_Kind_Enumeration_Subtype_Definition =>
if Get_Type_Declarator (Bound) /= Null_Node then
-- This is a named subtype, so it has been evaluated.
return Get_Value_Type (Syn_Inst, Bound).Drange;
@@ -1394,6 +1401,8 @@ package body Synth.Expr is
return Synth_Vec_Reduce_Monadic(Id_Red_And);
when Iir_Predefined_Ieee_1164_Vector_Or_Reduce =>
return Synth_Vec_Reduce_Monadic(Id_Red_Or);
+ when Iir_Predefined_Ieee_1164_Condition_Operator =>
+ return Operand;
when others =>
Error_Msg_Synth
(+Loc,
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb
index 1a3805c77..c36400e91 100644
--- a/src/synth/synth-stmts.adb
+++ b/src/synth/synth-stmts.adb
@@ -1019,8 +1019,6 @@ package body Synth.Stmts is
while Is_Valid (Assoc) loop
Inter := Get_Association_Interface (Assoc, Assoc_Inter);
- Synth_Declaration_Type (Subprg_Inst, Inter);
-
case Iir_Parameter_Modes (Get_Mode (Inter)) is
when Iir_In_Mode =>
case Get_Kind (Assoc) is
@@ -1230,6 +1228,8 @@ package body Synth.Stmts is
exit;
when Iir_Kind_Procedure_Call_Statement =>
Synth_Procedure_Call (Syn_Inst, Stmt);
+ when Iir_Kind_Report_Statement =>
+ null;
when others =>
Error_Kind ("synth_sequential_statements", Stmt);
end case;