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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [orp/] [orp_soc/] [rtl/] [verilog/] [audio/] [audio_top.v] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 746 lampret
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  XESS Audio Interface Top Level                              ////
4
////                                                              ////
5
////  This file is part of the OR1K test application              ////
6
////  http://www.opencores.org/cores/or1k/xess/                   ////
7
////                                                              ////
8
////  Description                                                 ////
9
////  Audio interface top level for XSV board instantiating       ////
10
////  FIFOs, WISHBONE interface and XSV CODEC interface.          ////
11
////                                                              ////
12
////  To Do:                                                      ////
13
////   - DOES NOT WORK RIGHT NOW                                  ////
14
////                                                              ////
15
////  Author(s):                                                  ////
16
////      - Lior Shtram, lior.shtram@flextronicssemi.com          ////
17
////                                                              ////
18
//////////////////////////////////////////////////////////////////////
19
////                                                              ////
20
//// Copyright (C) 2001 Authors                                   ////
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
// Revision 1.1.1.1  2001/11/04 19:00:08  lampret
49
// First import.
50
//
51
//
52
 
53
// synopsys translate_off
54
`include "timescale.v"
55
// synopsys translate_on
56
 
57
module audio_top (
58
        wb_clk_i, wb_rst_i,
59
 
60
        wb_dat_i, wb_dat_o, wb_adr_i, wb_sel_i, wb_we_i, wb_cyc_i,
61
        wb_stb_i, wb_ack_o, wb_err_o,
62
 
63
        m_wb_dat_o, m_wb_dat_i, m_wb_adr_o, m_wb_sel_o, m_wb_we_o, m_wb_cyc_o,
64
        m_wb_stb_o, m_wb_ack_i, m_wb_err_i,
65
 
66
        mclk, lrclk, sclk, sdin, sdout
67
);
68
 
69
input           wb_clk_i;
70
input           wb_rst_i;
71
 
72
input [31:0]     wb_dat_i;
73
output [31:0]    wb_dat_o;
74
input [31:0]     wb_adr_i;
75
input [3:0]      wb_sel_i;
76
input           wb_we_i;
77
input           wb_cyc_i;
78
input           wb_stb_i;
79
output          wb_ack_o;
80
output          wb_err_o;
81
 
82
output [31:0]    m_wb_dat_o;
83
input [31:0]     m_wb_dat_i;
84
output [31:0]    m_wb_adr_o;
85
output [3:0]     m_wb_sel_o;
86
output          m_wb_we_o;
87
output          m_wb_cyc_o;
88
output          m_wb_stb_o;
89
input           m_wb_ack_i;
90
input           m_wb_err_i;
91
 
92
output          mclk;
93
output          lrclk;
94
output          sclk;
95
output          sdin;
96
input           sdout;
97
 
98
parameter fifo_width = 16;
99
 
100
`ifdef UNUSED
101
 
102
wire [fifo_width-1:0]    fifo_data_i;
103
wire [fifo_width-1:0]    fifo_data_o;
104
wire            fifo_clk_wr;
105
wire            fifo_clk_rd;
106
wire            fifo_full;
107
wire            fifo_empty;
108
wire            fifo_almost_full;
109
wire            fifo_almost_empty;
110
wire            fifo_rd_en;
111
wire            fifo_wr_en;
112
 
113
wire            clk = wb_clk_i;
114
wire            rstn = ~wb_rst_i;
115
 
116
//assign audio_dreq = fifo_almost_empty;
117
// assign USB_VPO = fifo_almost_full;
118
// assign USB_VMO = fifo_almost_empty;
119
 
120
assign m_wb_dat_o = 32'h0000_0000;
121
assign m_wb_adr_o = 32'h0000_0000;
122
assign m_wb_sel_o = 4'b0000;
123
assign m_wb_we_o = 1'b0;
124
assign m_wb_cyc_o = 1'b0;
125
assign m_wb_stb_o = 1'b0;
126
 
127
 
128
audio_wb_if     i_audio_wb_if(
129
                .rstn( rstn ),
130
                .clk( clk ),
131
                .wb_dat_i( wb_dat_i ),
132
                .wb_dat_o( wb_dat_o ),
133
                .wb_adr_i( wb_adr_i ),
134
                .wb_sel_i( wb_sel_i ),
135
                .wb_we_i( wb_we_i ),
136
                .wb_cyc_i( wb_cyc_i ),
137
                .wb_stb_i( wb_stb_i ),
138
                .wb_ack_o( wb_ack_o ),
139
                .wb_err_o( wb_err_o ),
140
                .fifo_dat_o( fifo_data_i ),
141
                .fifo_clk_o( fifo_clk_wr ),
142
                .fifo_wr_en( fifo_wr_en ),
143
                .fifo_full( fifo_full ),
144
                .fifo_empty( fifo_empty ),
145
                .fifo_almost_full( fifo_almost_full ),
146
                .fifo_almost_empty( fifo_almost_empty )
147
 
148
                );
