上传者: SKCQTGZX
|
上传时间: 2021-12-11 21:02:00
|
文件大小: 89.65MB
|
文件类型: ZIP
Cyclone10LP FPGA控制SD卡音乐播放Verilog例程源码Quartus17.1工程文件+文档资料,FPGA为CYCLONE10LP系列中的10CL025YU256C8. 完整的Quartus工程文件,可以做为你的学习设计参考。
module top(
input clk,
input rst_n,
input key,
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 sd_ncs, //SD card chip select (SPI mode)
output sd_dclk, //SD card clock
output sd_mosi, //SD card controller data output
input sd_miso, //SD card controller data input
output [3:0] led
);
wire[9:0] lut_index;
wire[31:0] lut_data;
wire[3:0] state_code;
//I2C master controller
i2c_config i2c_config_m0(
.rst (~rst_n ),
.clk (clk ),
.clk_div_cnt (16'd99 ),
.i2c_addr_2byte (1'b0 ),
.lut_index (lut_index ),
.lut_dev_addr (lut_data[31:24] ),
.lut_reg_addr (lut_data[23:8] ),
.lut_reg_data (lut_data[7:0] ),