element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Summer of FPGA
  • Challenges & Projects
  • Design Challenges
  • Summer of FPGA
  • More
  • Cancel
Summer of FPGA
Blog Audio synth #1 - The project
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: a33333
  • Date Created: 13 Dec 2021 3:02 PM Date Created
  • Views 5196 views
  • Likes 10 likes
  • Comments 2 comments
Related
Recommended

Audio synth #1 - The project

a33333
a33333
13 Dec 2021

Table of Contents

  1. Audio Synth #1 - The project
  2. Audio Synth #2 - Board introduction and IDE setup
  3. Audio Synth #3 - Arduino to CmodS7 COMM Test
  4. Audio Synth #4 - Use PWM to control LED
  5. Audio Synth #5 - Testing the I2S PCM5102 DAC Decoder Board
  6. Audio Synth #6 - Sound generation with CmodS7
  7. Audio Synth #7 - Design challenge ends, project continues

===========================================================

Introduction

A quick online search reveals a number of audio processors and synthesizer designs (both academic and commercial) that use FPGAs for sound generation and audio processing. While some of these projects are open source, the vast majority lack in documentation or come with licenses that are not very permissive.  

Presentation

The purpose of this project is the development of a test bench and a collection of Verilog modules for a FPGA-based, musical synthesizer that uses subtractive synthesis for sound generation.

Subtractive synthesis is a classic method of synthesizing musical sounds. The idea is that a waveform with lots of harmonic content is processed using filters that subtract unwanted frequencies.

The signal path for a simple subtractive synth consists of an audio oscillator, a filter and an amplifier. The audio oscillator can generate sine waves, saw waves, square waves or other forms of waves with different harmonic components. To create more interesting sounds, low frequency oscillators are used as modulation sources. The amplitude of the signals can be controlled with amplitude shapers. Signals can be mixed or further processed in dedicated blocks along signal paths.

The next figure depicts the block diagram of a synth that uses an Arduino board for implementing functionality related to user interface and controls and a Cmod S7 board for audio generation and processing.

image

Objective

The object of the project that makes the subject of this blog is not the development of the synthesizer itself but rather the implementation of a test bench environment and a collection of general, reusable Verilog modules that would facilitate the development of such a synthesizer. Although I will be touching at times on the communication between Arduino and Cmod S7, this blog will be focused on my experience developing Verilog code using Cmod S7. 

Because I don’t have significant experience in implementing designs using Verilog, an important item for me to investigate is the benchmarking of the Cmod S7 board. In simpler terms this can be rephrased as: “I would like to find out if Cmod S7 is suitable for this specific audio application or if a more powerful board (in terms of FPGA, RAM memory, etc.) is needed”.

The project is developed on two platforms (Arduino and Verilog), so another item to consider in the long run are system configuration tools (graphical or text-based) that would allow dynamic configuration and inter-connection of Arduino with Verilog modules both at compile and run time. 

Design Principles

Since I have limited practical digital design experience and I will be working in “exploratory mode”, I am going to list here a few guiding principles: 

  • all UIs and user controls are implemented on Arduino 
  • Cmod S7 is responsible for all audio generation and processing
  • audio signal blocks (oscillators, filters, LFOs, mixers, amplitude shapers, audio processing blocks) are implemented in Verilog
  • each synth block is controlled by an Arduino module that can set, change or modify synth block parameters
  • all Arduino development is done (if possible!) using Arduino IDE rather than embedded C

In the course of the project, based on my acquired experience, I will revisit the Design Principles section to update and comment. 

Note1: 

There is a XADC core within the Spartan-7 which is a dual-channel 12-bit analog-to-digital converter capable of operating at 1 MSPS. In theory, this A/D converter could be used to read values of parameters from potentiometers (in conjunction with a simple mux logic with inputs from potentiometers driven from the FPGA). The FPGA could also be used to display parameter values on LED displays (one digit 7 segments), in which case there is no need for Arduino. This might work for simple designs (e.g. square wave PWM tone generation), and I will take the time to look into it.  

Changelog:

01/30/2022 - added Note1 



  • Sign in to reply
  • a33333
    a33333 over 3 years ago in reply to DAB

    The kind of measurements I am mostly interested in are related to the cost of implementing various audio blocks in the FPGA (e.g. how many slices, clock management tiles, DSP slices, wave table memory, are needed to implement various types of oscillators, filters, amplitude shapers, etc.). Since I am just beginning with FPGA programming, I have no idea how expensive it is to implement such blocks in hardware. I took a few courses in digital design and DSP, but that was a long time ago and there is a lot of brushing up I have to do. When I used the word “test bench”, what I had in mind was a development and test environment where I can wire together different modules  along a signal path to try things out, something similar to a modular synth. There are a lot of moving parts and there are things I do not know or understand yet. I plan to revisit the blog from time to time and update it with things I learn. I am actually not even sure this project is within my abilities but for me this is first of all a learning opportunity. I hope this project will keep me motivated to learn FPGA programming and have fun at the same time.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 3 years ago

    What are your measurement parameters for determining which is better?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube