aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-12-26 17:31:38 +0100
committerTristan Gingold <tgingold@free.fr>2022-12-26 17:33:38 +0100
commit0f348cb94e9f7bd83f52c0317bb7f858b87ece05 (patch)
treea2305ebc04b749ca2ff6d28bee393b2e5def2475 /src/synth
parentb458a7644447bb440ce4be6aa8458c71d54d8044 (diff)
downloadghdl-0f348cb94e9f7bd83f52c0317bb7f858b87ece05.tar.gz
ghdl-0f348cb94e9f7bd83f52c0317bb7f858b87ece05.tar.bz2
ghdl-0f348cb94e9f7bd83f52c0317bb7f858b87ece05.zip
simul: handle driving and driving_value attributes
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/synth-vhdl_expr.adb13
-rw-r--r--src/synth/synth-vhdl_expr.ads2
2 files changed, 15 insertions, 0 deletions
diff --git a/src/synth/synth-vhdl_expr.adb b/src/synth/synth-vhdl_expr.adb
index c701be7c2..af66fb874 100644
--- a/src/synth/synth-vhdl_expr.adb
+++ b/src/synth/synth-vhdl_expr.adb
@@ -2429,6 +2429,19 @@ package body Synth.Vhdl_Expr is
end if;
Error_Msg_Synth (Syn_Inst, Expr, "active attribute not allowed");
return No_Valtyp;
+ when Iir_Kind_Driving_Attribute =>
+ if Hook_Driving_Attribute /= null then
+ return Hook_Driving_Attribute (Syn_Inst, Expr);
+ end if;
+ Error_Msg_Synth (Syn_Inst, Expr, "driving attribute not allowed");
+ return No_Valtyp;
+ when Iir_Kind_Driving_Value_Attribute =>
+ if Hook_Driving_Value_Attribute /= null then
+ return Hook_Driving_Value_Attribute (Syn_Inst, Expr);
+ end if;
+ Error_Msg_Synth (Syn_Inst, Expr,
+ "driving_value attribute not allowed");
+ return No_Valtyp;
when Iir_Kind_Last_Value_Attribute =>
if Hook_Last_Value_Attribute /= null then
return Hook_Last_Value_Attribute (Syn_Inst, Expr);
diff --git a/src/synth/synth-vhdl_expr.ads b/src/synth/synth-vhdl_expr.ads
index 74412fe22..c991f388a 100644
--- a/src/synth/synth-vhdl_expr.ads
+++ b/src/synth/synth-vhdl_expr.ads
@@ -89,6 +89,8 @@ package Synth.Vhdl_Expr is
function (Syn_Inst : Synth_Instance_Acc; Expr : Node) return Valtyp;
Hook_Event_Attribute : Hook_Attribute_Acc;
Hook_Active_Attribute : Hook_Attribute_Acc;
+ Hook_Driving_Attribute : Hook_Attribute_Acc;
+ Hook_Driving_Value_Attribute : Hook_Attribute_Acc;
Hook_Last_Value_Attribute : Hook_Attribute_Acc;
Hook_Last_Event_Attribute : Hook_Attribute_Acc;
Hook_Last_Active_Attribute : Hook_Attribute_Acc;