aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-09-29 18:18:46 +0200
committerTristan Gingold <tgingold@free.fr>2022-09-29 22:02:32 +0200
commit428287d19d4c3e1323fe209b5426e32f5fa0cb39 (patch)
tree590c60a8dfbfd2d8ffcf667dc54c649990a565bb /src/synth
parent9e29eca1eb46cb6d3fabe9ab458ba77610823612 (diff)
downloadghdl-428287d19d4c3e1323fe209b5426e32f5fa0cb39.tar.gz
ghdl-428287d19d4c3e1323fe209b5426e32f5fa0cb39.tar.bz2
ghdl-428287d19d4c3e1323fe209b5426e32f5fa0cb39.zip
simul: handle quiet attribute
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/elab-vhdl_decls.adb3
-rw-r--r--src/synth/synth-vhdl_expr.adb18
2 files changed, 16 insertions, 5 deletions
diff --git a/src/synth/elab-vhdl_decls.adb b/src/synth/elab-vhdl_decls.adb
index c1bac611a..bbcd00296 100644
--- a/src/synth/elab-vhdl_decls.adb
+++ b/src/synth/elab-vhdl_decls.adb
@@ -349,8 +349,7 @@ package body Elab.Vhdl_Decls is
when Iir_Kind_Terminal_Declaration =>
Elab_Terminal_Declaration (Syn_Inst, Decl);
when Iir_Kinds_Signal_Attribute =>
- -- Not supported by synthesis.
- null;
+ Elab_Implicit_Signal_Declaration (Syn_Inst, Decl);
when Iir_Kind_Disconnection_Specification =>
null;
diff --git a/src/synth/synth-vhdl_expr.adb b/src/synth/synth-vhdl_expr.adb
index 1970412b0..8677fe609 100644
--- a/src/synth/synth-vhdl_expr.adb
+++ b/src/synth/synth-vhdl_expr.adb
@@ -672,6 +672,7 @@ package body Synth.Vhdl_Expr is
| Iir_Kind_Variable_Declaration
| Iir_Kind_Interface_Variable_Declaration
| Iir_Kind_Signal_Declaration
+ | Iir_Kinds_Signal_Attribute
| Iir_Kind_Guard_Signal_Declaration
| Iir_Kind_Interface_Constant_Declaration
| Iir_Kind_Constant_Declaration
@@ -2056,6 +2057,20 @@ package body Synth.Vhdl_Expr is
end if;
return Res;
end;
+ when Iir_Kinds_Signal_Attribute =>
+ declare
+ Res : Valtyp;
+ begin
+ if Hook_Signal_Expr = null then
+ Error_Msg_Synth (Syn_Inst, Expr,
+ "signal attribute not supported");
+ Res := No_Valtyp;
+ else
+ Res := Synth_Name (Syn_Inst, Expr);
+ Res := Hook_Signal_Expr (Res);
+ end if;
+ return Res;
+ end;
when Iir_Kind_Reference_Name =>
-- Only used for anonymous signals in internal association.
return Synth_Expression_With_Type
@@ -2335,9 +2350,6 @@ package body Synth.Vhdl_Expr is
Acc := Allocate_By_Value (Acc_Typ, V);
return Create_Value_Access (Acc, Expr_Type);
end;
- when Iir_Kind_Stable_Attribute =>
- Error_Msg_Synth (Syn_Inst, Expr, "signal attribute not supported");
- return No_Valtyp;
when Iir_Kind_Psl_Prev =>
return Synth_Psl_Prev (Syn_Inst, Expr);
when Iir_Kind_Psl_Stable =>