Sigma Delta Audio Mixer

sigma delta audio mixer design example by Triad Semiconductor

Sigma Delta Audio Mixer Design Example 

Triad Semiconductor helps companies obtain ASIC integration benefits (improved cost, lower power, smaller size, improved manufacturability,…) by integration your mixed signal electronics into Triad’s Agile ASIC™ solutions.

This design example walks you through the creation of a high-level mixed-signal design of a sigma delta audio mixer. The design is implemented in Triad’s ViaDesigner™ integrated ASIC design environment. 

ViaDesigner™ – Mixed Signal ASIC Design Environment

ViaDesigner combines Schematic capture, Spice Simulation and mixed-signal design entry. ViaDesigner also includes a complete Verilog, VHDL and Digital Simulation environment. Those two worlds are brought together with a VHDL-AMS modeling and a Mixed Signal Simulation Engine. More information on ViaDesigner.

Sigma Delta Audio Mixer Design Video Tutorial

Video Transcript for the Sigma Delta Audio Mixer Tutorial

Let’s look at today’s problem. How can I mix together three analog signals?

VIN_A, VIN_B, and VIN_C and I want to sum them together and come up with an analog waveform that represents the summation of those three signals.

I could do an analog only mixing circuit where I have the weighted inputs for a summing stage and a feedback resistor and basically the three sine waves, we then sum them together as this Inverting Summing Op-Amp.

I could run output through an Inverting Op-Amp Stage and have a V-sum output that represents the summation of the three analog inputs.

Mixed Mode Simulation (Analog & Digital) Using VHDL-AMS

Let’s look at doing it a bit more Rube Goldberg today. Why? I want to show you a way to sum those three analog inputs together using different design domains: analog, digital and a mix of design approaches so that you can see the true capability of ViaDesigner.

In our analog-only mixing circuit, we take those three input Sine waves, sum them together with an output waveform or we could do a sigma-delta mixer where we take the three analog signals, we then digitize them through sigma-delta modulators.

Sigma Delta Modulator Wizards

The output of those sigma-delta modulators will be one-bit serial bit streams with the 1’s density in those serial bit streams representing the magnitude of the analog waveform. Take those digitized signals and run them through a summing circuit. We would then have a two-bit representation of the summed together signals.

Run that back through a DAC and then output that through a smoothing filter or a low-pass filter. Come out with an analog waveform which represents the summation of those three input signals. We can implement this first section of sigma-delta modulators using mixed signal wizards. We can implement the digital section by schematic or we can enter that function as a VHDL-RTL design.

Digital to Analog Converter Design

We will handcraft a mixed-signal circuit for the digital to analog converter. Then we’ll use an analog wizard to create the analog smoothing filter.

Using the ViaDesigner Mixed Signal IDE

Let’s go over into ViaDesigner itself and take a look at how we would do this design and we’ll take a look at how would we design a sigma-delta data converter inside ViaDesigner.

Top-Level Design

Inside ViaDesigner here, we have a top level test bench or a top level test bench representing our ViaASIC (configurable ASIC) circuit that we’re looking to create. Its stimulus, the three sine wave generators we were talking about, a clock source, the ground reference and then our 3.3 volt AVDD power supply.

Let’s push inside our ViaASIC circuit here to see what would be inside the device or the chip. Here we see a schematic that’s a close approximation of the block diagram we had in Powerpoint.

On the left, three sigma-delta modulator converters, a digital mixer circuit, a two-bit DAC circuit, and a smoothing filter. Later when we build a two-bit DAC, you will also need an analog reference circuit to generate the analog levels for that DAC.

If you want to design a sigma-delta editing converter inside ViaDesigner, how do you that?

Sigma Delta Modulator Design Using a ViaWizard™

From the library in ViaDesigner, over here we have ViaDesigner Wizard Library and go and select a sigma-delta A to D converter wizard block. We’ll bring that up on the schematic and that invokes a wizard form that you can go in and fill out. Here we see it is setup and it’s running off a 2.048-Mhz of clock with a 4-khz signal bandwidth.

Here’s our desired signal-to-noise ratio. We’ve specified what our positive voltage reference and negative voltage reference for the data converter will be. Basically this has the input … analog input signal will be swinging between this positive reference and this negative references. We will be digitizing that through the sigma-delta modulator based off of these reference voltages.

We have a decimation rate of one set up, which means that the output here will be a 1-bit serial bit stream out of this 1-bit quantizer. We could go in here and change that to let’s say 1024.

Now as we see up here, the wizard has changed it so it’s a 16-bit output. It’s got a decimation rate of 1024. We can pick which kind of decimation filter we want or we can change our output bit width from 16-bit to 20-bit to 24-bits. It’s a sigma-delta modulator with a built-in decimator, decimator and decimation filter.

