diff options
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/synth-expr.adb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index 6f8317831..7c2dba7c5 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -1927,6 +1927,37 @@ package body Synth.Expr is end Synth_Psl_Stable; + function Synth_Psl_Rose (Syn_Inst : Synth_Instance_Acc; Call : Node) + return Valtyp + is + Ctxt : constant Context_Acc := Get_Build (Syn_Inst); + DffCurr : Net; + Dff : Net; + NotDff : Net; + Clk_Net : Net; + Expr : Valtyp; + Res : Net; + begin + Expr := Synth_Expression (Syn_Inst, Get_Expression (Call)); + + Clk_Net := Synth_Psl_Function_Clock(Syn_Inst, Call, Ctxt); + + DffCurr := Get_Net (Ctxt, Expr); + Set_Location (DffCurr, Call); + Dff := Build_Dff (Ctxt, Clk_Net, DffCurr); + Set_Location (Dff, Call); + + NotDff := Build_Monadic (Ctxt, Id_Not, Dff); + Set_Location (NotDff, Call); + + Res := Build_Dyadic (Ctxt, Id_And, + NotDff, DffCurr); + Set_Location (Res, Call); + + return Create_Value_Net (Res, Boolean_Type); + + end Synth_Psl_Rose; + subtype And_Or_Module_Id is Module_Id range Id_And .. Id_Or; function Synth_Short_Circuit (Syn_Inst : Synth_Instance_Acc; @@ -2269,6 +2300,8 @@ package body Synth.Expr is return Synth_Psl_Prev (Syn_Inst, Expr); when Iir_Kind_Psl_Stable => return Synth_Psl_Stable (Syn_Inst, Expr); + when Iir_Kind_Psl_Rose => + return Synth_Psl_Rose(Syn_Inst, Expr); when Iir_Kind_Overflow_Literal => Error_Msg_Synth (+Expr, "out of bound expression"); return No_Valtyp; |