[an error occurred while processing this directive]
Помогите с PCI
(«Телесистемы»: Конференция «Программируемые логические схемы и их применение»)

миниатюрный аудио-видеорекордер mAVR

Отправлено Recipe 15 августа 2002 г. 13:40

Пытаюсь записать в память по 0 регистру, вывожу на светодиоды. Данные записываются но потом светодиоды начинают моргать, хотя я болше не чего не пишу. В чем ошибка?


library IEEE;
use IEEE.std_logic_1164.all;
-- pragma translate_off
library unisim;
use unisim.all;
-- pragma translate_on

entity test_ram is
port (
RESET : in std_logic;
CLK : in std_logic;
ADR : in std_logic_vector(31 downto 0);
ADi : in std_logic_vector(31 downto 0);
ADo : out std_logic_vector(31 downto 0);
HIT : in std_logic;
BEn : in std_logic_vector(3 downto 0);
RD : in std_logic;
WE : in std_logic;
DRDY : out std_logic;
);
end test_ram;

architecture RTL of test_ram is

component RAM32X1S is -- Distributed RAM
generic (
TimingChecksOn :boolean:= FALSE;
xon:boolean:= FALSE);
port (
D : in std_logic;
WE : in std_logic;
WCLK : in std_logic;
A0 : in std_logic;
A1 : in std_logic;
A2 : in std_logic;
A3 : in std_logic;
A4 : in std_logic;
O : out std_logic);
end component RAM32X1S;

component OBUF
port (I: in std_logic;
O: out std_logic);
end component;

constant Zero_32 : std_logic_vector(31 downto 0):= "00000000000000000000000000000000";
constant Zero_16 : std_logic_vector(15 downto 0):= "0000000000000000";
constant HI_Z_32 : std_logic_vector(31 downto 0):= "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ";

signal DO : std_logic_vector(31 downto 0);
signal RD_EN, WE_EN, Mem_area, W,E : std_logic;


begin
-- Memory map area(BAR0): 8Mb bytes, e.t. Adress(22:0)
-- ADR(6:2)adressing D_MEM word, ADR(22:7) must be zeros
Mem_area <= '1' when ADR(22 downto 7)=X"00_00" else '0';
WE_EN <= '1' when WE='1' and HIT='1' and Mem_area='1' else '0';
RD_EN <= '1' when RD='1' and HIT='1' and Mem_area='1' else '0';

process(RESET, CLK)
variable ram : integer;
begin
if RESET='1' then
DRDY <= '0';
elsif (CLK'event and CLK = '1') then
DRDY <= HIT and Mem_area; -- 1-takt delay for RAM read
end if;
end process;

-- Distributed Memory block (32x32b RAM)
Distr_Mem_inst: for I in 0 to 31 generate
D_MEM:RAM32X1S
port map(
D => ADi(I),
WE => WE_EN,
WCLK => CLK,
A0 => ADR(2),
A1 => ADR(3),
A2 => ADR(4),
A3 => ADR(5),
A4 => ADR(6),
O => DO(I));
end generate;
buf_ado : ADo <= Do when RD_EN='1' else Hi_Z_32;

end RTL;

Составить ответ  |||  Конференция  |||  Архив

Ответы


Отправка ответа

Имя (обязательно): 
Пароль: 
E-mail: 

Тема (обязательно):
Сообщение:

Ссылка на URL: 
Название ссылки: 

URL изображения: 


Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru