OpenCores
URL https://opencores.org/ocsvn/the_wizardry_project/the_wizardry_project/trunk

Subversion Repositories the_wizardry_project

[/] [the_wizardry_project/] [trunk/] [Wizardry/] [VHDL/] [Wizardry Top Level/] [Address Generation/] [NIDS Components/] [EmPAC/] [fifo_ppt.vhd] - Blame information for rev 19

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 mcwaccent
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer: 
4
-- 
5
-- Create Date:    15:46:53 03/07/2008 
6
-- Design Name: 
7
-- Module Name:    fifo_2_clock - Behavioral 
8
-- Project Name: 
9
-- Target Devices: 
10
-- Tool versions: 
11
-- Description: 
12
--
13
-- Dependencies: 
14
--
15
-- Revision: 
16
-- Revision 0.01 - File Created
17
-- Additional Comments: 
18
--
19
----------------------------------------------------------------------------------
20
library IEEE;
21
use IEEE.STD_LOGIC_1164.ALL;
22
use IEEE.STD_LOGIC_ARITH.ALL;
23
use IEEE.STD_LOGIC_UNSIGNED.ALL;
24
Library UNISIM;
25
use UNISIM.vcomponents.all;
26
---- Uncomment the following library declaration if instantiating
27
---- any Xilinx primitives in this code.
28
--library UNISIM;
29
--use UNISIM.VComponents.all;
30
 
31
entity fifo_ppt is
32
    Port ( reset : in  STD_LOGIC;
33
                          push_clock : in  STD_LOGIC;
34
           push : in  STD_LOGIC;
35
           fifo_data_in : in std_logic_vector(24 downto 0);
36
                          full : out  STD_LOGIC;
37
                          pop_clock : in  STD_LOGIC;
38
           pop : in  STD_LOGIC;
39
                          fifo_data_out : out std_logic_vector(24 downto 0);
40
           empty : out  STD_LOGIC;
41
                          fifo_push_count : out std_logic_vector(11 downto 0));
42
end fifo_ppt;
43
 
44
architecture Behavioral of fifo_ppt is
45
 
46
--constant MAX_FIFO_SIZE : INTEGER := 16;
47
--
48
--signal clk_div_s : std_logic := '0';
49
 
50
signal almostfull,almostempty : std_logic;
51
signal unconnected : std_logic_vector(31 downto 0);-- := X"00000000";
52
signal rdcount : std_logic_vector(11 downto 0);
53
signal wrcount : std_logic_vector(11 downto 0);
54
signal wrerr : std_logic;
55
signal rderr : std_logic;
56
signal reset_int : std_logic;
57
signal dop : std_logic_vector(3 downto 0);
58
signal data_in : std_logic_Vector(31 downto 0);
59
signal reset_s : std_logic;
60
begin
61
 
62
fifo_data_out <= unconnected(24 downto 0);
63
data_in <= "0000000" & fifo_data_in;
64
--process(phy_clock)
65
--begin
66
--      if rising_edge(phy_clock) then
67
--              clk_div_s <= not clk_div_s;
68
--      end if;
69
--end process; 
70
 
71
process(push_clock,reset)
72
begin
73
if(reset = '1') then
74
        reset_s <= '1';
75
elsif(push_clock'event and push_clock= '1') then
76
        reset_s <= '0';
77
end if;
78
end process;
79
 
80
--process(push_clock)
81
--  begin
82
--    if(push_clock'event and push_clock = '1') then
83
--      reset_s <= reset;
84
--    end if;
85
--  end process;
86
 
87
FIFO16_inst : FIFO16
88
   generic map (
89
      ALMOST_FULL_OFFSET => X"080",  -- Sets almost full threshold
90
      ALMOST_EMPTY_OFFSET => X"080", -- Sets the almost empty threshold
91
      DATA_WIDTH => 36, -- Sets data width to 4, 9, 18, or 36
92
      FIRST_WORD_FALL_THROUGH => FALSE) -- Sets the FIFO FWFT to TRUE or FALSE
93
   port map (
94
      ALMOSTEMPTY => ALMOSTEMPTY,   -- 1-bit almost empty output flag
95
      ALMOSTFULL => ALMOSTFULL,     -- 1-bit almost full output flag
96
      DO =>  unconnected,                    -- 32-bit data output
97
      DOP => DOP,                   -- 4-bit parity data output
98
      EMPTY => EMPTY,               -- 1-bit empty output flag
99
      FULL => FULL,                 -- 1-bit full output flag
100
      RDCOUNT => RDCOUNT,           -- 12-bit read count output
101
      RDERR => RDERR,               -- 1-bit read error output
102
      WRCOUNT => fifo_push_count,--WRCOUNT,           -- 12-bit write count output
103
      WRERR => WRERR,               -- 1-bit write error
104
      DI => data_in,                     -- 32-bit data input
105
      DIP => X"0",--DIP,                   -- 4-bit partity input
106
      RDCLK => pop_clock,               -- 1-bit read clock input
107
      RDEN => pop,                 -- 1-bit read enable input
108
      RST => reset_s, --reset,                   -- 1-bit reset input
109
      WRCLK => push_clock,               -- 1-bit write clock input
110
      WREN => push                  -- 1-bit write enable input
111
   );
112
--process(push_clock,reset)
113
--begin
114
--      if rising_edge(push_clock) then
115
--              if reset = '1' then
116
--                      reset_int <= '1';
117
--              else
118
--                      reset_int <= '0';
119
--              end if;
120
--      end if;
121
--end process;
122
 
123
end Behavioral;
124
 
125
 
126
 
127
--
128
--process(clk_div_s,reset)
129
--begin
130
--      if rising_edge(clk_div_s) then
131
--              reset_2 <= reset;
132
--      end if;
133
--end process;
134
--
135
--
136
--
137
--process(push,phy_clock,reset)
138
--begin
139
--      if rising_edge(phy_clock) then
140
--              if reset = '1' then
141
--                      push_count <= 0;
142
--              elsif push = '1' then
143
--                      push_count <= push_count + 1;
144
--              else
145
--                      push_count <= push_count;
146
--              end if;
147
--      end if;
148
--end process;
149
--
150
--process(pop,clk_div_s,reset)
151
--begin
152
--      if rising_Edge(clk_div_s) then
153
--              if reset_2 = '1' then
154
--                      pop_count <= 0;
155
--              elsif pop = '1' then
156
--                      pop_count <= pop_count + 1;
157
--              else
158
--                      pop_count <= pop_count;
159
--              end if;
160
--      end if;
161
--end process;
162
--
163
--full_s <= '1' when (push_count - pop_count) = MAX_FIFO_SIZE else '0';
164
--empty_s <= '1' when (push_count - pop_count) = 0;
165
--
166
--process(clk_div_s)
167
--begin
168
--      if rising_edge(clk_div_s) then
169
--              full <= full_s;
170
--      end if;
171
--end process;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.