![]() |
|
|
|
#1 |
|
The newbie is back!
Why can't I do this: type table_array IS ARRAY (0 to 16) of STD_LOGIC_VECTOR(11 downto 0); signal table: table_array; .... FOR i in 1 to table'RANGE loop .... Shannon Shannon |
|
|
|
|
#2 |
|
Posts: n/a
|
"Shannon" <> wrote in message news: ups.com... > The newbie is back! > > Why can't I do this: > > type table_array IS ARRAY (0 to 16) of STD_LOGIC_VECTOR(11 downto 0); > signal table: table_array; > ... > > FOR i in 1 to table'RANGE loop > ... Because the correct syntax is... FOR i in table'RANGE loop KJ KJ |
|
|
|
#3 |
|
Posts: n/a
|
On Sep 1, 5:15 pm, "KJ" <kkjenni...@sbcglobal.net> wrote:
> "Shannon" <sgo...@sbcglobal.net> wrote in message > > news: ups.com...> The newbie is back! > > > Why can't I do this: > > > type table_array IS ARRAY (0 to 16) of STD_LOGIC_VECTOR(11 downto 0); > > signal table: table_array; > > ... > > > FOR i in 1 to table'RANGE loop > > ... > > Because the correct syntax is... > FOR i in table'RANGE loop > KJ Almost. An allowed syntax is: FOR i in 1 to 10 Loop Correct? if table'range = 10 then why couldn't I say FOR i in 1 to table'range Loop ? Shannon |
|
|
|
#4 |
|
Posts: n/a
|
On Sun, 02 Sep 2007 02:36:33 -0000, Shannon <>
wrote: >On Sep 1, 5:15 pm, "KJ" <kkjenni...@sbcglobal.net> wrote: >> "Shannon" <sgo...@sbcglobal.net> wrote in message >> >> news: ups.com...> The newbie is back! >> >> > Why can't I do this: >> >> > type table_array IS ARRAY (0 to 16) of STD_LOGIC_VECTOR(11 downto 0); >> > signal table: table_array; >> > ... >> >> > FOR i in 1 to table'RANGE loop >> > ... >> >> Because the correct syntax is... >> FOR i in table'RANGE loop >> KJ > >Almost. > >An allowed syntax is: > >FOR i in 1 to 10 Loop > >Correct? Good so far. >if table'range = 10 then why couldn't I say No. table'range isn't "10". It is a range 1 to 10. It includes both the left and right limits, and the direction (to or downto). Regards, Allan Allan Herriman |
|
|
|
#5 |
|
Posts: n/a
|
On Sep 1, 9:05 pm, Allan Herriman <allanherri...@hotmail.com> wrote:
> On Sun, 02 Sep 2007 02:36:33 -0000, Shannon <sgo...@sbcglobal.net> > wrote: > > > > >On Sep 1, 5:15 pm, "KJ" <kkjenni...@sbcglobal.net> wrote: > >> "Shannon" <sgo...@sbcglobal.net> wrote in message > > >>news: roups.com...> The newbie is back! > > >> > Why can't I do this: > > >> > type table_array IS ARRAY (0 to 16) of STD_LOGIC_VECTOR(11 downto 0); > >> > signal table: table_array; > >> > ... > > >> > FOR i in 1 to table'RANGE loop > >> > ... > > >> Because the correct syntax is... > >> FOR i in table'RANGE loop > >> KJ > > >Almost. > > >An allowed syntax is: > > >FOR i in 1 to 10 Loop > > >Correct? > > Good so far. > > >if table'range = 10 then why couldn't I say > > No. table'range isn't "10". It is a range 1 to 10. It includes both > the left and right limits, and the direction (to or downto). > > Regards, > Allan Darn! You were too fast for me Allan. I feel so dumb. I thought RANGE meant "max". I'll just use 'right or 'high. duh...I feel silly. In my defense I'm trying to code and take care of my two year old and 11 month old kids at the same time...It has an effect on your concentration. Shannon Shannon |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using session attribute in tomcat | rg_yazdani | Software | 2 | 11-11-2008 12:39 PM |
| Dynamically added TreeNode Control not render my custom attribute | venkyzealous | Software | 0 | 05-10-2008 03:46 PM |
| <customErrors> tag should have its "mode" attribute set to "Off". | jasari | Software | 4 | 04-04-2007 08:31 AM |
| Open Range DVD Review @ GENRE ONLINE.NET! | Writer R5 | DVD Video | 0 | 02-07-2004 03:55 AM |
| TheDigitalReview: OPEN RANGE - DVD REVIEW | Mike McGee | DVD Video | 0 | 02-07-2004 12:30 AM |