Let’s go back and switch this back to a 1-bit serial output. Basically now, the analog input comes in, goes through an integrator. A 1-bit quantizer and the output is fed back through a 1-bit DAC. This output digital bit stream is an oversampled serial bit-stream representing in digital domain our analog wave-form.

Basically to create the three A to D converters, we’ve used three instances of the sigma-delta wizard and configured them all the same. Now, to sum these three 1-bit serial bit streams together, we need an adder which takes in a single serial bit stream, adds the signals together and comes out with a summation which is a 2-bit vector.

Mixer Circuit Designed in VHDL

Let’s push down inside the digital mixer circuit. We see here there’s not a schematic representing it. Instead, it’s represented by VHDL. ViaDesigner is not only a schematic editor but it’s also a VHDL and Verilog design environment. Here we’ve got a module or with the ports A, B and C are digital inputs.

B0 and B1 are digital outputs and we’ve simply done here the combinatorial logic to sum together those digital inputs and come out with the vector B – B1 through B0 representing the 2-bit sum of those inputs. Jumping back up to this higher level and then moving over, if we want to convert that back into analog, let’s a 2-bit DAC that we will design by hand.

Schematic-based Design of a Digital to Analog Converter (DAC)

Now, nobody should get too excited about a 2-bit DAC but it’ll show that you can use wizards where you want to inside ViaDesigner. In fact there are DAC wizards that we could use. We could bring up a DAC wizard and configure a DAC using the wizards. Here’s a Voltage DAC or a Current DAC, the DAC can asynchronous or a clock. How many bits, 18 or 12?

We could generate a DAC and we could use that DAC in our design. When you want to do bare metal or by hand design inside ViaDesigner, you can. Here, we’ll push down into this DAC block, push the schematic. As we see in here, this circuit is now made up of individual components that we’ve created by hand.

We’re building a 2-bit DAC out of combinatorial logic, registers and switches. Now, all of these elements are themselves wizards. This is an analog logic wizard. Let me zoom in and show you. This block, we instantiated from the library over here, the analog logic blocks and we picked which … what is a buffer, an inverter, a 2 input NAND Gate, NAND Gate or Gate, etc.

We’ve got that … those resources all configured here. We’ve configured another analog logic block as a D flip-flop. Here are the elements that where we actually convert is digital signal into analog, we have four analog switches and that’s what we’re using to turn our 2-bit inputs into four analog levels on the output.

Sigma Delta Modulators Push Noise Out of Band

Doesn’t sound like we’re going to get very good results with a 2-bit DAC but because we’re using sigma-delta modulators and the signal is oversampled to such a degree, the noise that’s associated with this 2-bit DAC is up at a very high-frequency range, we’ll be able to filter that out with a simple continuous time low-pass filter to get a smooth analog output which is a good representation of the summed input.

Now as you’ll note here, when we’ve created this 2-bit DAC we do need to create the four reference levels that will drive this DAC so that we could create our analog output. We’ll go back up here and then go back up to the core level.

Here’s our 2-bit DAC. We need to then create a reference circuit. Let’s push down to the schematic level here. Right-mouse click on the reference block. Push schematic. Now we have a circuit where we’re generating the references for the DAC. We’ve built this out of a Band Gap and a Band Gap is a wizard out of the wizard library. We can run the wizard on that.

Band Gap Voltage Reference

It’s already been configured. It’s a Band Gap voltage output. Basically what a Band Gap is it provides a typical output voltage of 1.21 volts with the ability to provide that constant voltage over a wide range of temperature with the device it would be exposed to.

It gives you constant voltage source regardless of environmental temperature issues. It’s not perfect but it does do a good job of providing a high-quality reference inside your chip which will be somewhat unaffected by temperature and power supply changes. Not 100% true but it is good for a first order approximation for what we’re doing here.

This is a good way to get VBG or the band-gap voltage as a solid reference to use in our circuit. Now we’re taking that reference voltage. We’re running it through this differential off-amp circuit and this differential off-amp was created running the wizard on the amplifier, selecting a differential amplifier with General Purpose style, giving us these kinds of specs.

Running it through this divider tree, we come out with our different reference voltages. I’m back up to the core level. We can see we came in to the sigma-delta A to D converters, went to the digital mixer, came up out with the DAC and now this output of this DAC is going to be pretty noisy because it’s a 2-bit DAC running at our oversample clock.

Oversampling Clock for Sigma Delta Modulators and DACs

We’ve got the clock net coming into the sigma-delta A to D converters, running at 2.048-mhz. That’s the same clock that’s being used to run this DAC. With a 4-khz signal bandwidth coming into here, this A to D converter signa-delta modulator and DAC are running at a much higher frequency than the bandwidth of interest.

Smoothing Filter

Here, we just need a smoothing filter that will knock out those high-frequency components. We run the wizard on the smoothing filter. Continuous time, low-pass filter. Here we’ve got the different Corner Frequency set up, the Filter Order and we can look at the Transfer Function.

