Find help , emergencies,please.

A

ariesxyg

hi all:
when i finish this , i got a problem like
"Unsupported feature error: non locally static bounds are not
supported"
my code is
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity ram is
generic ( k: integer :=8;
w: integer :=4);
port ( rd, wr, cs : in std_logic;
adr: in std_logic_vector(w-1 downto 0);
din: in std_logic_vector(k-1 downto 0);
dout:eek:ut std_logic_vector(k-1 downto 0));
end ram;

architecture behav of ram is
--constant a : integer := 4;
subtype word is std_logic_vector(k-1 downto 0);
type memory is array (0 to 2 ** w-1) of word;
signal sram : memory;
signal adr_in : integer;
begin
adr_in <= conv_integer(adr);

write : process (wr, cs, adr_in, din, rd)
begin
if wr = '0' then
if cs = '0' and rd = '1' then sram(adr_in) <= din;
end if;
end if;
end process;

read : process(rd, cs, adr_in, wr)
begin
if(rd = '0' and cs = '0' and wr = '1') then dout <= sram(adr_in);
else dout <= "ZZZZZZZZ";
end if;
end process;
end behav;
 
R

Ralf Hildebrandt

when i finish this , i got a problem like
"Unsupported feature error: non locally static bounds are not
supported"

It would be helpful to provide the exact error message, that name of the
tool, that reported it and the pointer to the source code line, where
the error message points to (the line number).

Ralf
 
A

ariesxyg

the error is the line
"type memory is array (0 to 2 ** w-1) of word;"
i use max+pluse2, and the device is altera flex10k.
 
R

Ralf Hildebrandt

the error is the line
"type memory is array (0 to 2 ** w-1) of word;"

Hmm ... strange.
i use max+pluse2, and the device is altera flex10k.

With MaxPlus+ I had some trouble during the last weeks. (This crappy
thing does not even know std_ulogic!)

What happens, if you define the array bounds with fixed values? I guess,
that the tool may no see, that the generic parameters are locally static.
If this "solves" the problem use your actual design, try to synthesize
and define the values of the generic parameters externally. - Let the
tool "override" the values of the parameters.

Ralf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,796
Messages
2,569,645
Members
45,367
Latest member
Monarch

Latest Threads

Top