VHDL Error

M

Matt North

Hi,

Has anyone come across these error before;

line 273: Error, no support for non-constant parameter for attribute POS.
line 691: Error, left bound of range does not evaluate to a constant.
line 692: Error, left bound of range does not evaluate to a constant.
line 276: Error, function ASCII_conv can terminate without a return
statement.

the part of the code which is causing the error is;

process(en_int, rst, info, address)
begin
if rst='0' or int_res='0' then
address<=1;
pdata<=(others=>'0');
elsif rising_edge(en_int) then
if address<=strsize then
pdata<=ascii_conv(info(address)); --function which holds the
attribute POS.
address<=address+1;
end if;
end if;
end process;

However when address was a loop identifier in a procedure which called the
function ascii_conv in the same way as above, no errors occurred.
The function is shown below;

result:=to_bitvector(std_logic_vector(to_unsigned(character'POS(ch), 8)));

Thanks,
Matt
 

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

Similar Threads

code vhdl 1
pls help me ; vhdl; 0
VHDL program error 2
Implementation a SVM ( SVPWM) in FPGA with VHDL 0
Vhdl Vga Controller Problem 3
RNG in VHDL 0
problem executing testbench. error in coding 1
VHDL help. 4

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top