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

Subversion Repositories i2s_interface

[/] [i2s_interface/] [trunk/] [rtl/] [vhdl/] [i2s_version.vhd] - Blame information for rev 27

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 gedra
----------------------------------------------------------------------
2
----                                                              ----
3
---- WISHBONE I2S Interface IP Core                               ----
4
----                                                              ----
5
---- This file is part of the I2S Interface project               ----
6
---- http://www.opencores.org/cores/i2s_interface/                ----
7
----                                                              ----
8
---- Description                                                  ----
9
---- I2S transmitter/receiver version register.                   ----
10
----                                                              ----
11
----                                                              ----
12
---- To Do:                                                       ----
13
---- -                                                            ----
14
----                                                              ----
15
---- Author(s):                                                   ----
16
---- - Geir Drange, gedra@opencores.org                           ----
17
----                                                              ----
18
----------------------------------------------------------------------
19
----                                                              ----
20
---- Copyright (C) 2004 Authors and OPENCORES.ORG                 ----
21
----                                                              ----
22
---- This source file may be used and distributed without         ----
23
---- restriction provided that this copyright statement is not    ----
24
---- removed from the file and that any derivative work contains  ----
25
---- the original copyright notice and the associated disclaimer. ----
26
----                                                              ----
27
---- This source file is free software; you can redistribute it   ----
28
---- and/or modify it under the terms of the GNU General          ----
29
---- Public License as published by the Free Software Foundation; ----
30
---- either version 2.0 of the License, or (at your option) any   ----
31
---- later version.                                               ----
32
----                                                              ----
33
---- This source is distributed in the hope that it will be       ----
34
---- useful, but WITHOUT ANY WARRANTY; without even the implied   ----
35
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ----
36 18 gedra
---- PURPOSE. See the GNU General Public License for more details.----
37 6 gedra
----                                                              ----
38
---- You should have received a copy of the GNU General           ----
39
---- Public License along with this source; if not, download it   ----
40
---- from http://www.gnu.org/licenses/gpl.txt                     ----
41
----                                                              ----
42
----------------------------------------------------------------------
43
--
44
-- CVS Revision History
45
--
46
-- $Log: not supported by cvs2svn $
47 24 gedra
-- Revision 1.2  2004/08/06 18:55:43  gedra
48
-- De-linting.
49
--
50 18 gedra
-- Revision 1.1  2004/08/03 18:49:03  gedra
51
-- Version register.
52 6 gedra
--
53
--
54 18 gedra
--
55 6 gedra
 
56
library ieee;
57 24 gedra
use ieee.std_logic_1164.all;
58 6 gedra
use ieee.numeric_std.all;
59
 
60 24 gedra
entity i2s_version is
61
   generic (DATA_WIDTH : integer;
62
            ADDR_WIDTH : integer;
63
            IS_MASTER  : integer);
64
   port (
65
      ver_rd   : in  std_logic;         -- version register read
66
      ver_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0));  -- reg. contents
67 6 gedra
end i2s_version;
68
 
69
architecture rtl of i2s_version is
70
 
71 24 gedra
   signal version : std_logic_vector(DATA_WIDTH - 1 downto 0);
72 6 gedra
 
73
begin
74 24 gedra
   ver_dout <= version when ver_rd = '1' else (others => '0');
75 6 gedra
 
76 24 gedra
   -- version vector generation
77
   version(3 downto 0) <= "0001";       -- version 1
78
   G32 : if DATA_WIDTH = 32 generate
79
      version(4)            <= '1';
80
      version(31 downto 16) <= (others => '0');
81
   end generate G32;
82
   G16 : if DATA_WIDTH = 16 generate
83
      version(4) <= '0';
84
   end generate G16;
85
   version(15 downto 13) <= (others => '0');
86
   version(12 downto 6)  <= std_logic_vector(to_unsigned(ADDR_WIDTH, 7));
87
   version(5)            <= '1' when IS_MASTER = 1 else '0';
88
 
89 6 gedra
end rtl;

powered by: WebSVN 2.1.0

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