Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > External names vhdl2008

Reply
Thread Tools

External names vhdl2008

 
 
Pierre
Guest
Posts: n/a
 
      10-02-2009
I found that an alias could not not be used to shorten an external
names in VHDL 2008.
Instead I have to use a signal instead.See the small example below.
Any better idea ?

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;

ENTITY inv IS

PORT (
i : IN std_logic;
zn : BUFFER std_logic
);

END ENTITY inv;

ARCHITECTURE rtl OF inv IS
SIGNAL zb : std_logic;
BEGIN

zb <= NOT i;
zn <= NOT i;

END ARCHITECTURE rtl;
--
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY hinv IS

PORT (
i : IN std_logic;
zn : BUFFER std_logic
);

END ENTITY hinv;

ARCHITECTURE str OF hinv IS

COMPONENT inv IS

PORT (
i : IN std_logic;
zn : BUFFER std_logic
);

END COMPONENT inv;

alias xx is <<signal .u1.zb: std_logic>>;

BEGIN
u1: inv
PORT MAP (
i => i,
zn => zn
);

END ARCHITECTURE str;
--
ARCHITECTURE str1 OF hinv IS

COMPONENT inv IS

PORT (
i : IN std_logic;
zn : BUFFER std_logic
);

END COMPONENT inv;
SIGNAL xx : std_logic;
BEGIN
xx <= <<signal .u1.zb: std_logic>>;
u1: inv
PORT MAP (
i => i,
zn => zn
);

END ARCHITECTURE str1;
 
Reply With Quote
 
 
 
 
JimLewis
Guest
Posts: n/a
 
      10-02-2009
Pierre,
An alias to an external name has the class of the object
you have aliased to, so you first example should work.
Make sure to submit it as a bug to your vendor - even
if they already know about it, this helps them understand
that they need to prioritize it.

Your work around looks as good as any until your
vendor gets the VHDL-2008 feature working.

Best,
Jim
 
Reply With Quote
 
 
 
 
Pierre
Guest
Posts: n/a
 
      10-05-2009
On 2 oct, 20:35, JimLewis <(E-Mail Removed)> wrote:
> Pierre,
> An alias to an external name has the class of the object
> you have aliased to, so you first example should work.
> Make sure to submit it as a bug to your vendor - even
> if they already know about it, this helps them understand
> that they need to prioritize it.
>
> Your work around looks as good as any until your
> vendor gets the VHDL-2008 feature working.
>
> Best,
> Jim


Hi Jim,
Thanks for your answer.
I already submitted the issue.The test case was a bit more
complicated.
I got the following answer :


”You are trying to use an external name before the object exists. In
this case the alias to /tb/u2/zb occurs before the instance u2 is
elaborated because the alias occurs in the architecture declaration
region which is elaborated before any statements are done”.

When an external name is evaluated during elaboration, the target
object of the external name must already have been elaborated. A
common error is to declare, in a declarative region in which a design
hierarchy that will contain the target object of an external name, an
alias declaration that denotes the object denoted by the external
name. In the case of a relative pathname, this can be detected at
compile time; other cases such as an absolute path or a path that
contains up-scope reference(s) cannot be detected until run time.

# [DOC: IEEE Std 1076-2008 VHDL LRM - 8.7 External names]

# [DOC: IEEE Std 1076-2008 VHDL LRM - 14.4.1 Elaboration of
declarative part, General]

The alias is my opinion much better.And I dont see what would be more
difficult in the implementation between the workaround and the alias.



 
Reply With Quote
 
JimLewis
Guest
Posts: n/a
 
      10-08-2009
Pierre,
They are right about that. VHDL elaborates the design in the order
that items occur. So technically neither of the testcases you showed
should have worked.

It really depends on how you plan to use the signal XX. In your
testbench, you can declare the alias in a process or block statement
declarative region that follow the design instance.


I expect to use this feature in the stimulus generation portion of my
testbench. I do stimulus generation in a separate entity/
architecture. As a result, the only thing I need to do is make sure
the entity that is going to do the access is elaborated last.


Best,
Jim
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VHDL2008 & Modelsim HT-Lab VHDL 1 10-06-2010 08:31 PM
Precision and VHDL2008 HT-Lab VHDL 3 07-30-2010 10:28 AM
VHDL2008 generate syntax Tricky VHDL 1 03-19-2010 11:34 AM
vhdl2008: protected type mamu VHDL 0 02-03-2010 01:05 PM
Converting 'flat' gate level names to hierarchical names Paddy McCarthy VHDL 3 09-24-2004 05:34 PM



Advertisments