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

Subversion Repositories i2s_interface

[/] [i2s_interface/] [trunk/] [rtl/] [vhdl/] [tx_i2s_pack.vhd] - Blame information for rev 18

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

Line No. Rev Author Line
1 11 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 component declarations.                      ----
10
----                                                              ----
11
---- To Do:                                                       ----
12
---- -                                                            ----
13
----                                                              ----
14
---- Author(s):                                                   ----
15
---- - Geir Drange, gedra@opencores.org                           ----
16
----                                                              ----
17
----------------------------------------------------------------------
18
----                                                              ----
19
---- Copyright (C) 2004 Authors and OPENCORES.ORG                 ----
20
----                                                              ----
21
---- This source file may be used and distributed without         ----
22
---- restriction provided that this copyright statement is not    ----
23
---- removed from the file and that any derivative work contains  ----
24
---- the original copyright notice and the associated disclaimer. ----
25
----                                                              ----
26
---- This source file is free software; you can redistribute it   ----
27
---- and/or modify it under the terms of the GNU General          ----
28
---- Public License as published by the Free Software Foundation; ----
29
---- either version 2.0 of the License, or (at your option) any   ----
30
---- later version.                                               ----
31
----                                                              ----
32
---- This source is distributed in the hope that it will be       ----
33
---- useful, but WITHOUT ANY WARRANTY; without even the implied   ----
34
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ----
35 18 gedra
---- PURPOSE. See the GNU General Public License for more details.----
36 11 gedra
----                                                              ----
37
---- You should have received a copy of the GNU General           ----
38
---- Public License along with this source; if not, download it   ----
39
---- from http://www.gnu.org/licenses/gpl.txt                     ----
40
----                                                              ----
41
----------------------------------------------------------------------
42
--
43
-- CVS Revision History
44
--
45
-- $Log: not supported by cvs2svn $
46 18 gedra
-- Revision 1.1  2004/08/04 14:29:10  gedra
47
-- Transmitter component declarations.
48 11 gedra
--
49
--
50 18 gedra
--
51 11 gedra
 
52
library ieee;
53
use ieee.std_logic_1164.all;
54
 
55
package tx_i2s_pack is
56
 
57
-- components used in the transmitter
58
 
59
  component gen_control_reg
60
    generic (DATA_WIDTH: integer;
61
             -- note that this vector is (0 to xx), reverse order
62
             ACTIVE_BIT_MASK: std_logic_vector);
63
    port (
64
      clk: in std_logic;         -- clock  
65
      rst: in std_logic; -- reset
66
      ctrl_wr: in std_logic; -- control register write  
67
      ctrl_rd: in std_logic; -- control register read
68
      ctrl_din: in std_logic_vector(DATA_WIDTH - 1 downto 0);
69
      ctrl_dout: out std_logic_vector(DATA_WIDTH - 1 downto 0);
70
      ctrl_bits: out std_logic_vector(DATA_WIDTH - 1 downto 0));
71
  end component;
72
 
73
  component gen_event_reg
74
    generic (DATA_WIDTH: integer);
75
    port (
76
      clk: in std_logic;         -- clock  
77
      rst: in std_logic; -- reset
78
      evt_wr: in std_logic; -- event register write     
79
      evt_rd: in std_logic; -- event register read
80
      evt_din: in std_logic_vector(DATA_WIDTH - 1 downto 0); -- write data
81
      event: in std_logic_vector(DATA_WIDTH - 1 downto 0); -- event vector
82
      evt_mask: in std_logic_vector(DATA_WIDTH - 1 downto 0); -- irq mask
83
      evt_en: in std_logic;               -- irq enable
84
      evt_dout: out std_logic_vector(DATA_WIDTH - 1 downto 0); -- read data
85
      evt_irq: out std_logic); -- interrupt  request
86
  end component;
87
 
88
  component dpram
89
    generic (DATA_WIDTH: positive;
90
             RAM_WIDTH: positive);