149
 
150
`ifdef AUDIO_NO_FIFO
151
fifo_empty_16   i_audio_fifo (
152
                .AINIT( !rstn ),
153
                .DIN( fifo_data_i ),
154
                .DOUT( fifo_data_o ),
155
//              .WR_CLK( fifo_clk_rd ),
156
//              .RD_CLK( fifo_clk_wr ),
157
                .WR_CLK( fifo_clk_wr ),
158
                .RD_CLK( fifo_clk_rd ),
159
                .RD_EN( fifo_rd_en ),
160
                .WR_EN( fifo_wr_en ),
161
                .EMPTY( fifo_empty ),
162
                .FULL( fifo_full ),
163
                .ALMOST_EMPTY( fifo_almost_empty ),
164
                .ALMOST_FULL( fifo_almost_full )
165
                );
166
`else
167
/*
168
fifo8kx16 i_audio_fifo (
169
                .AINIT( !rstn ),
170
                .DIN( fifo_data_i ),
171
                .DOUT( fifo_data_o ),
172
//              .WR_CLK( fifo_clk_rd ),
173
//              .RD_CLK( fifo_clk_wr ),
174
                .WR_CLK( fifo_clk_wr ),
175
                .RD_CLK( fifo_clk_rd ),
176
                .RD_EN( fifo_rd_en ),
177
                .WR_EN( fifo_wr_en ),
178
                .EMPTY( fifo_empty ),
179
                .FULL( fifo_full ),
180
                .ALMOST_EMPTY( fifo_almost_empty ),
181
                .ALMOST_FULL( fifo_almost_full )
182
                );
183
*/
184
 
185
fifo_4095_16    i_audio_fifo (
186
                .AINIT( !rstn ),
187
                .DIN( fifo_data_i ),
188
                .DOUT( fifo_data_o ),
189
//              .WR_CLK( fifo_clk_rd ),
190
//              .RD_CLK( fifo_clk_wr ),
191
                .WR_CLK( fifo_clk_wr ),
192
                .RD_CLK( fifo_clk_rd ),
193
                .RD_EN( fifo_rd_en ),
194
                .WR_EN( fifo_wr_en ),
195
                .EMPTY( fifo_empty ),
196
                .FULL( fifo_full ),
197
                .ALMOST_EMPTY( fifo_almost_empty ),
198
                .ALMOST_FULL( fifo_almost_full )
199
                );
200
 
201
 
202
`endif
203
/*
204
fifo_1023_16 i_audio_fifo (
205
                .AINIT( !rstn ),
206
                .DIN( fifo_data_i ),
207
                .DOUT( fifo_data_o ),
208
                .WR_CLK( clk ),
209
                .RD_CLK( clk ),
210
                .RD_EN( fifo_rd_en ),
211
                .WR_EN( fifo_wr_en ),
212
                .EMPTY( fifo_empty ),
213
                .FULL( fifo_full ),
214
                .ALMOST_EMPTY( fifo_almost_empty ),
215
                .ALMOST_FULL( fifo_almost_full )
216
                ); // synthesis black_box
217
*/
218
 
219
 
220
 
221
 
222
`ifdef UNUSED
223
assign fifo_data_o = fifo_data_i;
224
assign fifo_full = 1'b0;
225
assign fifo_empty = 1'b0;
226
assign fifo_almost_full = 1'b0;
227
assign fifo_almost_empty = 1'b0;
228
`endif
229
 
230
audio_codec_if  i_audio_codec_if (
231
                .rstn( rstn ),
232
                .clk( clk ),
233
                .fifo_clk( fifo_clk_rd ),
234
                .fifo_data( fifo_data_o ),
235
                .fifo_rd_en( fifo_rd_en ),
236
                .sclk( sclk ),
237
                .mclk( mclk ),
238
                .lrclk( lrclk ),
239
                .sdout( sdout ),
240
                .sdin( sdin )
241
                );
242
 
243
`else
244
assign wb_dat_o = 32'h0000_0000;
245
assign wb_ack_o = 1'b0;
246
assign wb_err_o = 1'b0;
247
 
248
assign m_wb_dat_o = 32'h0000_0000;
249
assign m_wb_adr_o = 32'h0000_0000;
250
assign m_wb_sel_o = 4'b0000;
251
assign m_wb_we_o = 1'b0;
252
assign m_wb_cyc_o = 1'b0;
253
assign m_wb_stb_o = 1'b0;
254
 
255
assign mclk = 1'b0;
256
assign lrclk = 1'b0;
257
assign sclk = 1'b0;
258
assign sdin = 1'b0;
259
`endif
260
endmodule

powered by: WebSVN 2.1.0

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