Hi all,
Finally, we decided to make something as simple as possible, and to compensate with the power of the NIOS II.
Is it possible to use only export signals? The data from my sensor would go into a register.
Then in the NIOS IDE, I would read registers (registre_ecriture) thanks to IORD.
How can I know the addresses of my registers?
<div class='quotetop'>QUOTE </div>
--- Quote Start ---
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;
entity juste_le_slave is
port (
--entrées externes
data : in std_logic_vector(7 downto 0); --export, data from the sensor
vsyn : in std_logic; --export
pclk : in std_logic; --export
href : in std_logic; --export
read : in std_logic; --avalon
readdata : out std_logic_vector(7 downto 0) --avalon
);
end;
architecture a of juste_le_slave is
signal registre_ecriture : std_logic_vector(7 downto 0);
signal registre_controle : std_logic_vector(7 downto 0); begin
process(pclk)
begin
if(pclk'event AND pclk='1' AND read='1') then
if (href='1') then
if (registre_controle="00000000") then
registre_controle<="11111111";
end if;
registre_ecriture<=data;
else if(vsyn='1') then
registre_controle<="00000000";
end if;
end if;
end if;
if (registre_controle="0000000") then readdata<=registre_controle;
else readdata<=registre_ecriture;
end if;
end process;
end a;[/b]
--- Quote End ---