aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/synth/synth-vhdl_expr.adb11
-rw-r--r--src/synth/synth-vhdl_oper.adb4
-rw-r--r--src/synth/synth-vhdl_oper.ads1
3 files changed, 13 insertions, 3 deletions
diff --git a/src/synth/synth-vhdl_expr.adb b/src/synth/synth-vhdl_expr.adb
index 6ec6e5e12..eee24353f 100644
--- a/src/synth/synth-vhdl_expr.adb
+++ b/src/synth/synth-vhdl_expr.adb
@@ -1867,8 +1867,10 @@ package body Synth.Vhdl_Expr is
Get_Implicit_Definition (Imp);
Edge : Net;
begin
- -- Match clock-edge
- if Def = Iir_Predefined_Boolean_And then
+ -- Match clock-edge (only for synthesis)
+ if Def = Iir_Predefined_Boolean_And
+ and then Hook_Signal_Expr = null
+ then
Edge := Synth_Clock_Edge (Syn_Inst,
Get_Left (Expr), Get_Right (Expr));
if Edge /= No_Net then
@@ -1938,7 +1940,10 @@ package body Synth.Vhdl_Expr is
begin
Res := Synth_Name (Syn_Inst, Expr);
if Res.Val /= null
- and then Res.Val.Kind = Value_Signal
+ and then
+ (Res.Val.Kind = Value_Signal
+ or else (Res.Val.Kind = Value_Alias
+ and then Res.Val.A_Obj.Kind = Value_Signal))
then
if Hook_Signal_Expr /= null then
return Hook_Signal_Expr (Res);
diff --git a/src/synth/synth-vhdl_oper.adb b/src/synth/synth-vhdl_oper.adb
index 6f6857418..4854f554a 100644
--- a/src/synth/synth-vhdl_oper.adb
+++ b/src/synth/synth-vhdl_oper.adb
@@ -1927,6 +1927,10 @@ package body Synth.Vhdl_Oper is
return Create_Value_Net (Edge, Res_Typ);
end;
when Iir_Predefined_Ieee_1164_Falling_Edge =>
+ if Hook_Std_Falling_Edge /= null then
+ return Create_Value_Memtyp
+ (Hook_Std_Falling_Edge.all (L, Res_Typ));
+ end if;
declare
Edge : Net;
begin
diff --git a/src/synth/synth-vhdl_oper.ads b/src/synth/synth-vhdl_oper.ads
index 975244022..30d32820f 100644
--- a/src/synth/synth-vhdl_oper.ads
+++ b/src/synth/synth-vhdl_oper.ads
@@ -48,4 +48,5 @@ package Synth.Vhdl_Oper is
function (Param : Valtyp; Res_Typ : Type_Acc) return Memtyp;
Hook_Std_Rising_Edge : Eval_Predefined_Acc;
+ Hook_Std_Falling_Edge : Eval_Predefined_Acc;
end Synth.Vhdl_Oper;