diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-10-10 06:56:14 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-10-10 06:56:14 +0200 |
commit | 26005c0d7a24b0b436625bbe7c7e869bf8f5079e (patch) | |
tree | ddf3e736250b6352ad67f2b7788b55c9c8dc3f2c | |
parent | bb790acedf54d4f6d9194a89b8481cf3b0d3106b (diff) | |
download | ghdl-26005c0d7a24b0b436625bbe7c7e869bf8f5079e.tar.gz ghdl-26005c0d7a24b0b436625bbe7c7e869bf8f5079e.tar.bz2 ghdl-26005c0d7a24b0b436625bbe7c7e869bf8f5079e.zip |
avhpi_get_base_name: return the label for if/for generate.
Fix issue #158
-rw-r--r-- | src/grt/grt-avhpi.adb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/grt/grt-avhpi.adb b/src/grt/grt-avhpi.adb index 1777f54cf..a83be7cc6 100644 --- a/src/grt/grt-avhpi.adb +++ b/src/grt/grt-avhpi.adb @@ -563,10 +563,18 @@ package body Grt.Avhpi is | VhpiArchBodyK | VhpiEntityDeclK | VhpiProcessStmtK - | VhpiBlockStmtK - | VhpiIfGenerateK - | VhpiForGenerateK => + | VhpiBlockStmtK => return To_Ghdl_Rtin_Block_Acc (Obj.Ctxt.Block).Name; + when VhpiIfGenerateK + | VhpiForGenerateK => + declare + -- The context is a generate body. + Gen : constant Ghdl_Rtin_Block_Acc := + To_Ghdl_Rtin_Block_Acc (Obj.Ctxt.Block); + begin + -- Get the name of the if/for/case generate. + return To_Ghdl_Rtin_Generate_Acc (Gen.Parent).Name; + end; when VhpiRootInstK => declare Blk : Ghdl_Rtin_Block_Acc; |