From d3e614c9ca81107ed059e5ed393a326265392f41 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 18 Jan 2023 19:15:30 +0100 Subject: simul: handle PSL endpoints --- src/synth/synth-vhdl_expr.adb | 8 ++++++++ src/synth/synth-vhdl_expr.ads | 1 + 2 files changed, 9 insertions(+) (limited to 'src/synth') diff --git a/src/synth/synth-vhdl_expr.adb b/src/synth/synth-vhdl_expr.adb index d5a0e98fa..c4bd18868 100644 --- a/src/synth/synth-vhdl_expr.adb +++ b/src/synth/synth-vhdl_expr.adb @@ -812,6 +812,8 @@ package body Synth.Vhdl_Expr is Obj := Elab.Vhdl_Heap.Synth_Dereference (Acc); return Create_Value_Memtyp (Obj); end; + when Iir_Kind_Psl_Endpoint_Declaration => + return Synth_Expression (Syn_Inst, Name); when others => Error_Kind ("synth_name", Name); end case; @@ -2621,6 +2623,12 @@ package body Synth.Vhdl_Expr is end if; Error_Msg_Synth (Syn_Inst, Expr, "dot attribute not allowed"); return No_Valtyp; + when Iir_Kind_Psl_Endpoint_Declaration => + if Hook_Endpoint /= null then + return Hook_Endpoint (Syn_Inst, Expr); + end if; + Error_Msg_Synth (Syn_Inst, Expr, "endpoint read not allowed"); + return No_Valtyp; when others => Error_Kind ("synth_expression_with_type", Expr); end case; diff --git a/src/synth/synth-vhdl_expr.ads b/src/synth/synth-vhdl_expr.ads index 964c237f5..cdffd0f68 100644 --- a/src/synth/synth-vhdl_expr.ads +++ b/src/synth/synth-vhdl_expr.ads @@ -95,6 +95,7 @@ package Synth.Vhdl_Expr is Hook_Last_Event_Attribute : Hook_Attribute_Acc; Hook_Last_Active_Attribute : Hook_Attribute_Acc; Hook_Dot_Attribute : Hook_Attribute_Acc; + Hook_Endpoint : Hook_Attribute_Acc; -- Use base type of EXPR to synthesize EXPR. Useful when the type of -- EXPR is defined by itself or a range. -- cgit v1.2.3