diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-01-18 19:15:30 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-01-18 19:15:30 +0100 |
commit | d3e614c9ca81107ed059e5ed393a326265392f41 (patch) | |
tree | 73d8cfc8154bb4a262fe2890eabe951217a32fa2 /src/synth | |
parent | de7fe2bf3f78a2753809b4533fcc8575892fa000 (diff) | |
download | ghdl-d3e614c9ca81107ed059e5ed393a326265392f41.tar.gz ghdl-d3e614c9ca81107ed059e5ed393a326265392f41.tar.bz2 ghdl-d3e614c9ca81107ed059e5ed393a326265392f41.zip |
simul: handle PSL endpoints
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/synth-vhdl_expr.adb | 8 | ||||
-rw-r--r-- | src/synth/synth-vhdl_expr.ads | 1 |
2 files changed, 9 insertions, 0 deletions
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. |