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

Subversion Repositories spdif_interface

[/] [spdif_interface/] [trunk/] [rtl/] [vhdl/] [rx_ver_reg.vhd] - Blame information for rev 73

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 7 gedra
----------------------------------------------------------------------
2
----                                                              ----
3
---- WISHBONE SPDIF IP Core                                       ----
4
----                                                              ----
5
---- This file is part of the SPDIF project                       ----
6
---- http://www.opencores.org/cores/spdif_interface/              ----
7
----                                                              ----
8
---- Description                                                  ----
9
---- SPDIF receiver RxVersion 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 Lesser General   ----
29
---- Public License as published by the Free Software Foundation; ----
30
---- either version 2.1 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
---- PURPOSE. See the GNU Lesser General Public License for more  ----
37
---- details.                                                     ----
38
----                                                              ----
39
---- You should have received a copy of the GNU Lesser General    ----
40
---- Public License along with this source; if not, download it   ----
41
---- from http://www.opencores.org/lgpl.shtml                     ----
42
----                                                              ----
43
----------------------------------------------------------------------
44
--
45
-- CVS Revision History
46
--
47
-- $Log: not supported by cvs2svn $
48 72 gedra
-- Revision 1.3  2004/06/26 14:14:47  gedra
49
-- Converted to numeric_std and fixed a few bugs.
50
--
51 37 gedra
-- Revision 1.2  2004/06/04 15:55:07  gedra
52
-- Cleaned up lint warnings.
53
--
54 8 gedra
-- Revision 1.1  2004/06/03 17:51:41  gedra
55
-- Receiver version register.
56 7 gedra
--
57 8 gedra
--
58 7 gedra
 
59 37 gedra
library ieee;
60 72 gedra
use ieee.std_logic_1164.all;
61 37 gedra
use ieee.numeric_std.all;
62 7 gedra
 
63 72 gedra
entity rx_ver_reg is
64
   generic (DATA_WIDTH    : integer;
65
            ADDR_WIDTH    : integer;
66
            CH_ST_CAPTURE : integer);
67
   port (
68
      ver_rd   : in  std_logic;         -- version register read
69
      ver_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0));  -- read data
70 7 gedra
end rx_ver_reg;
71
 
72
architecture rtl of rx_ver_reg is
73
 
74 72 gedra
   signal version : std_logic_vector(DATA_WIDTH - 1 downto 0);
75 7 gedra
 
76
begin
77 72 gedra
   ver_dout <= version when ver_rd = '1' else (others => '0');
78 7 gedra
 
79 72 gedra
   -- version vector generation
80
   version(3 downto 0) <= "0001";       -- version 1
81
   G32 : if DATA_WIDTH = 32 generate
82
      version(4)            <= '1';
83
      version(31 downto 20) <= (others => '0');
84
      version(19 downto 16) <=
85
         std_logic_vector(to_unsigned(CH_ST_CAPTURE, 4));
86
   end generate G32;
87
   G16 : if DATA_WIDTH = 16 generate
88
      version(4) <= '0';
89
   end generate G16;
90
   version(11 downto 5)  <= std_logic_vector(to_unsigned(ADDR_WIDTH, 7));
91
   version(15 downto 12) <= (others => '0');
92
 
93 7 gedra
end rtl;

powered by: WebSVN 2.1.0

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