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

Отправлено Maksim 28 февраля 2002 г. 14:43

Где и как надо объявить компонент, т.е. его надо описать в отдельном файле и указать этот файл в проекте через "library" и "use"? Как это сделать? А то WebPACK под файлом зажигает иконочку с вопросом и названием компонента FDCE.


library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

---
entity cpld is
Port (
. .. . . . . . . . .. . . . . . . . .. . . . . . .. .
);
end cpld;

architecture RTL1 of cpld is
component FDCE <- объявление компонента
Port(C, CE, CLR, D: in std_logic; Q: out std_logic);
end component;
signal int_rst :std_logic;
signal LOW_ADR, P_IN, D_ST :std_logic_vector(7 downto 0);
signal SEL, PAGE, SEL_A, OE_A, CE_FL, RESERV_OUT: std_logic;
signal MA, AC :std_logic_vector(18 downto 0);
constant CONST_MX: STD_LOGIC_VECTOR (7 downto 0) := "11110000";
-----------------------------------------------------------------
begin
-- A: ----------Fix Low address CPU---------------------
latch_adr:process (ALE)
begin
if ALE='1' then LOW_ADR <= P0_C;
end if;
end process latch_adr;
--end A:
--B: -----------Decoder address---------------------------
decode_adr:process (RD,WR)
begin
if (P2_C="10000000") then
case LOW_ADR is
when "10000100" => SEL <= '1';
when "10001000" => PAGE <= '1';
when "10000010" => SEL_A <= '1';
when "10000001" => OE_A <= '1';
when "10000011" => CE_FL <= '1';
when others => NULL;
end case;
end if;
end process decode_adr;
--end B:

--C: 2 to 1 multiplexer data CPU port
muxd:process (SEL)
begin
if (SEL = '0') then P_IN <= DFL;
else P_IN <= D_ST;
end if;
end process muxd;
-- end C:

-- D: Data path for write data in FLASH memory
write_flash:process (ALE, WR)
begin
if ((ALE = '1') and (WR = '0')) then DFL <= P0_C;
else DFL <= "ZZZZZZZZ";
end if;
end process write_flash;
-- end D:

read_cpu: process (RD)
begin
if (RD = '0') then P0_C <= P_IN;
else P0_C <= "ZZZZZZZZ";
end if;
end process read_cpu;
-- *************************** Flip-Flop ***********************************
CE_FLASH_FF: FDCE
Port Map ( C=>WR, CE=>CE_FL, CLR=>int_rst, D=>P0_C(0), Q=>D_ST(4) );
SEL_ADR_MX: FDCE
Port Map ( C=>WR, CE=>SEL_A, CLR=>int_rst, D=>P0_C(0), Q=>D_ST(3) );
ADR_EN_OE: FDCE
Port Map ( C=>WR, CE=>OE_A, CLR=>int_rst, D=>P0_C(0), Q=>D_ST(2) );
RESERV_D: FDCE
Port Map ( C=>WR, CE=>OE_A, CLR=>int_rst, D=>P0_C(1), Q=>RESERV_OUT );
-- *************************************************************************
D_ST <= CONST_MX;
int_rst <= RST_PCI;
RST_PCI_INV <= int_rst;
RESERV <= RESERV_OUT;
end RTL1;
--------------



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

Ответы


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

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

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

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

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


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

E-mail: info@telesys.ru