Array en VHDL

azwaa

New member
Bonjour ;

J'aimerai savoir est ce qu'il y en a quelqu'un qui pourra m'aider .

Comment faire un tableau sous VHDL .???!

Merci d'avance .

Voici mon code :
Code:
library ieee; 
use ieee.std_logic_1164.all; 
use ieee.numeric_std.all; 

entity cdm is 
port ( 
         clk : in std_logic ; 
         rst : in std_logic  ; 
         data: in std_logic  ; 
         CD  : in  std_logic_vector(15 downto 0) ; 
         S   : out std_logic(3 downto 0 ); 
end entity ; 

architecture beh of cdm is 
        
        signal i      :integer range 0 to 3 ; 
        signal idata  :std_logic  ; 
        begin 
         code :process(clk,rst) 
               begin 
                    if(rst='1')then 
                        S<='0'; 
                        i<=0  ; 
                    idata<=data ; 
                    else 
                        if(clk'event and clk='1')then 
                            
                          type tab is array(3 downto 0)of std_logic_vector 
                               ???? 
                                ?? 

                           S<=not(CD(i) xor (idata)); 
                           i<= i+1 ; 
                           if i=3 then 
                                 idata<=data ; 
                            end if ; 
                          end if ; 
                       end if ; 
                  end process ; 
   end architecture ; 
 

Welcome to EDABoard.com

Sponsor

Back
Top