基于FGGA设计的音频录音与播放实验例程Verilog逻辑源码Quartus工程文件+文档说明,音频编解码芯片选用WOLFSON 公司的 WM8731 芯,FPGA型号Cyclone4E系列中的EP4CE6F17C8,Quartus版本17.1。
`timescale 1ps/1ps
module top
(
input clk, //clock input
input rst_n, //reset input
input key, //record play button
input wm8731_bclk, //audio bit clock
input wm8731_daclrc, //DAC sample rate left right clock
output wm8731_dacdat, //DAC audio data output
input wm8731_adclrc, //ADC sample rate left right clock
input wm8731_adcdat, //ADC audio data input
inout wm8731_scl, //I2C clock
inout wm8731_sda, //I2C data
output sdram_clk, //sdram clock
output sdram_cke, //sdram clock enable
output sdram_cs_n, //sdram chip select
output sdram_we_n, //sdram write enable
output sdram_cas_n, //sdram column address strobe
output sdram_ras_n, //sdram row address strobe
output[1:0] sdram_dqm, //sdram data enable
output[1:0] sdram_ba, //sdram bank address
output[12:0] sdram_addr, //sdram address
inout[15:0] sdram_dq //sdram data
);
parameter MEM_DATA_BITS = 16 ; //external memory user interface data width
parameter ADDR_BITS = 24 ; //external memory user interface address width
parameter BUSRT_BITS = 10 ; //external memory user interface burst width
wire wr_burst_data_req;
wire