source: PlatformSupport/Deprecated/pcores/linkport_v1_00_a/hdl/vhdl/rx_ff_ctrl.vhd

Last change on this file was 408, checked in by haijiang, 18 years ago
File size: 1.2 KB
Line 
1library ieee;
2use ieee.std_logic_1164.all;
3use ieee.std_logic_arith.all;
4use ieee.std_logic_unsigned.all;
5
6entity rx_ff_ctrl is
7    port (
8       
9        rx_en : in std_logic;
10        aur_rx_src_rdy_1  : in std_logic;
11        aur_rx_data  :in std_logic_vector(15 downto 0);
12        aur_rx_sof_1 :in std_logic;
13        aur_rx_eof_1:in std_logic;
14        rx_ff_wr  :out std_logic;
15        rx_ff_wdata :out std_logic_vector(17 downto 0);
16       
17        rx_ff_empty :in std_logic; 
18        rx_ff_rdata :in std_logic_vector(17 downto 0); 
19        rx_drdy :out std_logic;     
20        rx_first  :out std_logic;
21        rx_last  :out std_logic;   
22        rx_data : out std_logic_vector(15 downto 0);     
23        rx_ff_rd :out std_logic
24        );
25end rx_ff_ctrl;
26
27
28architecture rx_ff_ctrl_b1 of rx_ff_ctrl is
29    signal rx_drdy_2: std_logic;                             
30    signal rx_ff_rd_2:std_logic;
31   
32begin
33   
34    rx_drdy  <=     rx_drdy_2;
35   
36    rx_ff_wr <= (not aur_rx_src_rdy_1) and rx_en;
37   
38    rx_ff_wdata <= (not aur_rx_eof_1)&(not aur_rx_sof_1)&aur_rx_data;
39   
40    rx_ff_rd_2 <= (not rx_ff_empty) and rx_en;
41   
42    rx_data <= rx_ff_rdata(15 downto 0);               
43   
44   
45    rx_first <= rx_ff_rdata(16) and  rx_drdy_2;
46   
47    rx_last <= rx_ff_rdata(17) and  rx_drdy_2;
48   
49    rx_drdy_2 <= rx_ff_rd_2;
50   
51    rx_ff_rd <= rx_ff_rd_2;
52   
53end rx_ff_ctrl_b1;
54
Note: See TracBrowser for help on using the repository browser.