instruction VHDL
Répondre à la discussion
Affichage des résultats 1 à 3 sur 3

instruction VHDL



  1. #1
    invite1af3caff

    Question instruction VHDL


    ------

    bonjour tout le monde.

    j'ai devant moi un code VHDL d'une RAM, je ne comprends pas certaines instruction du langage , voici le code :

    entity daul_port_ram is
    generic (data_width : natural := 8;
    addr_width : natural := 16);
    port ( clk_in : in std_logic;
    clk_out : in std_logic;
    we : in std_logic;
    addr_in : in std_logic_vector( addr_width - 1 downto 0);
    addr_out : in std_logic_vector( addr_width - 1 downto 0);
    data_in : in std_logic_vector( data_width - 1 downto 0);
    data_out : out std_logic_vector( data_width - 1 downto 0)
    );
    end daul_port_ram;

    architecture daul_port_ram_arch of daul_port_ram is

    type mem_type is array (2** addr_width downto 0) of std_logic_vector( data_width - 1 downto 0) ;
    signal mem : mem_type ;

    begin

    mem_write : process (clk_in)
    begin
    if clk_in'event and clk_in = '1' then
    if (we = '1') then
    mem( conv_integer( addr_in)) <= data_in ;
    end if ;
    end if ;
    end process write ;

    mem_read : process (clk_out)
    begin
    if clk_out'event and clk_out = '1' then
    data_out <= mem( conv_integer( addr_out)) ;
    end if ;
    end process read;

    end daul_port_ram_arch;


    les ligne de code indiquées en rouge sont celle que je n'arrive pas à comprendre, j'ai beaucoup cherché sur internet mais je ne trouve pas le jeu d'instruction du VHDL.

    merci d'avance les amis.

    -----

  2. #2
    kronanberg

    Re : instruction VHDL

    Salut !!!

    Voila d'après mes quelques connaissances en VHDL j'aurai décris ces lignes comme ça :

    Code:
    generic (data_width : natural := 8; addr_width : natural := 16);
    Le generic te permet de définir des constantes propre à l'entité.


    Code:
    type mem_type is array (2** addr_width downto 0) of std_logic_vector( data_width - 1 downto 0) ;
    declare un tableau à 2 dimension : Chaque adresse (sur 16 bits) pointra sur une ligne de données(sur 8 bits)


    Code:
    mem( conv_integer( addr_in)) <= data_in ;
    tu remplis la données d'entrée à l'adresse addr_in


    Code:
    data_out <= mem( conv_integer( addr_out)) ;
    Tu écris la data de sortie présente à l'adresse "addr_out" sur le vecteur data_out


    Voila c tout ce que je dire sur ces lignes de codes !!!


    a+

  3. #3
    jiherve

    Re : instruction VHDL

    Bonsoir,
    kronanberg +1!
    Pour le VHDL voir là:
    http://www.vhdl-online.de/tutorial/englisch/inhalt.htm.
    JR
    l'électronique c'est pas du vaudou!

Discussions similaires

  1. convertir une instruction de verilog en vhdl
    Par invite8c6f844d dans le forum Électronique
    Réponses: 6
    Dernier message: 26/07/2009, 22h56
  2. L’instruction « INCF »
    Par NEOROBOT dans le forum Électronique
    Réponses: 9
    Dernier message: 19/11/2008, 22h41
  3. Point flottant en VHDL et vhdl-200x
    Par invite6eee6b27 dans le forum Logiciel - Software - Open Source
    Réponses: 0
    Dernier message: 02/09/2008, 19h47
  4. instruction langage
    Par invite669721b7 dans le forum Électronique
    Réponses: 12
    Dernier message: 08/02/2008, 20h46
  5. instruction bizarre
    Par marc.suisse dans le forum Logiciel - Software - Open Source
    Réponses: 3
    Dernier message: 28/03/2007, 19h03
Découvrez nos comparatifs produits sur l'informatique et les technologies.