Guest
hi all,
i got problem with my if statement. Here is my code
temp <= X"1A";
if ((X"1A" <= temp) and (X"1E" >= temp)) then
k <= X"002";
elsif ((X"1F" <= temp) and (X"23" >= temp)) then
k <= X"003";
elsif ((X"24" <= temp) and (X"28" >= temp)) then
k <= X"004";
else
k <= X"005";
end if;
then k is X"005", not like X"002" as I want. Is there anyone here can
explain why the result is like that? Do we have to notice anything with
if statement?
Thks
Kha
i got problem with my if statement. Here is my code
temp <= X"1A";
if ((X"1A" <= temp) and (X"1E" >= temp)) then
k <= X"002";
elsif ((X"1F" <= temp) and (X"23" >= temp)) then
k <= X"003";
elsif ((X"24" <= temp) and (X"28" >= temp)) then
k <= X"004";
else
k <= X"005";
end if;
then k is X"005", not like X"002" as I want. Is there anyone here can
explain why the result is like that? Do we have to notice anything with
if statement?
Thks
Kha