|
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 12:12:12 09/01/2011
-- Design Name:
-- Module Name: TimeSequenceWithDSP - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity TimeSequenceWithDSP is
Port ( Addr : in STD_LOGIC_VECTOR (9 downto 1);
Data : inout STD_LOGIC_VECTOR (15 downto 0);
CSn : in STD_LOGIC;
RD_WRn : in STD_LOGIC;
RDn : in STD_LOGIC;
WRHn : in STD_LOGIC;
WRLn : in STD_LOGIC;
WAITn : out STD_LOGIC;
ena: out std_logic;
wea: out std_logic; -- interface with DRAM 0:read, 1:write
addra: out std_logic_vector(8 downto 0); -- interface with DRAM
dina: in std_logic_vector(15 downto 0);
douta: out std_logic_vector(15 downto 0)
);
end TimeSequenceWithDSP;
architecture Behavioral of TimeSequenceWithDSP is
begin
ena <= CSn;
addra(8 downto 0) <= Addr(9 downto 1);
wea <= (not RD_WRn);
process(RDn,WRLn,WRHn)begin
if(CSn = '0') then
if(RDn='1' and RDn' event) then
Data(15 downto 0) <= dina(15 downto 0);
else
if(WRLn='1' and WRLn' event) then
douta(7 downto 0) <= Data(7 downto 0);
end if;
if(WRHn='1' and WRHn' event) then
douta(15 downto 8) <= Data(15 downto 8);
end if;
end if;
else
Data(15 downto 0) <= (OTHERS => 'Z');
end if;
end process;
end Behavioral; |
|