Let’s look up this type of a Transfer Function for the filter with those settings. If we wanted to, we could go in and make it a sharper filter. Like that. I want to … I want even more. Let’s change this into something ridiculous. Here, it’s warning us that we’ve exceeded the value of 10. Wizards even have built-in into them known good design practices.

We’ve asked for a performance value. That’s not something reasonable to realize. If we look down here, the tool is showing us that this is a millimeter squared area inside the chip. The filter we’ve asked for is starting to get pretty big.

If we could go back down and make that something reasonable again, it goes back to a much smaller area. Let’s take this back up to 14 like we have and then go to a switched capacitor implementation.

Not only now is it giving us a warning that we’ve exceeded the recommended value, it’s actually told us that we’re … we’ve chosen some design requirements for this filter which would actually make it unstable and not something that could be realized well inside a ViaASIC or any given CMOS circuit implementation.

green sine

Photo courtesy of bdu(CC ShareALike)

Compiling and Simulating the Sigma Delta Audio Mixer

We’ve just been a little too extreme with our requirements. Let’s back off of those again down to something more realistic. Compute the values and then we’ve got that set up. Now we’ve set up our circuit. We should be able to go back up to our top test bench. Go up here to the Simulate Design. Select Simulate Design. It’s compiling the design.

We’ll see down here it’s extracting the waveform list. Now it’s says, “It’s brought up the simulation control.” We can select time domain analysis. We can run for one millisecond. We’ll launch the simulation. If we see down here, the simulation is running. It’s going to take a little while to run.

You may think, “Well, that’s not going as fast as I wanted it to.” If this was a SPICE level simulation and you wanted to run three sigma-delta modulators, coupled with a VHDL digital object, coupled with a hand-drawn DAC circuit and then a fifth order lowpass filter, it would take days to run if it ran at all in SPICE.

You’re likely to do a core dump on a machine if you try to run that big of a SPICE level simulation on a SPICE simulator. Here, we’re already 30 percent complete on this simulation. It’ll take it a couple of minutes but let’s go and get started.  I’m in the waveform viewer here so I can drag signals out of my waveform list over into the viewer. My A input, my B input, my C input. Those are what’s being applied to the design.

Sigma Delta Audio Mixer Simulation Results

Here’s my clock inputs. Here’s VCM – the common mode voltage. All of these signals are being input to the design swinging around that common mode voltage (VCM) . I can dive inside our actual ViaASIC design. I’ve now pushed down in there. Here’s my AVDD power supply input, my AVSS, the positive voltage reference for the data converter, a negative voltage for the data converter.

Zoom in on this section. Now my outputs of the sigma-delta modulators, the digital outputs, so there we have the three digitized representations of these analog waveforms. I can group select those. It won’t mean a whole lot to us here but the Bus B now B0 and B1, that’s the summation. The digital domain of these three analog waveforms, they’re represented by SD_ A, B and C signals.

What does this look like coming out of our 2-bit DAC? The DAC has a signal that looks pretty much like this. Pretty noisy signal that’s coming out of there. Like I said, it’s just a 2-bit DAC but it’s a 2-bit DAC running up in the megahertz range and we’re only interested in the signal bandwidth down around the 4-khz range.

Sigma delta audio mixer FFT results

Photo courtesy of itsbth(CC ShareALike)

FFT Results for the Sigma Delta Audio Mixer

Let’s jump back out of ViaDesigner and look at the Powerpoint for a minute because I didn’t run the FFTs here in this simulation. I’ve done them in a previous session. I’ll show you what they look like. Here’s the output of our DAC with the noise that we saw coming out of that DAC.

If we were to look at the frequency response of that DAC, our sine waves sure enough are down here in the plot, in the frequencies of interest. We have three prominent peaks in the frequency response. This is the noise that has been shaped by the oversampling.

Basically, this high frequency noise has been pushed up in the frequency bands by the sigma-delta modulator. If we then take that signal that came out of the DAC and run it through our smoothing filter, we’ll get a smooth output waveform that looks like the summation of those three analog signals.

In fact, the frequency response, the FFT of those three signals then shows at our frequencies of interest from the sine waves that we had, we now have a very clean representation … we have very clean components of the sine waves that make up our output signal with the noise pushed way down in the output waveform.

Let’s go back over into ViaDesigner into the waveforms and now let’s pull up our actual filtered output. We can see that the output really represents the summation of the analog input signals. We can clean up more or we can get rid some of these signals so that we’ve got more room.

We see here our analog input signals, sine waves and then the summation of those three sine waves coming in the output. What we’ve shown here inside ViaDesigner, you can do design entry and simulation the way you want to.

This sigma delta audio mixer example utilized Wizards for sophisticated sigma-delta editing converters, handcrafted VHDL for digital mixing, handcrafted analog circuits where you want and then use wizards for things like filters wherever you’re interested.

Get Cloud based ASIC design with ViaDesigner by Triad Semiconductor…