![]() |
|
|
|||||||
![]() |
VHDL - use alias in port declaration? |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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 |
|
|
|
|
#2 |
|
Member
Join Date: Dec 2008
Posts: 83
|
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 |
|
|
|
|
|
#3 |
|
Posts: n/a
|
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 |
|
|
|
#4 |
|
Posts: n/a
|
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 |
|
![]() |
| Thread Tools | Search this Thread |
|
|
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 |