AMBPEX5_v20_SX50T_CORE
|
00001 --------------------------------------------------------------------------------------------------- 00002 -- 00003 -- Title : ctrl_adsp_v2_decode_data_we 00004 -- Author : Dmitry Smekhov, Ilya Ivanov 00005 -- Company : Instrumental System 00006 -- 00007 -- Version : 1.1 00008 --------------------------------------------------------------------------------------------------- 00009 -- 00010 -- Description : Модуль декодирования сигналов записи в тетраду для Virtex2 00011 -- 00012 --------------------------------------------------------------------------------------------------- 00013 -- 00014 -- Version 1.1 17.06.2005 00015 -- Удалены атрибуты RLOC и компоненты FMAP 00016 -- 00017 --------------------------------------------------------------------------------------------------- 00018 00019 00020 library IEEE; 00021 use IEEE.STD_LOGIC_1164.all; 00022 use ieee.std_logic_arith.all; 00023 00024 -- synopsys translate_off 00025 library ieee; 00026 use ieee.vital_timing.all; 00027 -- synopsys translate_on 00028 00029 library unisim; 00030 use unisim.VCOMPONENTS.all; 00031 00032 00033 entity ctrl_adsp_v2_decode_data_we is 00034 generic( 00035 trd : in integer; -- номер тетрады 00036 reg : in integer -- номер регистра 00037 -- 0 - STATUS 00038 -- 1 - DATA 00039 -- 2 - CMD_ADR 00040 -- 3 - CMD_DATA 00041 ); 00042 port ( 00043 reset : in std_logic; -- 0 - сброс 00044 clk : in std_logic; -- тактовая частота 00045 adr : in std_logic_vector( 4 downto 0 ); -- шина адреса 00046 wr : in std_logic; -- 0 - запись данных 00047 data_we : out std_logic -- 1 - запись данных 00048 ); 00049 end ctrl_adsp_v2_decode_data_we; 00050 00051 00052 architecture ctrl_adsp_v2_decode_data_we of ctrl_adsp_v2_decode_data_we is 00053 00054 signal cs0 : std_logic; -- 1 - совпадение номера тетрады 00055 signal cs1 : std_logic; -- 0 - чтение данных 00056 00057 component fmap is 00058 port( 00059 i1, i2, i3, i4 : in std_logic; 00060 o : in std_logic 00061 ); 00062 end component; 00063 00064 --attribute rloc : string; 00065 --attribute rloc of fmap : component is "X0Y0"; 00066 --attribute rloc of xd : label is "X0Y0"; 00067 00068 begin 00069 00070 00071 cs0 <='1' when adr( 4 downto 2 )=conv_std_logic_vector( trd, 3 ) else '0'; 00072 cs1 <='1' when adr( 1 downto 0 )=conv_std_logic_vector( reg, 2 ) 00073 and wr='0' and cs0='1' 00074 else '0' after 1 ns; 00075 00076 00077 --xcs0: fmap port map( o=>cs0, i1=>adr(2), i2=>adr(3), i3=>adr(4), i4=>'0' ); 00078 --xcs1: fmap port map( o=>cs1, i1=>cs0, i2=>wr, i3=>adr(0), i4=>adr(1) ); 00079 xd: fd port map( q =>data_we, c =>clk , d =>cs1 ); 00080 00081 00082 end ctrl_adsp_v2_decode_data_we; 00083