资源简介
非常非常难得,可以说网上都没有;这是我花了非常大的力气找到的,MP3的verilog硬件实现_完整工程;可以在ISE综合生成下载文件。还有说明文档。
代码片段和文件信息
#include “basic_io.h“
#include “LCD.h“
#include “SD_Card.h“
//#include “Open_I2C.h“
#include “Test.h“
#include
int Status;
UINT32 i j;
int write_block_count;
int write_addr;
BYTE Buffer[1024]={0};
void System_init() {
char Text1[16] = “SD MP3 Player!! “;
char Text2[16] = “Initializing....“;
char Text3[16] = “Press button now“;
unsigned char codec_ready;
printf(“Please wait while system is being initialized...\n“);
Status = 0;
init_button_irq();
printf(“Button initialized...\n“);
SD_card_init();
printf(“SD card initialized...\n“);
LCD_Test();
printf(“LCD initialized...\n“);
LCD_Line1();
// Show Text to LCD
LCD_Show_Text(Text1);
// Change Line2
LCD_Line2();
// Show Text to LCD
LCD_Show_Text(Text2);
IOWR(LED_RED_base00x0);
IOWR(LED_GREEN_base00x0);
IOWR(SEG7_DISPLAY_base00);
IOWR(DP_RAM_WRITE_IDLE_base 0 1);
IOWR(DP_RAM_WRITE_DATA_base 0 0);
IOWR(NIOS_CONTROL_SIGNALS_base 0 0x0);
// remove the reset signal from NIOS to hardware
IOWR(NIOS_CONTROL_SIGNALS_base 0 0x8);
printf(“Waiting for audio codec...\n“);
do {
codec_ready = IORD(CODEC_READY_base 0);
} while (codec_ready == 0);
printf(“Audio codec is now ready...\n“);
LCD_Line1();
// Show Text to LCD
LCD_Show_Text(Text1);
LCD_Line2();
// Show Text to LCD
LCD_Show_Text(Text3);
// Read the first block from SD card
SD_read_lba(Buffer 0 2);
j = 2;
i = 0;
write_addr = 0;
write_block_count = 0;
printf(“System is ready now...\n“);
printf(“Please push button 0 to start...\n“);
}
int main(void)
{
int write_request;
System_init();
while(1)
{
if (Status == 1) {
write_request = IORD(DP_RAM_WRITE_REQUEST_base 0);
if (write_request == 1) {
// printf(“write requested...\n“);
write_block_count++;
IOWR(DP_RAM_WRITE_IDLE_base 0 0);
// Read 1024 bytes from SD card
while (i < 1024) {
// printf(“j=%u i=%d block=%d Wdata %d: %04x\n“ j i write_block_count write_addr Tmp1);
IOWR(DP_RAM_WRITE_DATA_base 0 ((write_addr & 0x3FF) << 17) | ((((Buffer[i]<<8)|(Buffer[i+1])) & 0xFFFF) << 1) | (1 & 0x1));
if (write_addr < 1023) ++write_addr;
else write_addr = 0;
i += 2;
}
// Clear the write-enable signal
IOWR(DP_RAM_WRITE_DATA_base 0 0);
// printf(“write finished: block %d addr=%d\n“ write_block_count write_addr);
IOWR(DP_RAM_WRITE_IDLE_base 0 1);
IOWR(SEG7_DISPLAY_base0 (write_block_count & 0xFFFF) << 16 | ((j / 2048) & 0xFFFF));
// Prepare data for next write
SD_read_lba(Buffer j 2);
j+=2;
i = 0;
}
// printf(“write: b=%d wc=%d i=%d wa=%d wd=%04X\n“ write_block_count write_counter i write_addr Tmp1);
} else {
msleep(500);
}
}
return 0;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2007-03-30 18:15 MAC_MP3_Hardware\DE2_SD_Card_MP3\
文件 5344 2007-03-31 20:44 MAC_MP3_Hardware\DE2_SD_Card_MP3\audio.v
文件 3499 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\AUDIO_PLL.bsf
文件 9917 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\AUDIO_PLL.v
文件 11264 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\AUDIO_PLL2.v
文件 9476 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\AUDIO_PLL2_bb.v
文件 114 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\AUDIO_PLL2_inst.v
文件 2392 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\bht_ram.mif
文件 4148 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\button_pio.v
文件 1596 2007-03-31 20:44 MAC_MP3_Hardware\DE2_SD_Card_MP3\clock_gen.v
文件 4885 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\codec_ready.v
文件 808 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\cpu_0.ocp
文件 373312 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\cpu_0.v
文件 11362 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\cpu_0_jtag_debug_module.v
文件 9543 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\cpu_0_jtag_debug_module_wrapper.v
文件 5218 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\cpu_0_mult_cell.v
文件 5878 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\cpu_0_ociram_default_contents.mif
文件 37422 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\cpu_0_test_bench.v
目录 0 2007-03-25 19:36 MAC_MP3_Hardware\DE2_SD_Card_MP3\db\
文件 136 2007-03-25 19:35 MAC_MP3_Hardware\DE2_SD_Card_MP3\db\DE2_SD_Card_Audio.db_info
文件 6745 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\dc_tag_ram.mif
文件 78214 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\DE2_SD_Card_Audio.pin
文件 952 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\DE2_SD_Card_Audio.qpf
文件 24030 2007-03-05 20:06 MAC_MP3_Hardware\DE2_SD_Card_MP3\DE2_SD_Card_Audio.qsf
文件 2643 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\DE2_SD_Card_Audio.qws
文件 841117 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\DE2_SD_Card_Audio.sof
文件 17046 2007-03-25 19:10 MAC_MP3_Hardware\DE2_SD_Card_MP3\DE2_SD_Card_Audio.v
文件 308 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\DE2_SD_Card_Audio_time_limited.cdf
文件 841139 2007-03-25 20:22 MAC_MP3_Hardware\DE2_SD_Card_MP3\DE2_SD_Card_Audio_time_limited.sof
目录 0 2007-03-11 23:06 MAC_MP3_Hardware\DE2_SD_Card_MP3\DE2_SD_MP3\
文件 1762 2006-05-21 02:19 MAC_MP3_Hardware\DE2_SD_Card_MP3\DE2_SD_MP3\.cdtbuild
............此处省略497个文件信息
- 上一篇:synopsys DC的官方培训教程.rar
- 下一篇:so加固--加密函数
相关资源
- 具有可编程环路补偿功能高密度电源
- FPGA系统中有源电容放电电路设计需注
- 玩转Altera FPGA:基于PLL分频计数的LE
- 易语言搜搜mp3源码
- 二院型号FPGA 硬件描述语言编程准则
- ETC中FM0解码器的设计
- 基于FPGA和万兆网的GigE Vison设计方案
- Xilinx FPGA底层资源架构与设计规范
- fpga多通道采样
- 用Verilog语言写的CPLD和MCU通讯的SPI接口
- ARM9指令cache的verilog代码
- 基于FPGA的电梯控制器系统设计
- 基于MCU+FPGA的LED大屏幕控制系统的设计
- Modelsim学习资料很全
-
MP3Pla
yer播放器 - 音频测试文件pcmmp3aacamrg711ag711u等多种
- ddr_verilog
- 宽频带数字锁相环的设计及基于FPGA的
- 一种基于FPGA的三相锁相环设计方法
- 开发板EP4CE10F17C8技术手册.zip
- 基于FPGA的快速并行FFT及应用
- 基于FPGA的移位寄存器流水线结构FFT处
- 基于FPGA的彩色线阵CCD图像采集系统设
- 在FPGA上优化实现复数浮点计算
- 基于FPGA的高速流水线浮点乘法器设计
- 电源纹波调试的小结
- 详析单片机、ARM、FPGA嵌入式的特点和
- 详析单片机、ARM、FPGA嵌入式的特点
- actel fpga外部输入时钟毛刺问题排查与
- 基于Actel FPGA的TFT控制器技术方案设计
评论
共有 条评论