Крюк 0 10 июля, 2005 Опубликовано 10 июля, 2005 · Жалоба Эта конструкция синтезируется в распределённую память: library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity dsramd is port ( wclk : in std_logic; we : in std_logic; wradr : in std_logic_vector (3 downto 0); rdadr : in std_logic_vector (3 downto 0); di : in std_logic_vector (7 downto 0); wq : out std_logic_vector(7 downto 0); rq : out std_logic_vector(7 downto 0) ); end dsramd; architecture syn of dsramd is type ram_type is array (15 downto 0) of std_logic_vector (7 downto 0); signal RAM : ram_type; begin process (wclk) begin if (wclk'event and wclk = '1') then if (we = '1') then RAM(conv_integer(wradr)) <= di; end if; end if; end process; wq <= RAM(conv_integer(wradr)); rq <= RAM(conv_integer(rdadr)); end syn; Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
MAZZI 1 12 июля, 2005 Опубликовано 12 июля, 2005 · Жалоба 4 aem: Спасибо за пример, только к чему он? О другом речь. Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться