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

Subversion Repositories ac97

[/] [ac97/] [trunk/] [rtl/] [verilog/] [ac97_defines.v] - Blame information for rev 14

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

Line No. Rev Author Line
1 4 rudi
/////////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  WISHBONE AC 97 Controller Definitions                      ////
4
////                                                             ////
5
////                                                             ////
6
////  Author: Rudolf Usselmann                                   ////
7
////          rudi@asics.ws                                      ////
8
////                                                             ////
9
////                                                             ////
10
////  Downloaded from: http://www.opencores.org/cores/ac97_ctrl/ ////
11
////                                                             ////
12
/////////////////////////////////////////////////////////////////////
13
////                                                             ////
14 14 rudi
//// Copyright (C) 2000-2002 Rudolf Usselmann                    ////
15
////                         www.asics.ws                        ////
16
////                         rudi@asics.ws                       ////
17 4 rudi
////                                                             ////
18
//// This source file may be used and distributed without        ////
19
//// restriction provided that this copyright statement is not   ////
20
//// removed from the file and that any derivative work contains ////
21
//// the original copyright notice and the associated disclaimer.////
22
////                                                             ////
23
////     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY     ////
24
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   ////
25
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   ////
26
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      ////
27
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         ////
28
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    ////
29
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   ////
30
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        ////
31
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  ////
32
//// LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  ////
33
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  ////
34
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         ////
35
//// POSSIBILITY OF SUCH DAMAGE.                                 ////
36
////                                                             ////
37
/////////////////////////////////////////////////////////////////////
38
 
39
//  CVS Log
40
//
41 14 rudi
//  $Id: ac97_defines.v,v 1.5 2002-09-19 06:30:56 rudi Exp $
42 4 rudi
//
43 14 rudi
//  $Date: 2002-09-19 06:30:56 $
44
//  $Revision: 1.5 $
45 4 rudi
//  $Author: rudi $
46
//  $Locker:  $
47
//  $State: Exp $
48
//
49
// Change History:
50
//               $Log: not supported by cvs2svn $
51 14 rudi
//               Revision 1.4  2002/03/11 03:21:22  rudi
52
//
53
//               - Added defines to select fifo depth between 4, 8 and 16 entries.
54
//
55 12 rudi
//               Revision 1.3  2002/03/05 04:44:05  rudi
56
//
57
//               - Fixed the order of the thrash hold bits to match the spec.
58
//               - Many minor synthesis cleanup items ...
59
//
60 10 rudi
//               Revision 1.2  2001/08/10 08:09:42  rudi
61
//
62
//               - Removed RTY_O output.
63
//               - Added Clock and Reset Inputs to documentation.
64
//               - Changed IO names to be more clear.
65
//               - Uniquifyed define names to be core specific.
66
//
67 6 rudi
//               Revision 1.1  2001/08/03 06:54:49  rudi
68
//
69
//
70
//               - Changed to new directory structure
71
//
72 4 rudi
//               Revision 1.1.1.1  2001/05/19 02:29:14  rudi
73
//               Initial Checkin
74
//
75
//
76
//
77
//
78
 
79
`timescale 1ns / 10ps
80
 
81
/////////////////////////////////////////////////////////////////////
82
// This AC97 Controller supports up to 6 Output and 3 Input Channels.
83
// Comment out the define statement for which channels you do not wish
84
// to support in your implementation. The main Left and Right channels
85
// are always supported. 
86
 
87
// Surround Left + Right
88 10 rudi
`define AC97_SURROUND           1
89 4 rudi
 
90
// Center Channel
91 6 rudi
`define AC97_CENTER             1
92 4 rudi
 
93
// LFE Channel
94 6 rudi
`define AC97_LFE                1
95 4 rudi
 
96
// Stereo Input
97 6 rudi
`define AC97_SIN                1
98 4 rudi
 
99
// Mono Microphone Input
100 6 rudi
`define AC97_MICIN              1
101 4 rudi
 
102
/////////////////////////////////////////////////////////////////////
103
//
104
// This define selects how the WISHBONE interface determines if
105
// the internal register file is selected.
106
// This should be a simple address decoder. "wb_addr_i" is the
107
// WISHBONE address bus (32 bits wide).
108 6 rudi
`define AC97_REG_SEL            (wb_addr_i[31:29] == 3'h0)
109 4 rudi
 
110
/////////////////////////////////////////////////////////////////////
111
//
112
// This is a prescaler that generates a pulse every 250 nS.
113
// The value here should one less than the actually calculated
114
// value.
115
// For a 200 MHz wishbone clock, this value is 49 (50-1).
116 10 rudi
`define AC97_250_PS     6'h31
117 4 rudi
 
118
/////////////////////////////////////////////////////////////////////
119
//
120
// AC97 Cold reset Must be asserted for at least 1uS. The AC97
121
// controller will stretch the reset pulse to at least 1uS.
122
// The reset timer is driven by the AC97_250_PS prescaler.
123
// This value should probably be never changed. Adjust the
124
// AC97_250_PS instead.
125 10 rudi
`define AC97_RST_DEL    3'h4
126 4 rudi
 
127
/////////////////////////////////////////////////////////////////////
128
//
129
// This value indicates for how long the resume signaling (asserting sync)
130
// should be done. This counter is driven by the AC97_250_PS prescaler.
131
// This value times 250nS is the duration of the resume signaling.
132
// The actual value must be incremented by one, as we do not know
133
// the current state of the prescaler, and must somehow insure we
134
// meet the minimum 1uS length. This value should probably be never
135
// changed. Modify the AC97_250_PS instead.
136 10 rudi
`define AC97_RES_SIG    3'h5
137 4 rudi
 
138
/////////////////////////////////////////////////////////////////////
139
//
140
// If the bit clock is absent for at least two "predicted" bit
141
// clock periods (163 nS) we should signal "suspended".
142
// This value defines how many WISHBONE cycles must pass without
143
// any change on the bit clock input before we signal "suspended".
144
// For a 200 MHz WISHBONE clock this would be about (163/5) 33 cycles.
145 10 rudi
`define AC97_SUSP_DET   6'h21
146 4 rudi
 
147 12 rudi
/////////////////////////////////////////////////////////////////////
148
//
149
// Select FIFO Depth. For most applications a FIFO depth of 4 should
150
// be sufficient. For systems with slow interrupt processing or slow
151
// DMA response or systems with low internal bus bandwidth you might
152
// want to increase the FIFO sizes to reduce the interrupt/DMA service
153
// request frequencies.
154
// Service request frequency can be calculated as follows:
155
// Channel bandwidth / FIFO size = Service Request Frequency
156
// For Example: 48KHz / 4 = 12 kHz
157
//
158
// Select Input FIFO depth by uncommenting ONE of the following define
159
// statements:
160
`define AC97_IN_FIFO_DEPTH_4
161
//`define AC97_IN_FIFO_DEPTH_8
162
//`define AC97_IN_FIFO_DEPTH_16
163
//
164
// Select Output FIFO depth by uncommenting ONE of the following define
165
// statements:
166
`define AC97_OUT_FIFO_DEPTH_4
167
//`define AC97_OUT_FIFO_DEPTH_8
168
//`define AC97_OUT_FIFO_DEPTH_16
169
 

powered by: WebSVN 2.1.0

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