91
    port (
92
      clk: in std_logic;
93
      rst: in std_logic; -- reset is optional, not used here
94
      din: in std_logic_vector(DATA_WIDTH - 1 downto 0);
95
      wr_en: in std_logic;
96
      rd_en: in std_logic;
97
      wr_addr: in std_logic_vector(RAM_WIDTH - 1 downto 0);
98
      rd_addr: in std_logic_vector(RAM_WIDTH - 1 downto 0);
99
      dout: out std_logic_vector(DATA_WIDTH - 1 downto 0));
100
  end component;
101
 
102
  component i2s_version
103
    generic (DATA_WIDTH: integer;
104
             ADDR_WIDTH: integer;
105
             IS_MASTER: integer);
106
    port (
107
      ver_rd: in std_logic; -- version register read
108
      ver_dout: out std_logic_vector(DATA_WIDTH - 1 downto 0));
109
  end component;
110
 
111
  component tx_i2s_wbd
112
    generic (DATA_WIDTH: integer;
113
             ADDR_WIDTH: integer);
114
    port (
115
      wb_clk_i: in std_logic;             -- wishbone clock
116
      wb_rst_i: in std_logic;             -- reset signal
117
      wb_sel_i: in std_logic;             -- select input
118
      wb_stb_i: in std_logic;             -- strobe input
119
      wb_we_i: in std_logic;              -- write enable
120
      wb_cyc_i: in std_logic;             -- cycle input
121
      wb_bte_i: in std_logic_vector(1 downto 0);  -- burts type extension
122
      wb_cti_i: in std_logic_vector(2 downto 0);  -- cycle type identifier
123
      wb_adr_i: in std_logic_vector(ADDR_WIDTH - 1 downto 0);  -- address
124
      data_out: in std_logic_vector(DATA_WIDTH - 1 downto 0); -- internal bus
125
      wb_ack_o: out std_logic;            -- acknowledge
126
      wb_dat_o: out std_logic_vector(DATA_WIDTH - 1 downto 0);  -- data out
127
      version_rd: out std_logic;          -- Version register read 
128
      config_rd: out std_logic;           -- Config register read
129
      config_wr: out std_logic;           -- Config register write
130
      intmask_rd: out std_logic;          -- Interrupt mask register read
131
      intmask_wr: out std_logic;          -- Interrupt mask register write
132
      intstat_rd: out std_logic;          -- Interrupt status register read
133
      intstat_wr: out std_logic;          -- Interrupt status register read
134
      mem_wr: out std_logic);             -- Sample memory write
135
  end component;
136
 
137
  component i2s_codec
138
    generic (DATA_WIDTH: integer;
139
             ADDR_WIDTH: integer;
140
             IS_MASTER: integer range 0 to 1;
141
             IS_RECEIVER: integer range 0 to 1);
142
    port (
143
      wb_clk_i: in std_logic;             -- wishbone clock
144
      conf_res: in std_logic_vector(5 downto 0);  -- sample resolution
145
      conf_ratio: in std_logic_vector(7 downto 0); -- clock divider ratio
146
      conf_swap: in std_logic;            -- left/right sample order
147
      conf_en: in std_logic;              -- transmitter/recevier enable
148
      i2s_sd_i: in std_logic;             -- I2S serial data input
149
      i2s_sck_i: in std_logic;            -- I2S clock input
150
      i2s_ws_i: in std_logic;             -- I2S word select input
151
      sample_dat_i: in std_logic_vector(DATA_WIDTH - 1 downto 0);  -- audio data
152 18 gedra
      sample_dat_o: out std_logic_vector(DATA_WIDTH - 1 downto 0); -- audio data
153 11 gedra
      mem_rdwr: out std_logic;            -- sample buffer read/write
154
      sample_addr: out std_logic_vector(ADDR_WIDTH - 2 downto 0);  -- address
155
      evt_hsbf: out std_logic;            -- higher sample buf empty event
156
      evt_lsbf: out std_logic;            -- lower sample buf empty event
157
      i2s_sd_o: out std_logic;            -- I2S serial data output
158
      i2s_sck_o: out std_logic;           -- I2S clock output
159
      i2s_ws_o: out std_logic);           -- I2S word select output
160
  end component;
161
 
162
end tx_i2s_pack;

powered by: WebSVN 2.1.0

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