Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > use alias in port declaration?

Reply
Thread Tools

use alias in port declaration?

 
 
Mike Dearman
Guest
Posts: n/a
 
      02-26-2009
I have the following vector in my design:

signal CONTROL_PINS : std_logic_vector(69 downto 0);

I want to connect certain bits of this vector to pins, and i want to
give them meaningfull names, for example i want a pin called "ABC"
connected to CONTROL_PINS(4)

the most obvious thing i can think of is to use an alias:

alias "ABC" is CONTROL_PINS(4);

but i can't use "ABC" in the port declaration as it then complains
about being declared twice.

Am i going about this the wrong way? Suggestions welcomed

Mike
 
Reply With Quote
 
 
 
 
JohnDuq JohnDuq is offline
Member
Join Date: Dec 2008
Posts: 88
 
      02-26-2009
Isn't the port already declared as CONTROL_PINS(4)? Thus the double declaration error.

Are you trying to access the port from the top level as ABC? It seems if you are accessing it that way then you wouldn't have the alias, but would have ABC connected to the component instantiation. Maybe a sample of your port declaration would help; the two declarations you have shown here look correct.

This may be useful:

www dot vdlande.com/VHDL/aliasdec.html
 
Reply With Quote
 
 
 
 
KJ
Guest
Posts: n/a
 
      02-26-2009
On Feb 26, 12:46*pm, Mike Dearman <(E-Mail Removed)> wrote:
> I have the following vector in my design:
>
> signal *CONTROL_PINS * * * * * * * * * *: std_logic_vector(69 downto 0);
>
> I want to connect certain bits of this vector to pins, and i want to
> give them meaningfull names, for example i want a pin called "ABC"
> connected to CONTROL_PINS(4)
>
> the most obvious thing i can think of is to use an alias:
>
> alias "ABC" is CONTROL_PINS(4);
>


Is there some reason why simply adding the following assignment in the
architecture is not acceptable?

ABC <= CONTROL_PINS(4);

It delays ABC by one simulation delta which can bite you if ABC is
then used as some form of clock downstream and the thing being sample
is not similarly delta delayed, but other than that...

KJ
 
Reply With Quote
 
Mike Dearman
Guest
Posts: n/a
 
      02-27-2009
On 26 Feb, 21:03, KJ <(E-Mail Removed)> wrote:
> On Feb 26, 12:46*pm, Mike Dearman <(E-Mail Removed)> wrote:
>
> > I have the following vector in my design:

>
> > signal *CONTROL_PINS * * * * * * * * * *: std_logic_vector(69 downto 0);

>
> > I want to connect certain bits of this vector to pins, and i want to
> > give them meaningfull names, for example i want a pin called "ABC"
> > connected to CONTROL_PINS(4)

>
> > the most obvious thing i can think of is to use an alias:

>
> > alias "ABC" is CONTROL_PINS(4);

>
> Is there some reason why simply adding the following assignment in the
> architecture is not acceptable?
>
> ABC <= CONTROL_PINS(4);
>
> It delays ABC by one simulation delta which can bite you if ABC is
> then used as some form of clock downstream and the thing being sample
> is not similarly delta delayed, but other than that...
>
> KJ


They're bi-directional signals and i understood <= is a directional
assignment?

sorry, i should have mentioned the bi-directional thing in the
original post.

Mike
 
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
reference/alias in perl vs reference/alias in C++ grocery_stocker C++ 9 05-24-2008 04:32 AM
XP X64 Pro, IE7, Delphi 2007, IntraWeb, MS Access, ODBC Alias problem: Insufficient memory for this operation. Alias: SomeDatabase. Skybuck Flying Windows 64bit 13 01-09-2008 07:34 PM
PIX 501 DNS Alias on interface for static IPs while port fowarding and DHCP? wonknose@gmail.com Cisco 3 04-29-2006 10:14 AM
How do i use ~/.alias within 'ipython -p pysh'? noman@cyclops.org Python 0 04-13-2006 02:46 PM
SQL Subquery and alias for datagrid use .Net Sports ASP .Net 2 07-07-2005 02:34 AM



Advertisments