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

Reply

VHDL - MAX+plus II error:Can't interpret indexed name

 
Thread Tools Search this Thread
Old 08-24-2004, 01:37 PM   #1
Default MAX+plus II error:Can't interpret indexed name


Hi all, I am trying to implement a simple sram in VHDL in MAX+plus II and I
get a message error:"Can't interpret indexed name", the line with the
errors is on stars...Generally there is a problem with Max plus, I can't
complile any memory when I use conv_integer or the conversion below....Can
anyone help?????


library ieee ;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;


entity sram is
port(chip_enable : in bit;
output_enable : in bit;
address : in bit_vector (3 downto 0);
data : out std_logic_vector (3 downto 0));
end sram;

architecture behaviour of sram is
constant sram_size : Integer := 15;
type sram_mem is array (0 to sram_size) of std_logic_vector (0 to
3);
signal memory : sram_mem;

begin
get_data : process(address)
begin
if (chip_enable = '0' and output_enable = '0') then
-- get data from selected address
*********data <= memory(address);**************This is the line with
the error*************
else
data <= (others => 'Z');
end if;
end process;
end behaviour;




Aliki
  Reply With Quote
Old 08-24-2004, 03:26 PM   #2
Ralf Hildebrandt
 
Posts: n/a
Default Re: MAX+plus II error:Can't interpret indexed name
Aliki wrote:

> Hi all, I am trying to implement a simple sram in VHDL in MAX+plus II and I
> get a message error:"Can't interpret indexed name", the line with the
> errors is on stars...Generally there is a problem with Max plus, I can't
> complile any memory when I use conv_integer or the conversion below....Can
> anyone help?????


> use ieee.std_logic_arith.all;
> use ieee.std_logic_unsigned.all;


Do you really need them - both? These are not standard libraries. use
ieee.numeric_std.all instead.


> constant sram_size : Integer := 15;
> type sram_mem is array (0 to sram_size) of std_logic_vector (0 to
> 3);
> signal memory : sram_mem;




> begin
> get_data : process(address)


Would'nt it be better to have chip_enable and output_enable in the
sensitivity list?


> *********data <= memory(address);**************This is the line with
> the error*************


data is std_logic_vector (3 downto 0) and
one line of sram_mem is std_logic_vector (0 to 3)
Are you shure that you need opposite index directions?


Furthermore address has to be converted to integer, because indices are
of type integer. I guess this is the point where your compiler
complains. Think about the libraries, if you get trouble during conversions.


Ralf


Ralf Hildebrandt
  Reply With Quote
Old 08-25-2004, 02:39 AM   #3
Mike Treseler
 
Posts: n/a
Default Re: MAX+plus II error:Can't interpret indexed name
Aliki wrote:

> Hi all, I am trying to implement a simple sram in VHDL in MAX+plus II and


Consider using quartus.
Related threads:
http://groups.google.com/groups?q=vhdl+dpram512x1
http://groups.google.com/groups?q=vhdl+ram_32k

-- Mike Treseler




Mike Treseler
  Reply With Quote
Old 09-24-2004, 03:50 AM   #4
LostAtC
 
Posts: n/a
Default Re: MAX+plus II error:Can't interpret indexed name
Try changing the line to:

data <= memory(conv_integer(address));

The index must be an integer and you've declared the address as a bit
vector.


On Tue, 24 Aug 2004 08:37:46 -0400, "Aliki" <aliki@> wrote:

>Hi all, I am trying to implement a simple sram in VHDL in MAX+plus II and I
>get a message error:"Can't interpret indexed name", the line with the
>errors is on stars...Generally there is a problem with Max plus, I can't
>complile any memory when I use conv_integer or the conversion below....Can
>anyone help?????
>
>
>library ieee ;
>use ieee.std_logic_1164.all;
>use ieee.std_logic_arith.all;
>use ieee.std_logic_unsigned.all;
>
>
>entity sram is
> port(chip_enable : in bit;
> output_enable : in bit;
> address : in bit_vector (3 downto 0);
> data : out std_logic_vector (3 downto 0));
>end sram;
>
>architecture behaviour of sram is
> constant sram_size : Integer := 15;
> type sram_mem is array (0 to sram_size) of std_logic_vector (0 to
>3);
> signal memory : sram_mem;
>
>begin
> get_data : process(address)
> begin
> if (chip_enable = '0' and output_enable = '0') then
> -- get data from selected address
> *********data <= memory(address);**************This is the line with
>the error*************
> else
> data <= (others => 'Z');
> end if;
> end process;
>end behaviour;
>




LostAtC
  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




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