{"id":19924265,"url":"https://github.com/ultraembedded/minispartan6-audio","last_synced_at":"2026-03-07T04:02:41.598Z","repository":{"id":81709696,"uuid":"205693645","full_name":"ultraembedded/minispartan6-audio","owner":"ultraembedded","description":"miniSpartan6+ (Spartan6) FPGA based MP3 Player","archived":false,"fork":false,"pushed_at":"2019-09-02T20:19:07.000Z","size":609,"stargazers_count":27,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T10:25:12.770Z","etag":null,"topics":["audio","fpga","mp3player","risc-v","rv32im","sd-card","spartan6","verilog","verilog-project"],"latest_commit_sha":null,"homepage":null,"language":"Verilog","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ultraembedded.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-01T15:11:42.000Z","updated_at":"2024-12-05T08:42:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"4965dd2c-05d3-4d42-a8df-a59335f1b7a4","html_url":"https://github.com/ultraembedded/minispartan6-audio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ultraembedded/minispartan6-audio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultraembedded%2Fminispartan6-audio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultraembedded%2Fminispartan6-audio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultraembedded%2Fminispartan6-audio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultraembedded%2Fminispartan6-audio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ultraembedded","download_url":"https://codeload.github.com/ultraembedded/minispartan6-audio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultraembedded%2Fminispartan6-audio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30207393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T03:24:23.086Z","status":"ssl_error","status_checked_at":"2026-03-07T03:23:11.444Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","fpga","mp3player","risc-v","rv32im","sd-card","spartan6","verilog","verilog-project"],"created_at":"2024-11-12T22:16:55.368Z","updated_at":"2026-03-07T04:02:36.583Z","avatar_url":"https://github.com/ultraembedded.png","language":"Verilog","funding_links":[],"categories":[],"sub_categories":[],"readme":"# miniSpartan6+ (Spartan6) FPGA based MP3 Player\n\nGithub:   [https://github.com/ultraembedded/minispartan6-audio](https://github.com/ultraembedded/minispartan6-audio)\n\nAn audio player (MP3) based on the Scarab Hardware miniSpartan6+ FPGA board featuring my RISC-V CPU, SDRAM controller and peripherals.\n\n## Cloning\n```\n# Clone repository and submodules\ngit clone https://github.com/ultraembedded/minispartan6-audio.git --recursive\n```\n\n## Features\n* 50MHz RISC-V (RV32IM) CPU with ICACHE (2-way x 8KB), DCACHE (2-way x 8KB write-back).\n* AXI4 infrastructure.\n* SDRAM controller.\n* SPI (SD card) interface.\n* 2-ch audio controller (sigma delta DAC).\n* UART -\u003e AXI debug bridge (for loading code, etc).\n\n## Details\n\nI originally created a FPGA soft-CPU based MP3 player around a MIPS derivative in 2012 ([Hackaday](https://hackaday.com/2012/03/13/playing-mp3s-from-an-fpga/))\n\nThis time, I've rebuilt it around my RISC-V (RV32IM) CPU, SDRAM controller and SoC peripherals;\n\n| Component | Description   |\n| ---- | ------------- |\n| [audio](https://github.com/ultraembedded/core_audio) | Audio Controller and FIFO |\n| [core_soc](https://github.com/ultraembedded/core_soc) | SoC peripherals (timer, SPI, GPIO, UART) |\n| [dbg_bridge](https://github.com/ultraembedded/core_dbg_bridge) | UART -\u003e AXI debug bridge |\n| [riscv](https://github.com/ultraembedded/riscv) | RISC-V (RV32IM) |\n| [sdram](https://github.com/ultraembedded/core_sdram_axi4) | AXI4 SDRAM Controller |\n\nThe application code will play any MP3s found in the root directory of a FAT32 formatted SD card placed in the microSD card slot of the FPGA dev board.\n\n![](doc/block_diagram.png)\n\n## Scarab Hardware miniSpartan6+\n![](doc/minispartan6.jpg)\n\n## ISE Design Summary (XC6LX9)\n```\nDesign Summary\n--------------\n\nDesign Summary:\nNumber of errors:      0\nNumber of warnings:   10\nSlice Logic Utilization:\n  Number of Slice Registers:                 2,681 out of  11,440   23%\n    Number used as Flip Flops:               2,681\n    Number used as Latches:                      0\n    Number used as Latch-thrus:                  0\n    Number used as AND/OR logics:                0\n  Number of Slice LUTs:                      5,652 out of   5,720   98%\n    Number used as logic:                    5,072 out of   5,720   88%\n      Number using O6 output only:           3,889\n      Number using O5 output only:             279\n      Number using O5 and O6:                  904\n      Number used as ROM:                        0\n    Number used as Memory:                     519 out of   1,440   36%\n      Number used as Dual Port RAM:            518\n        Number using O6 output only:            70\n        Number using O5 output only:            14\n        Number using O5 and O6:                434\n      Number used as Single Port RAM:            0\n      Number used as Shift Register:             1\n        Number using O6 output only:             1\n        Number using O5 output only:             0\n        Number using O5 and O6:                  0\n    Number used exclusively as route-thrus:     61\n      Number with same-slice register load:     47\n      Number with same-slice carry load:        14\n      Number with other load:                    0\n\nSlice Logic Distribution:\n  Number of occupied Slices:                 1,430 out of   1,430  100%\n  Number of MUXCYs used:                     1,300 out of   2,860   45%\n  Number of LUT Flip Flop pairs used:        5,701\n    Number with an unused Flip Flop:         3,190 out of   5,701   55%\n    Number with an unused LUT:                  49 out of   5,701    1%\n    Number of fully used LUT-FF pairs:       2,462 out of   5,701   43%\n    Number of unique control sets:             215\n    Number of slice register sites lost\n      to control set restrictions:             854 out of  11,440    7%\n\n  A LUT Flip Flop pair for this architecture represents one LUT paired with\n  one Flip Flop within a slice.  A control set is a unique combination of\n  clock, reset, set, and enable signals for a registered element.\n  The Slice Logic Distribution report is not meaningful if the design is\n  over-mapped for a non-slice resource or if Placement fails.\n\nIO Utilization:\n  Number of bonded IOBs:                        61 out of     186   32%\n    Number of LOCed IOBs:                       61 out of      61  100%\n    IOB Flip Flops:                             61\n\nSpecific Feature Utilization:\n  Number of RAMB16BWERs:                        22 out of      32   68%\n  Number of RAMB8BWERs:                          2 out of      64    3%\n  Number of BUFIO2/BUFIO2_2CLKs:                 1 out of      32    3%\n    Number used as BUFIO2s:                      1\n    Number used as BUFIO2_2CLKs:                 0\n  Number of BUFIO2FB/BUFIO2FB_2CLKs:             0 out of      32    0%\n  Number of BUFG/BUFGMUXs:                       1 out of      16    6%\n    Number used as BUFGs:                        1\n    Number used as BUFGMUX:                      0\n  Number of DCM/DCM_CLKGENs:                     0 out of       4    0%\n  Number of ILOGIC2/ISERDES2s:                  17 out of     200    8%\n    Number used as ILOGIC2s:                    17\n    Number used as ISERDES2s:                    0\n  Number of IODELAY2/IODRP2/IODRP2_MCBs:         0 out of     200    0%\n  Number of OLOGIC2/OSERDES2s:                  44 out of     200   22%\n    Number used as OLOGIC2s:                    44\n    Number used as OSERDES2s:                    0\n  Number of BSCANs:                              0 out of       4    0%\n  Number of BUFHs:                               0 out of     128    0%\n  Number of BUFPLLs:                             0 out of       8    0%\n  Number of BUFPLL_MCBs:                         0 out of       4    0%\n  Number of DSP48A1s:                            4 out of      16   25%\n  Number of ICAPs:                               0 out of       1    0%\n  Number of MCBs:                                0 out of       2    0%\n  Number of PCILOGICSEs:                         0 out of       2    0%\n  Number of PLL_ADVs:                            1 out of       2   50%\n  Number of PMVs:                                0 out of       1    0%\n  Number of STARTUPs:                            0 out of       1    0%\n  Number of SUSPEND_SYNCs:                       0 out of       1    0%\n```\n\n## Running Firmware\n\nTo build the firmware, make sure the RISC-V GCC (built for RV32IM) are in the PATH, then type:\n```\n# Add RISC-V GCC to path\nexport PATH=$PATH:/opt/riscv32im/bin/\n\n# Build firmware\nmake\n```\n\nThe FPGA board has a FTDI dual channel FT2232H where channel A (usually /dev/ttyUSB1) is used for loading the bitstream, and channel B (usually /dev/ttyUSB2) is used for a virtual serial port.\n\nThe tools provided for loading the firmware need to be pointed at channel B, e.g;\n\n```\nmake run TARGET_PORT=/dev/ttyUSB2\n\nELF: Loading 0x80000000 - size 79KB\n |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX| 100.0% \n\nSD Test\n\nDirectory /\n01  Kaiser Chiefs - Ruby.mp3 [3284992 bytes]\n02  Kaiser Chiefs - The Angry Mob.mp3 [4616192 bytes]\n03  Kaiser Chiefs - Heat Dies Down.mp3 [3796992 bytes]\n04  Kaiser Chiefs - Highroyds.mp3 [3196928 bytes]\n05  Kaiser Chiefs - Love's Not A Competition [But I'm Winning].mp3 [3168256 bytes]\n06  Kaiser Chiefs - Thank You Very Much.mp3 [2527232 bytes]\n07  Kaiser Chiefs - I Can Do Without You.mp3 [3270656 bytes]\n08  Kaiser Chiefs - My Kind Of Guy.mp3 [3948544 bytes]\n09  Kaiser Chiefs - Everything Is Average Nowadays.mp3 [2639872 bytes]\n10  Kaiser Chiefs - Boxing Champ.mp3 [1460224 bytes]\n11  Kaiser Chiefs - Learnt My Lesson Well.mp3 [3762176 bytes]\n12  Kaiser Chiefs - Try Your Best.mp3 [3563520 bytes]\n13  Kaiser Chiefs - Retirement.mp3 [3739648 bytes]\n01  The Chemical Brothers - No Path To Follow.mp3 [1523295 bytes]\n02  The Chemical Brothers - We Are The Night.mp3 [9431501 bytes]\n03  The Chemical Brothers - All Rights Reversed.mp3 [6775161 bytes]\n04  The Chemical Brothers - Saturate.mp3 [6929388 bytes]\n05  The Chemical Brothers - Do It Again.mp3 [7997065 bytes]\n06  The Chemical Brothers - Das Spiegel.mp3 [8390156 bytes]\n07  The Chemical Brothers - The Salmon Dance.mp3 [5248565 bytes]\n08  The Chemical Brothers - Burst Generator.mp3 [9914244 bytes]\n09  The Chemical Brothers - A Modern Midnight Conversation.mp3 [8560056 bytes]\n10  The Chemical Brothers - Battle Scars.mp3 [8417114 bytes]\n11  The Chemical Brothers - Harpoons.mp3 [3482479 bytes]\n12  The Chemical Brothers - The Pills Won't Help You Now.mp3 [9438397 bytes]\nPlaying '/01  Kaiser Chiefs - Ruby.mp3'..\n```\n\nThe python firmware loader tools require access to the serial port (user permissions), python-serial and ELF libraries;\n\n```\n# Pip install of required python libraries\npip install pyserial --upgrade\npip install pyelftools --upgrade\n\n# (or) Ubuntu/Debian/Mint python libraries install\nsudo apt-get install python-serial python-pyelftools\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fultraembedded%2Fminispartan6-audio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fultraembedded%2Fminispartan6-audio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fultraembedded%2Fminispartan6-audio/lists"}