Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - use alias in port declaration?

 
Thread Tools Search this Thread
Old 02-26-2009, 05:46 PM   #1
Default use alias in port declaration?


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


Mike Dearman
  Reply With Quote
Old 02-26-2009, 06:26 PM   #2
JohnDuq
Member
 
Join Date: Dec 2008
Posts: 83
Default
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


JohnDuq
JohnDuq is offline   Reply With Quote
Old 02-26-2009, 09:03 PM   #3
KJ
 
Posts: n/a
Default Re: use alias in port declaration?
On Feb 26, 12:46*pm, Mike Dearman <m...@michaeldearman.com> 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


KJ
  Reply With Quote
Old 02-27-2009, 08:48 AM   #4
Mike Dearman
 
Posts: n/a
Default Re: use alias in port declaration?
On 26 Feb, 21:03, KJ <kkjenni...@sbcglobal.net> wrote:
> On Feb 26, 12:46*pm, Mike Dearman <m...@michaeldearman.com> 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


Mike Dearman
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
error: ISO C++ forbids declaration of ‘vector’ with no type samsneelam Software 0 08-28-2008 11:20 AM
MI-3 - Katie Holmes look-a-like !!! Plus ALIAS type Script E_Machine DVD Video 1 05-20-2006 07:07 PM
DVD Verdict reviews: ALIAS: THE COMPLETE THIRD SEASON and more! DVD Verdict DVD Video 0 12-08-2004 10:12 AM
Alias vs. West Wing and ER - COMPLETE FIRST SEASON solipsistic@earthlink.net DVD Video 3 01-01-2004 11:57 PM
Alias vs. Buffy/Angel packaging Melquiades DVD Video 12 09-05-2003 05:42 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46