From 99443212bf78a5d36b693abab225a160a92d097a Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 7 Jan 2015 08:07:42 +0100 Subject: Handle vhdl08 if generate statements --- src/grt/grt-avhpi.adb | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'src/grt/grt-avhpi.adb') diff --git a/src/grt/grt-avhpi.adb b/src/grt/grt-avhpi.adb index f6c5c4138..1b8e5aa76 100644 --- a/src/grt/grt-avhpi.adb +++ b/src/grt/grt-avhpi.adb @@ -297,20 +297,13 @@ package body Grt.Avhpi is Error := AvhpiErrorOk; return; when Ghdl_Rtik_If_Generate => - declare - Gen : constant Ghdl_Rtin_Generate_Acc := - To_Ghdl_Rtin_Generate_Acc (Ch); - begin - Res := (Kind => VhpiIfGenerateK, - Ctxt => (Base => To_Addr_Acc (Iterator.Ctxt.Base - + Gen.Loc).all, - Block => Gen.Child)); - -- Return only if the condition is true. - if Res.Ctxt.Base /= Null_Address then - Error := AvhpiErrorOk; - return; - end if; - end; + Res := (Kind => VhpiIfGenerateK, + Ctxt => Get_If_Generate_Child (Iterator.Ctxt, Ch)); + -- Return only if the condition is true. + if Res.Ctxt.Base /= Null_Address then + Error := AvhpiErrorOk; + return; + end if; when Ghdl_Rtik_For_Generate => declare Gen : constant Ghdl_Rtin_Generate_Acc := -- cgit v1.2.3