aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/elab-vhdl_objtypes.ads1
-rw-r--r--src/synth/synth-vhdl_expr.adb8
-rw-r--r--src/synth/synth-vhdl_expr.ads1
3 files changed, 9 insertions, 1 deletions
diff --git a/src/synth/elab-vhdl_objtypes.ads b/src/synth/elab-vhdl_objtypes.ads
index 46c6660ba..fe1508fbc 100644
--- a/src/synth/elab-vhdl_objtypes.ads
+++ b/src/synth/elab-vhdl_objtypes.ads
@@ -90,6 +90,7 @@ package Elab.Vhdl_Objtypes is
subtype Type_Nets is Type_Kind range Type_Bit .. Type_Logic;
subtype Type_All_Discrete is Type_Kind range Type_Bit .. Type_Discrete;
+ subtype Type_Scalars is Type_Kind range Type_Bit .. Type_Float;
subtype Type_Records is Type_Kind range
Type_Unbounded_Record .. Type_Record;
subtype Type_Arrays is Type_Kind range
diff --git a/src/synth/synth-vhdl_expr.adb b/src/synth/synth-vhdl_expr.adb
index 98dd16f7b..99ab99ea2 100644
--- a/src/synth/synth-vhdl_expr.adb
+++ b/src/synth/synth-vhdl_expr.adb
@@ -2352,7 +2352,13 @@ package body Synth.Vhdl_Expr is
if Hook_Event_Attribute /= null then
return Hook_Event_Attribute (Syn_Inst, Expr);
end if;
- Error_Msg_Synth (+Expr, "event attributes not allowed");
+ Error_Msg_Synth (+Expr, "event attribute not allowed");
+ return No_Valtyp;
+ when Iir_Kind_Active_Attribute =>
+ if Hook_Active_Attribute /= null then
+ return Hook_Active_Attribute (Syn_Inst, Expr);
+ end if;
+ Error_Msg_Synth (+Expr, "active attribute not allowed");
return No_Valtyp;
when Iir_Kind_Dot_Attribute =>
if Hook_Dot_Attribute /= null then
diff --git a/src/synth/synth-vhdl_expr.ads b/src/synth/synth-vhdl_expr.ads
index 846c8409c..227e82e29 100644
--- a/src/synth/synth-vhdl_expr.ads
+++ b/src/synth/synth-vhdl_expr.ads
@@ -88,6 +88,7 @@ package Synth.Vhdl_Expr is
type Hook_Attribute_Acc is access
function (Syn_Inst : Synth_Instance_Acc; Expr : Node) return Valtyp;
Hook_Event_Attribute : Hook_Attribute_Acc;
+ Hook_Active_Attribute : Hook_Attribute_Acc;
Hook_Dot_Attribute : Hook_Attribute_Acc;
-- Use base type of EXPR to synthesize EXPR. Useful when the type of