Jansi Meena
Junior Member level 1
Please help me, I have got this file, which they say it converts little to big endian. One module I have gives data in (0 to 33) and another module has (33 downto 0) data type. I've been told that the below code will do the convesion
When I simulate by feedin
ARRAY_IN <= x"000000001";
I still get ARRAY_OUT <= x"000000001" the same as in Input, but I expect x"100000000" (is this right?)
But when I see the bit order, it has changed, but the simulation shows same as input. Why is it reading like this?
Please help. I use ISIM, Xilinx
---------- Post added at 14:50 ---------- Previous post was at 14:45 ----------
Will the reading order make such issue?. If so, how it shouldbe read?.
Also, dowto is little endian? and vice versa?
Code:
entity le_2_be is
port (
ARRAY_IN : in std_logic_vector(0 to 33));
ARRAY_OUT : out std_logic_vector(33 downto 0)
);
end le_2_be;
architecture le_2_be_arch of le_2_be is
begin
LE_2_BE_PROC: process(ARRAY_IN)
begin
for i in 0 to 33 loop
ARRAY_OUT(i) <= ARRAY_IN(33-i);
end loop;
end process;
end le_2_be_arch;
ARRAY_IN <= x"000000001";
I still get ARRAY_OUT <= x"000000001" the same as in Input, but I expect x"100000000" (is this right?)
But when I see the bit order, it has changed, but the simulation shows same as input. Why is it reading like this?
Please help. I use ISIM, Xilinx
---------- Post added at 14:50 ---------- Previous post was at 14:45 ----------
Will the reading order make such issue?. If so, how it shouldbe read?.
Also, dowto is little endian? and vice versa?