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

Subversion Repositories wdsp

[/] [wdsp/] [trunk/] [rtl/] [vhdl/] [WISHBONE_FFT/] [.vhd] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 parrado
 
2
-- hds header_start 
3
--1 stage shift register, data_width bits wide. 
4
 
5
LIBRARY ieee;
6
USE ieee.std_logic_1164.ALL;
7
USE ieee.std_logic_arith.ALL;
8
 
9
 
10
ENTITY shiftreg1 IS
11
   GENERIC(
12
   data_width : integer := 25
13
   );
14
    PORT(
15
      clock      : IN     std_logic;
16
                enable          : in std_logic;
17
                clear       : in std_logic;
18
      read_data  : OUT    std_logic_vector (data_width-1 DOWNTO 0);
19
      write_data : IN     std_logic_vector (data_width-1 DOWNTO 0);
20
      resetn     : IN     std_logic
21
   );
22
 
23
-- Declarations 
24
 
25
END shiftreg1 ;
26
 
27
-- hds interface_end 
28
ARCHITECTURE behavior OF shiftreg1 IS
29
--signal reg00 : std_logic_vector(data_width-1 downto 0); 
30
BEGIN
31
process(Clock,resetn)
32
begin
33
if (resetn='0') then
34
--      for                i in data_width-1 downto 0 loop 
35
--    r eg00(i)<='0'; 
36
     read_data <= (others => '0');
37
--     end loop;  
38
  elsif (Clock'event and Clock='1') then
39
 
40
          if (enable='1') then
41
 
42
                if(clear ='1') then
43
--    reg00<=write_data; 
44
--   read _data<=reg00; 
45
   read_data <= (others => '0');
46
 
47
        else
48
        read_data  <= write_data;
49
 
50
 
51
  end if;
52
  end if;
53
  end if;
54
end process;
55
END behavior;

powered by: WebSVN 2.1.0

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