Mixed-Signal Circuit Analysis with MATLAB
Overview
The design and verification of mixed-signal integrated circuits are becoming increasingly more complicated, due to the high complexity of integrated functionality and algorithms. Circuit designers often face the dauting task of processing large sets of simulation or measurement data to extract failures and debug problems. The size of these problems has become so large that analyzing a mixed-signal system is like searching for a needle in a haystack.
Mixed-Signal systems designers need efficient tools to analyze performance in the time and frequency domain. For example, designers need to accurately measure phase noise, timing information, as well as integral and differential non-linearity for data converters.
In this presentation, you will learn how MATLAB can be used to process circuit simulation and measurement data using built-in functions that combine ease of use with fast and accurate results. Without becoming a software programmer, you will see how MATLAB can speed up the analysis of large simulation data sets, and automatically create reports capturing the performance of your system.
Highlights
- Mixed-Signal Analyzer app to interactively inspect circuit simulation data
- Built-in analysis functions for measuring analog impairments
- Integration with Cadence Virtuoso ADE-Assembler
- Automatic report generation
About the Presenter
Andy Zambell is a Sr. Product Marketing Engineer at MathWorks. He started his career as a high school physics teacher and after teaching for three years, he changed careers to become a Signal Integrity Engineer. He was a Signal Integrity Engineer at FCI USA LLC and Amphenol for a decade where he specialized in the new product development and customer support of high-speed backplane connectors. He also was involved in the development of industry standards such as SAS-3, IEEE 802.3bj, IEEE 802.3bs, IEEE 802.3by as well as several Optical Internetworking Forum Common Electrical I/O standards.
Recorded: 23 Sep 2021
Hello, everyone. My name is Andy Zambell, and I'm in product marketing in the mixed signal and signal integrity areas here at MathWorks. I'd like to thank you for attending this webinar, Mixed Signal Circuit Analysis with MATLAB. Our goal here at MathWorks is to make MATLAB and Simulink the preferred platforms when it comes to designing, analyzing and verifying mixed signal circuits and systems.
In this webinar, I will briefly introduce you to the mixed signal block set and then address pain points that the mixed signal analyzer app was designed to alleviate. After that, I will walk us through a demonstration using the mixed signal analyzer app. Finally, I'll recap everything and show you where more information can be obtained and then answer any questions you may have. So let's get started.
So let's briefly go over a few highlights of the mixed signal block set. For instance, you can see here you can model flash and successive approximation register analog to digital converters. But perhaps you want to go in the other direction. You can model a binary weighted as well as a segmented digital to analog converter. You could also design a phase locked loop system starting from foundational blocks or use a built-in reference architecture.
You can simulate and analyze the PLL system to verify key performance metrics until you meet the system specifications. You can also do a bottom up approach by providing specifications and impairments for each block and then connect the blocks to represent architectural models. Alternatively, you can do a top down workflow and start from complete system level models of typical converter and PLO architectures, then customize those models until you meet your system specifications.
You can use measurements and test benches throughout the design process of your converters and PLLs verify the specifications of individual blocks or of the whole system when imperfections like phase noise, nonlinearity, jitter and quantization effects are added.
New for 2021B are the delta sigma modulator and the operational amplifier. Now, you're able to design a feedback or feed forward delta sigma modulator with a cascade of integrators or resonators to model ADCs of orders two through six. You can also design a double pole op amp from circuit parameters or a multiple pole op amp from a transfer function. All of these models can be used to simulate mixed signal components together with complex DSP algorithms and control logic.
Rapid system level simulation using variable step Simulink solvers lets you debug implementation and identify design flaws without having to simulate the IC at the transistor level.
Now with that plug for some of our other features of the mixed signal block set out of the way, we can talk about the mixed signal analyzer app. The purpose of the mixed signal analyzer app is to allow you to visualize, analyze and identify trends in mixed signal data and do so quickly and to do so easily.
Let's briefly go over the post processing workflow of a circuit simulation as it stands today. And then compare that workflow when using the mixed signal analyzer app. The post-processing workflow for a typical integrated circuit designer using Cadence Virtuoso begins after a circuit is built and simulated. So let's start there. The first step in the post processing journey typically begins by getting the data out of Cadence Virtuoso and into a spreadsheet.
This is done by manually saving the simulation run as a CSV file. From there, you manually set up your graphs to look at the various waveforms and trend charts. If you have multiple simulation runs, repeat the previous step for each one.
When you have all your graphs done the way you like them, you manually copy and paste them into a report. Then you must repeat this process again and again for each circuit simulation. As you can see, this can be a manual and thus time consuming process.
Now let's go over the workflow when using the mixed signal analyzer app. This is done by opening MATLAB directly from Cadence. When doing so, simulation data is automatically brought into MATLAB, so you don't have to worry about manually exporting and importing any databases.
Perhaps you have multiple simulation runs. This isn't an issue since everything was brought into MATLAB automatically. You can compare them using the built-in analysis functions or create your own functions with just a few mouse clicks. When you're done, you can easily export a report that contains all the graphs and charts you created, so you don't have to worry about copying and pasting anything.
This process can easily be replicated again and again using the app. You can replot the same graphs you just created but with a new data set. Then all you need to do is export the new graphs and charts into a new or existing report. The goal of the mixed signal analyzer app is to streamline post-processing of circuit level simulation data. Let's look at all of this in action by way of a demonstration.
Let's start the demo by looking at the schematic in Cadence. What's being simulated here is a low dropout voltage regulator or LDO. Looking at this from left to right, over here on the left we have the input. Here in the middle we have the op amp. Up here we have the compensation network. And down here at the bottom we have the feedback loop. Over here off to the right is the output. And even further over here to the right is the load that the LDO is going to be driving.
Now let's say one of my goals is to understand the effects of process voltage and temperature, or PVT, on the LDO output across a few corners. I'm also interested in the load regulation as my low current varies from 1 milliamp to 10 milliamps. So the goal of this demo is to process all of this data from Cadence in the mixed signal analyzer app. Moving back to the Maestro, we can see we're doing a DC and transient analysis. If I scroll down a little here, here is my corner set up. I got three temperatures, I got three supply voltages, I have two low currents and I have four combinations of fast and slow process corners.
So normally, I would click Run here. But as you can see, I've already run this simulation. So instead, I'm going to jump right into MATLAB. I'm going to do that by coming over here and clicking on the blue M where it says Open MATLAB. So as this opens, kind of explain real quick that this is a nice feature that Cadence put into Virtuoso so you can easily move back and forth between Cadence and MATLAB when you so desire. Also, as the MATLAB is opening, you'll eventually see over here in the workspace that the AD info object is brought in automatically as it opens.
So you can see it right there. So from here, you can either type in mixed signal analyzer to open up the app, or you can come up here to the Apps tab, click the little down arrow, scroll down a little bit to the Signal Processing and Communication section, and right there is the mixed signal analyzer app.
So if you wanted to work in this Linux version of MATLAB and the mixed signal analyzer app, you could do so. Or, if you chose to work elsewhere, you can export this AD info object out as a mat file, and then take that mat file and work wherever you want. So as you can see, if you look over here I've already exported the AD info object as a mat file so I can work doing this post-processing in Windows on my laptop here.
So here I am in the Windows version of MATLAB. I can click on the mixed signal analyzer app or type in mixed signal analyzer. I've already opened it so here it is. So what I'm going to do now is I'm going to import the data. So you can import a generic database as a CSV file. You can import the AD info database as you could in the Linux version. Just click on that and then point to the info or the database. But I'm going to do a mat file.
So as you see, I have the AD info specific mat file here. A little LDO at the end so I know what it is. Then I click Open. So as this is opening it's bringing in all the data and everything. And as you can see, you have all your data here. You have your transient analysis, your DC analysis and your output voltage VDC here. So from here, I'm just going to create a plot. Click over here and click on the LDO out and click Display Waveform and see what I see.
So it's plotting everything for us. And then over here on the right under plot options you can see all of the different corners that were solved, all 73 of them here. If I scroll over a little bit, you can see the different corners, you can see the different current loads, you see the different corners there, you can see the different temperatures, supply voltages, and finally VDC.
Let's pretend that I only want to look at those with a temperature of 125 degrees C. So I'm going to go over here, Click filter, this little window pops open and I click there and I uncheck everything but 125 degrees C and click OK. And then what it's doing is it's removing everything but the 125 degree corners. So as I scroll up and down you can see that all of the ones that are left are at 125 degrees C.
What I'm going to do now is I'm going to rename this plot. Move this over. And this is the transient one. LDO out. And I'll put 125 C. And then hit OK. So now it says what it is up here so it's a little clearer for later on. I'm going to create a new plot, plot number two. This time I'm going to plot the current load. And this time I know I'm only going to want to look at the 125 degrees C data so I'm going to go up here to filter and the same little window will pop up. And I'm going to filter out everything but 125 degrees C just like I did before and then click OK.
And in doing so it will plot everything or it'll only plot the 125 degrees C data. So it's pretty much exactly what I just did but I filtered everything out before I plotted, whereas before I filtered it out after I plot it. So you have your choice. So again, I'm going to rename this plot here. Move this over. And this one will be again, transient, current load, 125 C.
Just so I know what I'm looking at later on. Let us create another plot. And just to demonstrate some of the analysis functions, the built-in analysis functions, let's take a look at that transient current load using one of these analysis functions. So I'm just going to scroll down here and square seems pretty simple enough. When I do that, underneath the analysis waveform section over here I see square, transient current load, so then I just click Display Waveform.
And then that'll plot. Since I didn't do any filtering before, it's going to plot all of them. I can filter afterwards just like I did before. Let's only look at the 125 degrees C data. Click OK. It'll filter everything out but 125 degrees C. Then if I go back and forth you can kind of tell if you do the math in your head that these are getting squared. So these functions or these waveforms are the square of these waveforms.
So again, I'm going to rename this plot so I know what it is later. Bring this over. Transient, current load, 125 C. And I'll throw the word square at the end so I know what it is. So there you go. So that's a demonstration of the built-in analysis functions. If I wanted to create my own, I would click Add Analysis. This little window will pop up. You give it a function name, whatever it is you would want to give it. Say if you wanted to multiply by say 10, something like that, give it any function name you want.
You can then also indicate the number of input waveforms, one or two, and then the number of input parameters. And then you say Create Analysis. So what opens up here is the MATLAB editor. You type in your custom code there. So in this case, y out is equal to y in times 10. So there you go. So now you've created your custom analysis function. Hit Save. I go back to the mixed signal analyzer app. And then if I click here and then I scroll all the way down the bottom, you can see that my custom analysis has been created.
So I can then apply that to one of these waveforms like I did before. What I'm going to do now is actually I'm going to create another plot. And I'm going to look at a trend chart. I'm going to look at the trend chart of the VDC here. So I click on VDC and I click Trend Chart.
So this trend chart opens up. It gets plotted here. Over here, again, plot options you see all of the different corners are here. Your different trend chart fields. We're looking at the VDC. VDC is on the y-axis. Everything down here is on the x-axis. So you got your different corners, you have your supply voltage, you take your temperature. I'm going to separate out the corners. So I click that little down arrow. And then that separates out all the different corners-- your fast and slow and whatnot-- so you can look at them all separately.
I'm going to add in the current load as well. So you can kind of see some trends going on here as things go. As the voltages increase for the same temperature and the same current load the VDC increases. And so you can kind of look at the trends here as you go from left to right. You can change this around however you want. Make it the way you want it to look. And then when you're done, I'm going to change the name here.
This one I'm going to make it simple, VDC. Click OK. Now I have my four plots. So let's pretend I'm done. I'm done creating all of my plots. And I want to export a report. So I go up here to Export. I click the little down arrow. Export to Report. And this little window will pop up. So you get your choice of PowerPoint, PDF, Word Doc and HTML, however you want to do it. Create your report. I'm just going to make this LDO report. And it gets generated where you're pulling your data from.
So I'm going to hit Generate. And that report will get created. And then If I look in the folder that I've been working out of, there's my report. I open this report up. And if you look, you can see all of my plots that I had just created. And the reason why I wanted to name everything, all the plot names get brought in as well, which makes it convenient just in case you happen to forget.
So there's my report. I'm going to hit Close. Minimize that. Let's say you're going to be doing this a couple of times. What you could do is come up here and click Save Session. You save it and this gets saved as a math file. So the next time you create say another LDO voltage regulator and you want to regenerate these exact same plots, all you do is open this session again that you've just saved and you'll be able to automatically generate these exact same plots again.
So I'm going to demonstrate that here. I'm going to open a session. Here's a session that I created a little bit ago. So it's opening this session. What was simulated here is a little different than what I simulated before. This is a clock buffer. So it's automatically generating the waveforms and trend charts that I had created earlier.
And then what I'm going to do is I'm going to bring in a new data set. And this is to demonstrate that you can use these sessions as a template when you obtain new data. So as you can see, I have created all these waveforms already and trend charts. So there's a waveform, there's a trend chart, there's another trend chart. So What I'm going to do now is come up here to where it says Update. I'm going to update using a mat file. Click that.
So all of those plots were created using Clock Buffer 1. I'm going to use Clock Buffer 2. Click Open. And all of these plots are going to get regenerated as soon as I choose to do so. So it's asking me, hey, do you want to update what you already have with what you're pointing at? The answer's Yes. So I click Refresh. So let's bring in all that new database, all that new data, and it's going to regenerate all those plots for me. And if you happen to remember what the original ones look like, you can be able to tell that these have changed somewhat.
It's doing its thing. It's replotting everything. Updating all the charts. And then when it's done, you can see that everything was created using new data. And up here it says Clock Buffer 2. So there's that. I'm going to jump back to the Cadence Maestro.
If you happen to have done all of that in Linux, as you clicked the MATLAB button out of Cadence Virtuoso, if you come back over here to where it says Documents, if you were to create a report and export it, it also gets added to this Documents section in Cadence, which is kind of convenient. So anything you've created from the mixed signal analyzer app gets exported right here as well. If you're doing it in the Linux version.
So that wraps up the demonstration. I'm now going to recap what we just went over in the demo before we conclude the webinar and answer any questions. So let's recap what we just did. From Cadence Virtuoso, we can open MATLAB just by clicking on the blue M in Cadence. A little caveat, this does require that you have the Linux version of MATLAB installed since Cadence Virtuoso only runs on Linux.
When MATLAB opens, if you look at the workspace, the AD info object was brought in for you. You don't have to do anything special to bring the simulation data into MATLAB, it's done automatically. The mixed signal analyzer app can be opened either via the Apps tab or by typing in Mixed Signal Analyzer in the command window. Once the app is open, you can begin working.
If you need to perform your analysis elsewhere, you can use the Linux version of MATLAB, the one that was opened via Cadence, to export data from a specific AD info object or you can extract all of the data from the ADDIE info object as mat file and then use MATLAB on whichever operating system on whatever computer you want.
After the data has been brought into MATLAB and the mixed signal analyzer, you can display the waveforms and use 40 built-in analysis functions on the data. So when you want to look at the data in a certain way, you don't have to worry about writing any code, which is nice for those that don't like to or know how to code in MATLAB.
But for those that do enjoy coding however, you can add your own functions by writing them out in MATLAB. This feature gives you more flexibility to analyze one or two waveforms however you want. Next, you can look for trends in the data just by clicking the Trend Chart button. Since you may be looking at many variables like temperature, voltage, and so on, you have lots of freedom to set up the charts how you please in the hierarchical categorical chart.
After you create all your plots and graphs, you can easily export a report. This can be done just by clicking the Export button. And you have your choice of PowerPoint, PDF, Word document or HTML. Also, if you did your work in the MATLAB and mixed signal analyzer app that was open via Cadence, the report generated will also be placed in the Document section in Cadence.
Lastly, if you had another data set and you want to create a similar report by plotting the same charts and graphs, this can easily be done. By using the Update button, you can choose another data set to import. Then, all the plots that were created in the first data set will be replotted with the second data set. As you can see, the two charts are plotting the same metric. In this case, it's a trend chart of a delay. But the chart on the left is the original Clock Buffer 1 data set and the chart on the right is the new Clock Buffer 2 data set. Same delay metric but with a different data set and all done without having to recreate the chart from scratch.
So in a matter of minutes, you can create several reports all showing the same plots but for different data sets, just by using the Update button. And with that, we've reached the end of the webinar. Before we go, I'd like to point out some resources we have to help you get started with the mixed signal block set and the mixed signal analyzer app. Please go to MathWorks.com and go to the mixed signal block set product page, which will provide you with a summary and links for everything we have in the block set.
Go to the mixed signal blocks at documentation page for detailed information and examples on the various blocks in the mixed signal block set, as well as information on the mixed signal analyzer app. Finally, be sure to check out the mixed signal system solutions page for information, as well as links to several great videos. I'd like to thank everyone for attending this webinar on mixed signal circuit analysis with MATLAB. Once again, Thank you for your time. It's much appreciated.