1 ----------------------------------------------------------------------------------
13 ----------------------------------------------------------------------------------
15 use IEEE.STD_LOGIC_1164.
ALL;
21 -- Uncomment the following library declaration if using
22 -- arithmetic functions with Signed or Unsigned values
25 -- Uncomment the following library declaration if instantiating
26 -- any Xilinx primitives in this code.
28 --use UNISIM.VComponents.all;
41 set_mem_ctr_o :
in ); --set
signal (active high)
42 --(after sync to respective domains)
47 -- signal set_r_clk_i : std_logic;
48 -- signal set_rr_clk_i : std_logic;
49 -- signal set_rrr_clk_i : std_logic;
52 -- signal set_rr_clk_i_r_clk_o : std_logic;
57 -- help timing closure
58 -- in respective clock domains
60 signal ctr_i : (2 downto 0);
--input side counter
61 signal ctr_o : (2 downto 0);
--output side counter
68 signal wea : (0 DOWNTO 0);
83 wea :
IN (
0 DOWNTO 0);
84 addra :
IN (
2 DOWNTO 0);
85 dina :
IN (numbits
-1 DOWNTO 0);
89 addrb :
IN (
2 DOWNTO 0);
90 doutb :
OUT (numbits
-1 DOWNTO 0));
99 set_mem_ctr_i_r<=set_mem_ctr_i;
107 set_mem_ctr_o_r<=set_mem_ctr_o;
113 begin -- process i_ctr_proc
119 ctr_i<=to_unsigned(0,3);
126 begin -- process i_ctr_proc
132 --thing does not meet timing
137 ctr_o<=to_unsigned(6,3);
149 --dina<=DATA_in when ena='1' else (others => '0');
block_mem block_mem_iblock_mem_i
set_mem_ctr_i_del_procclk_i_dom
unsigned (2 downto 0) ctr_i
set_mem_ctr_o_del_procclk_o_dom
STD_LOGIC_VECTOR (2 downto 0) addra
in DATA_instd_logic_vector (numbits - 1 downto 0)
STD_LOGIC_VECTOR (2 downto 0) addrb
unsigned (2 downto 0) ctr_o_next
unsigned (2 downto 0) ctr_o
STD_LOGIC_VECTOR (0 downto 0) wea
unsigned (2 downto 0) ctr_i_next
STD_LOGIC_VECTOR (numbits - 1 downto 0) doutb
out DATA_outstd_logic_vector (numbits - 1 downto 0)
numbitsinteger :=TX_fifo_indata_length
std_logic set_mem_ctr_o_r
STD_LOGIC_VECTOR (numbits - 1 downto 0) dina
std_logic set_mem_ctr_i_r