implementation de code RLE sur carte FPGA
Publié : 16 août 2006 11:37
salut ,
s'il ya qq qui peut m'aider à corriger certains erreurs dans ce programme du code RLE en VHDL:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity RLE is
Port ( RLEclk : in STD_LOGIC;
RLEreset : in STD_LOGIC;
RLEin : in STD_LOGIC_VECTOR(15 downto 0);
RLEout : out STD_LOGIC_VECTOR(31 downto 0));
end RLE;
architecture architecture_RLE of RLE is
signal i: INTEGER;
signal j: INTEGER;
signal count: INTEGER;
begin
run:process(RLEclk)
begin
if(rising_edge(RLEclk))then
wait on i > 15;
i <= 1;
count <= 1;
for j IN i+1 TO 15 LOOP
if(RLEin(i)=RLEin(j))then
count <= count + 1;
else exit;end if;
if(count>1)then
RLEout <= RLEin(i)& "<" & count & ">"; ---- les erreurs sont a ce niveau
else RLEout <= RLEin(i);end ifend LOOP; ---- les erreurs sont a ce niveau
i <= i + count;
end if;
end process;
end architecture_RLE;
--------------------------------------------------------------------------------------------
je veux connaitre comment faire la conversion d'un nombre en une chaine de caracteres
et merci
s'il ya qq qui peut m'aider à corriger certains erreurs dans ce programme du code RLE en VHDL:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity RLE is
Port ( RLEclk : in STD_LOGIC;
RLEreset : in STD_LOGIC;
RLEin : in STD_LOGIC_VECTOR(15 downto 0);
RLEout : out STD_LOGIC_VECTOR(31 downto 0));
end RLE;
architecture architecture_RLE of RLE is
signal i: INTEGER;
signal j: INTEGER;
signal count: INTEGER;
begin
run:process(RLEclk)
begin
if(rising_edge(RLEclk))then
wait on i > 15;
i <= 1;
count <= 1;
for j IN i+1 TO 15 LOOP
if(RLEin(i)=RLEin(j))then
count <= count + 1;
else exit;end if;
if(count>1)then
RLEout <= RLEin(i)& "<" & count & ">"; ---- les erreurs sont a ce niveau
else RLEout <= RLEin(i);end ifend LOOP; ---- les erreurs sont a ce niveau
i <= i + count;
end if;
end process;
end architecture_RLE;
--------------------------------------------------------------------------------------------
je veux connaitre comment faire la conversion d'un nombre en une chaine de caracteres
et merci