aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-prints.adb
diff options
context:
space:
mode:
authortmeissner <programming@goodcleanfun.de>2020-06-06 13:29:57 +0200
committertgingold <tgingold@users.noreply.github.com>2020-06-06 16:49:30 +0200
commit2416376cabc3dd03413a5038ce59ccfab569414c (patch)
treef36d87d5cbce058f8f1f36104582d07746c79c25 /src/vhdl/vhdl-prints.adb
parent350f710818732d7e3c2d1c56d50b503bf07ac024 (diff)
downloadghdl-2416376cabc3dd03413a5038ce59ccfab569414c.tar.gz
ghdl-2416376cabc3dd03413a5038ce59ccfab569414c.tar.bz2
ghdl-2416376cabc3dd03413a5038ce59ccfab569414c.zip
Synthesis of PSL built-in rose() function.
Diffstat (limited to 'src/vhdl/vhdl-prints.adb')
-rw-r--r--src/vhdl/vhdl-prints.adb17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-prints.adb b/src/vhdl/vhdl-prints.adb
index a0163a63d..60da5bef2 100644
--- a/src/vhdl/vhdl-prints.adb
+++ b/src/vhdl/vhdl-prints.adb
@@ -2303,6 +2303,21 @@ package body Vhdl.Prints is
Disp_Token (Ctxt, Tok_Right_Paren);
end Disp_Psl_Stable;
+ procedure Disp_Psl_Rose (Ctxt : in out Ctxt_Class; Call : Iir)
+ is
+ Expr : Iir;
+ begin
+ Disp_Token (Ctxt, Tok_Rose);
+ Disp_Token (Ctxt, Tok_Left_Paren);
+ Print (Ctxt, Get_Expression (Call));
+ Expr := Get_Clock_Expression (Call);
+ if Expr /= Null_Iir then
+ Disp_Token (Ctxt, Tok_Comma);
+ Print (Ctxt, Expr);
+ end if;
+ Disp_Token (Ctxt, Tok_Right_Paren);
+ end Disp_Psl_Rose;
+
procedure Disp_Psl_Declaration (Ctxt : in out Ctxt_Class; Stmt : Iir)
is
Decl : constant PSL_Node := Get_Psl_Declaration (Stmt);
@@ -4768,6 +4783,8 @@ package body Vhdl.Prints is
Disp_Psl_Prev (Ctxt, Expr);
when Iir_Kind_Psl_Stable =>
Disp_Psl_Stable (Ctxt, Expr);
+ when Iir_Kind_Psl_Rose =>
+ Disp_Psl_Rose (Ctxt, Expr);
when Iir_Kinds_Type_And_Subtype_Definition =>
Disp_Type (Ctxt, Expr);