diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-09-16 04:40:32 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-09-16 04:40:32 +0200 |
commit | 7f411fd357bc9a17dc3d0593b86f4b8412a94632 (patch) | |
tree | 85eba7a6cd7cfb5e36972c1f8a7ca7b0308048e3 /src/synth | |
parent | 2e7f15755f0c4b8956ab3f102fce2f0afb6277e5 (diff) | |
download | ghdl-7f411fd357bc9a17dc3d0593b86f4b8412a94632.tar.gz ghdl-7f411fd357bc9a17dc3d0593b86f4b8412a94632.tar.bz2 ghdl-7f411fd357bc9a17dc3d0593b86f4b8412a94632.zip |
simul: handle active attribute
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/elab-vhdl_objtypes.ads | 1 | ||||
-rw-r--r-- | src/synth/synth-vhdl_expr.adb | 8 | ||||
-rw-r--r-- | src/synth/synth-vhdl_expr.ads | 1 |
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 |