Cours:Vhdl : Différence entre versions

De troyesGEII
Aller à : navigation, rechercher
(interface pour le bus avalon)
Ligne 4 : Ligne 4 :
 
==interface pour le bus avalon==
 
==interface pour le bus avalon==
  
 +
===hardware===
 
<source lang=vhd>
 
<source lang=vhd>
 
entity customPeriph is
 
entity customPeriph is
Ligne 17 : Ligne 18 :
 
     );
 
     );
 
end entity customPeriph;
 
end entity customPeriph;
 +
</source>
 +
 +
===software===
 +
 +
<source lang=cpp>
 +
IOWR(CUSTOM_0_BASE,regNumber,value);
 
</source>
 
</source>

Version du 5 novembre 2025 à 10:53

Nios 2

interface pour le bus avalon

hardware

entity customPeriph is
    port (
        clk         : in  std_logic;
        reset_n     : in  std_logic;
        address     : in  std_logic_vector(1 downto 0);
        write       : in  std_logic;
        read        : in  std_logic;
        chipselect  : in  std_logic;
        writedata   : in  std_logic_vector(31 downto 0);
        readdata    : out std_logic_vector(31 downto 0)
    );
end entity customPeriph;

software

IOWR(CUSTOM_0_BASE,regNumber,value);