aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-stmts.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-05 07:47:58 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-05 07:47:58 +0200
commit5404c1d47c102e61d84903021bd6c509356c1e91 (patch)
tree20674466a0ea86b1881af09bb946698205eaa6c8 /src/synth/synth-stmts.adb
parent2229c2b97868887a2d5dc8c423a4cfb3f2ec15ac (diff)
downloadghdl-5404c1d47c102e61d84903021bd6c509356c1e91.tar.gz
ghdl-5404c1d47c102e61d84903021bd6c509356c1e91.tar.bz2
ghdl-5404c1d47c102e61d84903021bd6c509356c1e91.zip
synth: minimal support for blocks. Fix #965
Diffstat (limited to 'src/synth/synth-stmts.adb')
-rw-r--r--src/synth/synth-stmts.adb17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb
index d4eecead1..9c84e5de6 100644
--- a/src/synth/synth-stmts.adb
+++ b/src/synth/synth-stmts.adb
@@ -1997,6 +1997,21 @@ package body Synth.Stmts is
Set_Location (Inst, Get_Location (Stmt));
end Synth_Concurrent_Assertion_Statement;
+ procedure Synth_Block_Statement (Syn_Inst : Synth_Instance_Acc; Blk : Node)
+ is
+ begin
+ -- No support for guard or header.
+ if Get_Block_Header (Blk) /= Null_Node
+ or else Get_Guard_Decl (Blk) /= Null_Node
+ then
+ raise Internal_Error;
+ end if;
+
+ Synth_Declarations (Syn_Inst, Get_Declaration_Chain (Blk));
+ Synth_Concurrent_Statements
+ (Syn_Inst, Get_Concurrent_Statement_Chain (Blk));
+ end Synth_Block_Statement;
+
function Synth_PSL_Expression
(Syn_Inst : Synth_Instance_Acc; Expr : PSL.Types.PSL_Node) return Net
is
@@ -2388,6 +2403,8 @@ package body Synth.Stmts is
Synth_Design_Instantiation_Statement (Syn_Inst, Stmt);
end if;
Pop_And_Merge_Phi (Build_Context, Stmt);
+ when Iir_Kind_Block_Statement =>
+ Synth_Block_Statement (Syn_Inst, Stmt);
when Iir_Kind_Psl_Default_Clock =>
null;
when Iir_Kind_Psl_Restrict_Directive =>