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

Subversion Repositories spdif_interface

[/] [spdif_interface/] [trunk/] [rtl/] [vhdl/] [rx_package.vhd] - Blame information for rev 19

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

Line No. Rev Author Line
1 14 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 component package.                            ----
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 19 gedra
-- Revision 1.3  2004/06/10 18:57:36  gedra
49
-- Cleaned up lint warnings.
50
--
51 17 gedra
-- Revision 1.2  2004/06/09 19:24:50  gedra
52
-- Added dual port ram.
53
--
54 16 gedra
-- Revision 1.1  2004/06/07 18:06:00  gedra
55
-- Receiver component declarations.
56 14 gedra
--
57 16 gedra
--
58 14 gedra
 
59
library IEEE;
60
use IEEE.std_logic_1164.all;
61
 
62
package rx_package is
63
 
64
-- type declarations
65
  type bus_array is array (0 to 7) of std_logic_vector(31 downto 0);
66
 
67
-- components
68
  component rx_ver_reg
69
    generic (DATA_WIDTH: integer;
70
             ADDR_WIDTH: integer;
71
             CH_ST_CAPTURE: integer);
72
    port (
73
      ver_rd: in std_logic; -- version register read
74
      ver_dout: out std_logic_vector(DATA_WIDTH - 1 downto 0)); -- read data
75
  end component;
76
 
77
  component gen_control_reg
78
    generic (DATA_WIDTH: integer;
79
             -- note that this vector is (0 to xx), reverse order
80
             ACTIVE_BIT_MASK: std_logic_vector);
81
    port (
82
      clk: in std_logic;         -- clock  
83
      rst: in std_logic; -- reset
84
      ctrl_wr: in std_logic; -- control register write  
85
      ctrl_rd: in std_logic; -- control register read
86
      ctrl_din: in std_logic_vector(DATA_WIDTH - 1 downto 0);
87
      ctrl_dout: out std_logic_vector(DATA_WIDTH - 1 downto 0);
88
      ctrl_bits: out std_logic_vector(DATA_WIDTH - 1 downto 0));
89
  end component;
90
 
91
  component rx_status_reg
92
    generic (DATA_WIDTH: integer);
93
    port (
94
      status_rd: in std_logic;            -- status register read
95
      status_vector: in std_logic_vector(DATA_WIDTH - 1 downto 0);
96
      status_dout: out std_logic_vector(DATA_WIDTH - 1 downto 0));
97
  end component;
98
 
99
  component gen_event_reg
100
    generic (DATA_WIDTH: integer);
101
    port (
102
      clk: in std_logic;         -- clock  
103
      rst: in std_logic; -- reset
104
      evt_wr: in std_logic; -- event register write     
105
      evt_rd: in std_logic; -- event register read
106
      evt_din: in std_logic_vector(DATA_WIDTH - 1 downto 0); -- write data
107
      event: in std_logic_vector(DATA_WIDTH - 1 downto 0); -- event vector
108
      evt_mask: in std_logic_vector(DATA_WIDTH - 1 downto 0); -- irq mask
109
      evt_en: in std_logic;               -- irq enable
110
      evt_dout: out std_logic_vector(DATA_WIDTH - 1 downto 0); -- read data
111
      evt_irq: out std_logic); -- interrupt  request
112
  end component;
113
 
114
  component rx_cap_reg
115
    port (
116
      clk: in std_logic;                  -- clock
117
      rst: in std_logic; -- reset
118
      cap_ctrl_wr: in std_logic; -- control register write      
119
      cap_ctrl_rd: in std_logic; -- control register read
120
      cap_data_rd: in std_logic;          -- data register read
121
      cap_din: in std_logic_vector(31 downto 0); -- write data
122
      frame_rst: in std_logic; -- start of frame signal
123
      ch_data: in std_logic;  -- channel status/user data
124
      ud_a_en: in std_logic;            -- user data ch. A enable
125
      ud_b_en: in std_logic;              -- user data ch. B enable
126
      cs_a_en: in std_logic;              -- channel status ch. A enable
127
      cs_b_en: in std_logic;              -- channel status ch. B enable
128
      cap_dout: out std_logic_vector(31 downto 0); -- read data
129
      cap_evt: out std_logic);             -- capture event (interrupt)
130
  end component;
131
 
132
  component rx_phase_det
133 19 gedra
    generic (WISHBONE_FREQ: natural := 33);   -- WishBone frequency in MHz
134 14 gedra
    port (
135
      wb_clk_i: in std_logic;
136
      rxen: in std_logic;
137
      spdif: in std_logic;
138
      lock: out std_logic;
139
      rx_data: out std_logic;
140
      rx_data_en: out std_logic;
141
      rx_block_start: out std_logic;
142
      rx_frame_start: out std_logic;
143
      rx_channel_a: out std_logic;
144
      rx_error: out std_logic;
145
      ud_a_en: out std_logic;              -- user data ch. A enable
146
      ud_b_en: out std_logic;              -- user data ch. B enable
147
      cs_a_en: out std_logic;              -- channel status ch. A enable
148
      cs_b_en: out std_logic);             -- channel status ch. B enable);            
149
  end component;
150 16 gedra
 
151
  component dpram
152
    generic (DATA_WIDTH: positive;
153 17 gedra
             RAM_WIDTH: positive);
154 16 gedra
    port (
155
      clk: in std_logic;
156
      rst: in std_logic; -- reset is optional, not used here
157
      din: in std_logic_vector(DATA_WIDTH - 1 downto 0);
158
      wr_en: in std_logic;
159
      rd_en: in std_logic;
160 17 gedra
      wr_addr: in std_logic_vector(RAM_WIDTH - 1 downto 0);
161
      rd_addr: in std_logic_vector(RAM_WIDTH - 1 downto 0);
162 16 gedra
      dout: out std_logic_vector(DATA_WIDTH - 1 downto 0));
163 19 gedra
  end component;
164
 
165
  component rx_decode
166
    generic (DATA_WIDTH: integer range 16 to 32;
167
             ADDR_WIDTH: integer range 8 to 64);
168
    port (
169
      wb_clk_i: in std_logic;
170
      conf_rxen: in std_logic;
171
      conf_sample: in std_logic;
172
      conf_valid: in std_logic;
173
      conf_mode: in std_logic_vector(3 downto 0);
174
      conf_blken: in std_logic;
175
      conf_valen: in std_logic;
176
      conf_useren: in std_logic;
177
      conf_staten: in std_logic;
178
      conf_paren: in std_logic;
179
      lock: in std_logic;
180
      rx_data: in std_logic;
181
      rx_data_en: in std_logic;
182
      rx_block_start: in std_logic;
183
      rx_frame_start: in std_logic;
184
      rx_channel_a: in std_logic;
185
      wr_en: out std_logic;
186
      wr_addr: out std_logic_vector(ADDR_WIDTH - 2 downto 0);
187
      wr_data: out std_logic_vector(DATA_WIDTH downto 0);
188
      stat_paritya: out std_logic;
189
      stat_parityb: out std_logic;
190
      stat_lsbf: out std_logic;
191
      stat_hsbf: out std_logic);
192
  end component;
193 14 gedra
 
194
end rx_package;

powered by: WebSVN 2.1.0

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