aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/canon.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-01-10 06:51:02 +0100
committerTristan Gingold <tgingold@free.fr>2015-01-10 06:51:02 +0100
commit2c498db7b2702d3ad762c5a35c23bb41538331b7 (patch)
treebe271050334c14aed09c29a2d24750829a811430 /src/vhdl/canon.adb
parent91af32964eb22b8fe42551a1fa48c7637563fa55 (diff)
downloadghdl-2c498db7b2702d3ad762c5a35c23bb41538331b7.tar.gz
ghdl-2c498db7b2702d3ad762c5a35c23bb41538331b7.tar.bz2
ghdl-2c498db7b2702d3ad762c5a35c23bb41538331b7.zip
vhdl08: block configuration for if-generate statements.
Diffstat (limited to 'src/vhdl/canon.adb')
-rw-r--r--src/vhdl/canon.adb23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/vhdl/canon.adb b/src/vhdl/canon.adb
index f6d106182..c4fd69969 100644
--- a/src/vhdl/canon.adb
+++ b/src/vhdl/canon.adb
@@ -2470,6 +2470,11 @@ package body Canon is
Set_Prev_Block_Configuration
(El, Get_Generate_Block_Configuration (Sub_Blk));
Set_Generate_Block_Configuration (Sub_Blk, El);
+ when Iir_Kind_Parenthesis_Name =>
+ Sub_Blk := Get_Named_Entity (Sub_Blk);
+ Set_Prev_Block_Configuration
+ (El, Get_Generate_Block_Configuration (Sub_Blk));
+ Set_Generate_Block_Configuration (Sub_Blk, El);
when Iir_Kind_Generate_Statement_Body =>
Set_Generate_Block_Configuration (Sub_Blk, El);
when others =>
@@ -2547,13 +2552,19 @@ package body Canon is
end if;
when Iir_Kind_If_Generate_Statement =>
declare
- Bod : constant Iir := Get_Generate_Statement_Body (El);
- Blk_Config : constant Iir_Block_Configuration :=
- Get_Generate_Block_Configuration (Bod);
+ Clause : Iir;
+ Bod : Iir;
+ Blk_Config : Iir_Block_Configuration;
begin
- if Blk_Config = Null_Iir then
- Create_Default_Block_Configuration (Bod);
- end if;
+ Clause := El;
+ while Clause /= Null_Iir loop
+ Bod := Get_Generate_Statement_Body (Clause);
+ Blk_Config := Get_Generate_Block_Configuration (Bod);
+ if Blk_Config = Null_Iir then
+ Create_Default_Block_Configuration (Bod);
+ end if;
+ Clause := Get_Generate_Else_Clause (Clause);
+ end loop;
end;
when Iir_Kind_For_Generate_Statement =>
declare