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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [src/] [register_bank.vhd] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 eejlny
--This library is free software; you can redistribute it and/or
2
--modify it under the terms of the GNU Lesser General Public
3
--License as published by the Free Software Foundation; either
4
--version 2.1 of the License, or (at your option) any later version.
5
 
6
--This library is distributed in the hope that it will be useful,
7
--but WITHOUT ANY WARRANTY; without even the implied warranty of
8
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9
--Lesser General Public License for more details.
10
 
11
--You should have received a copy of the GNU Lesser General Public
12
--License along with this library; if not, write to the Free Software
13
--Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
14
 
15
-- e_mail : j.l.nunez-yanez@byacom.co.uk
16
 
17
library IEEE;
18
use IEEE.std_logic_1164.all;
19
use IEEE.numeric_std.all;
20
 
21
entity register_bank is
22
    port (
23
        ADDR: in STD_LOGIC_VECTOR (7 downto 0);
24
        RW: in STD_LOGIC;
25
        CLK: in STD_LOGIC;
26
        RESET: in STD_LOGIC;
27
        O_PUT: inout STD_LOGIC_VECTOR(255 downto 0)
28
    );
29
end register_bank;
30
 
31
architecture register_bank_arch of register_bank is
32
 
33
 
34
 
35
signal temp_out: BIT_VECTOR (255 downto 0);
36
constant one: BIT_VECTOR := "1";
37
 
38
begin
39
  process (ADDR,CLK,RESET,RW)
40
      variable addresses: integer;
41
        variable ADDR_AUX : unsigned(7 downto 0);
42
        begin
43
        ADDR_AUX := unsigned(ADDR);
44
        addresses := To_integer(ADDR_AUX);
45
      if (RESET='1') then
46
          temp_out <= "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
47
      elsif (CLK'event and CLK='1') then
48
          if RW='0' then
49
             temp_out<=temp_out;
50
          else
51
                 temp_out(addresses)<='1';
52
          end if;
53
      end if;
54
      O_PUT <= TO_X01Z(temp_out);
55
end process;
56
end register_bank_arch;

powered by: WebSVN 2.1.0

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