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 16

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 16 gedra
-- Revision 1.1  2004/06/07 18:06:00  gedra
49
-- Receiver component declarations.
50 14 gedra
--
51 16 gedra
--
52 14 gedra
 
53
library IEEE;
54
use IEEE.std_logic_1164.all;
55
 
56
package rx_package is
57
 
58
-- type declarations
59
  type bus_array is array (0 to 7) of std_logic_vector(31 downto 0);
60
 
61
-- components
62
  component rx_ver_reg
63
    generic (DATA_WIDTH: integer;
64
             ADDR_WIDTH: integer;
65
             CH_ST_CAPTURE: integer);
66
    port (
67
      ver_rd: in std_logic; -- version register read
68
      ver_dout: out std_logic_vector(DATA_WIDTH - 1 downto 0)); -- read data
69
  end component;
70
 
71
  component gen_control_reg
72
    generic (DATA_WIDTH: integer;
73
             -- note that this vector is (0 to xx), reverse order
74
             ACTIVE_BIT_MASK: std_logic_vector);
75
    port (
76
      clk: in std_logic;         -- clock  
77
      rst: in std_logic; -- reset
78
      ctrl_wr: in std_logic; -- control register write  
79
      ctrl_rd: in std_logic; -- control register read
80
      ctrl_din: in std_logic_vector(DATA_WIDTH - 1 downto 0);
81
      ctrl_dout: out std_logic_vector(DATA_WIDTH - 1 downto 0);
82
      ctrl_bits: out std_logic_vector(DATA_WIDTH - 1 downto 0));
83
  end component;
84
 
85
  component rx_status_reg
86
    generic (DATA_WIDTH: integer);
87
    port (
88
      status_rd: in std_logic;            -- status register read
89
      status_vector: in std_logic_vector(DATA_WIDTH - 1 downto 0);
90
      status_dout: out std_logic_vector(DATA_WIDTH - 1 downto 0));
91
  end component;
92
 
93
  component gen_event_reg
94
    generic (DATA_WIDTH: integer);
95
    port (
96
      clk: in std_logic;         -- clock  
97
      rst: in std_logic; -- reset
98
      evt_wr: in std_logic; -- event register write     
99
      evt_rd: in std_logic; -- event register read
100
      evt_din: in std_logic_vector(DATA_WIDTH - 1 downto 0); -- write data
101
      event: in std_logic_vector(DATA_WIDTH - 1 downto 0); -- event vector
102
      evt_mask: in std_logic_vector(DATA_WIDTH - 1 downto 0); -- irq mask
103
      evt_en: in std_logic;               -- irq enable
104
      evt_dout: out std_logic_vector(DATA_WIDTH - 1 downto 0); -- read data
105
      evt_irq: out std_logic); -- interrupt  request
106
  end component;
107
 
108
  component rx_cap_reg
109
    port (
110
      clk: in std_logic;                  -- clock
111
      rst: in std_logic; -- reset
112
      cap_ctrl_wr: in std_logic; -- control register write      
113
      cap_ctrl_rd: in std_logic; -- control register read
114
      cap_data_rd: in std_logic;          -- data register read
115
      cap_din: in std_logic_vector(31 downto 0); -- write data
116
      frame_rst: in std_logic; -- start of frame signal
117
      ch_data: in std_logic;  -- channel status/user data
118
      ud_a_en: in std_logic;            -- user data ch. A enable
119
      ud_b_en: in std_logic;              -- user data ch. B enable
120
      cs_a_en: in std_logic;              -- channel status ch. A enable
121
      cs_b_en: in std_logic;              -- channel status ch. B enable
122
      cap_dout: out std_logic_vector(31 downto 0); -- read data
123
      cap_evt: out std_logic);             -- capture event (interrupt)
124
  end component;
125
 
126
  component rx_phase_det
127
    generic (WISH_BONE_FREQ: natural := 33);   -- WishBone frequency in MHz
128
    port (
129
      wb_clk_i: in std_logic;
130
      rxen: in std_logic;
131
      spdif: in std_logic;
132
      lock: out std_logic;
133
      rx_data: out std_logic;
134
      rx_data_en: out std_logic;
135
      rx_block_start: out std_logic;
136
      rx_frame_start: out std_logic;
137
      rx_channel_a: out std_logic;
138
      rx_error: out std_logic;
139
      ud_a_en: out std_logic;              -- user data ch. A enable
140
      ud_b_en: out std_logic;              -- user data ch. B enable
141
      cs_a_en: out std_logic;              -- channel status ch. A enable
142
      cs_b_en: out std_logic);             -- channel status ch. B enable);            
143
  end component;
144 16 gedra
 
145
  component dpram
146
    generic (DATA_WIDTH: positive;
147
             ADDR_WIDTH: positive);
148
    port (
149
      clk: in std_logic;
150
      rst: in std_logic; -- reset is optional, not used here
151
      din: in std_logic_vector(DATA_WIDTH - 1 downto 0);
152
      wr_en: in std_logic;
153
      rd_en: in std_logic;
154
      wr_addr: in std_logic_vector(ADDR_WIDTH - 1 downto 0);
155
      rd_addr: in std_logic_vector(ADDR_WIDTH - 1 downto 0);
156
      dout: out std_logic_vector(DATA_WIDTH - 1 downto 0));
157
  end component;
158 14 gedra
 
159
end rx_package;

powered by: WebSVN 2.1.0

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