Mixed-Signal Design with MATLAB
The design and analysis of Analog/Mixed Signal Designs have become increasingly challenging with analog impairment effects in modern semiconductor technology nodes and with the integration of complex embedded digital signal processing and control algorithms. Thus, accurate modeling and rapid system-level simulation have become extremely important to be able to verify these designs before they go into production. In this webinar, we show how MathWorks tools can be used in modeling and simulating mixed-signal algorithms in different levels of abstraction. This session will demonstrate:
- the ability to describe analog parts of the system in Simulink also using linear and switched mode electrical networks.
- the ability to co-simulate together a design partially described in Simulink and Cadence® Incisive® (digital) and Virtuoso® AMS Designer (analog).
- using automatic to integrate the behavior of Simulink subsystems in the Cadence SystemVerilog workflow.
- the integration of MATLAB in Cadence Virtuoso ADE Explorer and Assembler to visualize and analyze the transistor-level simulation data from circuit verification. Also, we show comprehensive examples from the Mixed Signal Example Library, which provides a starting point to build a new design.
- Modeling approaches using Simulink
- Mixed-Signal Example library (Demo)
- Integration with EDA tools
- Model export
About the Presenter
Ganesh Raj Rathinavel
EMEA Application Engineer – Analog Mixed-Signal workflows
MathWorks – The Netherlands
Ganesh Rathinavel is the Application Engineer at MathWorks specializing in the Analog/Mixed-Signal (AMS) Design, within the EMEA region. He works from the Dutch office in Eindhoven and is responsible for increasing adoption of MathWorks tools in the AMS design domain. Before joining MathWorks in October 2018, he worked as a R&D Engineer at Interuniversity Microelectronics Centre (IMEC) & at STMicroelectronics, where he developed Mixed-Signal systems for NFC/RFID tags, Display drivers and Sensor Readouts. He holds two master’s degrees in Semiconductor Engineering and Physics respectively, during which he specialized in Analog Design and System modeling.
Recorded: 22 Sep 2020
Welcome to this MathWorks webinar titled "Mixed-Signal Designed with MATLAB." I've heard this event is run across quite a few different times zones, so thank you all for taking the time out to join. Just to introduce myself, my name is Ganesh Raj Rathinavel. And I work from the MathWorks office in the Netherlands as a pan EMEA application engineer specializing in our analog mixed-signal design and signal integrity workflows. I closely work with all of our semiconductor customers and partners in this domain.
This talk is intended to give you guys an overview of what is possible through MATLAB and Simulink when applied to mixed-signal design. Hence, this talk will be a broad stroke across many intricate features and workflows. My email ID is placed on the first slide. So in case you have any questions of today's presentation or need more information on something that you find interesting in today's talk, please feel free to send me an email.
Before we start, I would like to make a few logistical announcements. You will receive in a few days an email with a link of these slides. The examples and features that I will guide you through are based out of our latest release of 2020b, which has been released recently. I would strongly prompt everyone to upgrade to it if possible to make the most out of our tools.
Your phone lines are muted. Please post your questions in the Q&A panel, which is indicated by a question mark at the top of screen in your Webex window. At intermediate intervals, we will take a few moments to review these questions and have time reserved for a live Q&A at the end of the presentation. Please stay online.
Here is the outline of the entire talk. We will initially discuss to do a quick recap of some fundamental types of mixed-signal designs, which are developed with a well-defined workflow, after which we see what MATLAB, and more importantly, Simulink can be used to coherently construct a system design and see how that can be used later. We would then investigate some prominent modeling approaches that we can use within Simulink, and more interestingly, see some live examples of these approaches being deployed. In the second part, we look into how these system models can be used in multiple ways with other EDA platforms, and finally, discuss some dedicated solutions at this domain.
Just to do a quick recap of a few basic definitions for the broader audience here, when I say mixed-signal systems, I basically mean systems that have both analog and a digital subsystem, which might also be carefully coordinated together over an algorithm. These mixed-signal systems exist everywhere. The microprocessor, also considered to be the Holy Grail of artificial design-- modern-day chips have a wide range of unique mixed-signal components integrated within them.
Just to give you a few examples, a phase-locked loop or clock synthesizers are the beating heart of the entire system, as they create the timing schemes for all the operations. Such systems also have a high-speed I/O port, which is responsible to move around large volumes of data from a peripheral, which I will dive into much more detail next. While quite many mixed-signal systems are integrated together, an effective power management solution is also needed to create the right power supply inside all of these subsystems.
Another interesting example which is quite needed in modern-day technologies is to have an integrated thermal sensing solution which can typically control your clocking scheme and your power supply to converge the right balance for maximizing the performance when the temperature of the core goes up or down, while, of course, non-volatile memory and data converters are used to store configuration data and convert signals, respectively.
To have a closer look into the high-speed I/O ports mentioned before, we would subsequently call them SerDes systems, which is short for serializer deserializer, which is slightly a special case of a mixed-signal system incorporating some aspects of RF and DSP system. But typically, these SerDes systems attempt to push parallel data in a serial fashion at very high speeds, almost up to a few gigasamples per second. Also, in most cases, only the data is sent. And the clock has recovered or extracted from the data on the receiver side.
As you can imagine, electrical lines, when a binary or a quantized signal is parsed at such high speeds, there are bound to be some losses in the channel. And many RF effects make it much more tricky to decipher it in the end of the signal chain. Hence, a lot of engineering is done to design smart algorithms to immunize the signal to enter this channel, and especially while reading it back, which is done in the form of equalization algorithms. A few prominent examples are ethernet, USB, DDR, and PCI.
To have a quick glance on how these systems are made by a well-defined workflow for these different subsystems-- while, initially, when a new mixed-signal system needs to be designed for a certain functionality against a specification, there is a phase of performing system design to analyze and consider the right architecture for the system, after which, specifications for sub blocks are estimated and the system is then bifurcated or separated into distinct sub blocks. The algorithmic part is usually done in a language like C or C++. And the additional part is about creating an HDL-- either a verilog or a VHDL code to describe it.
The code is then fed into a semi-automated workflow to synthesize to get a gate-level description. And then a layout is made based on the area that is available, while on the analog side of the mixed-signal system, a schematic is constructed. And then a wide range of detailed SPICE-based verification is done, and which the layout is then manually laid out.
After all of these separate components are created in these distinct or separate workflows, later, their first partially merged and then later fully merged together. And a top-level verification test bench is needed to see whether, overall, the system works as desired. And this is where it gets quite complicated.
And it is considered to be one of the most time-consuming steps that happens in such a design flow. Once you typically notice a few corrections that need to be done in the top-level simulation, there is a huge amount of iterations that are done to change different subsystems. So hence, it becomes quite crucial to do system design effectively before anything is implemented.
Here is what we notice when we interact with a lot of our customers, is the fact that a lot of effort is spent in doing top-level verification. And it can be significantly lowered by emphasizing on creating the right specification for each block in the system design phase. Hence, the notion of shifting left or moving the verification much earlier in the design cycle is a strong trend that we notice. As different design strategies affect more than one requirement, rapid prototyping is also key.
However, the design space explodes as systems become more complex as embedded algorithms become ever-more increasingly congruable for to operate in different conditions. Finding the optimal design by the means of prototyping is also very time consuming. And it's hardly scalable.
And through our platforms, we create the space for enabling designers to do a good job in the system design development phase. By spending more time in developing system-level models in the design phase, you can gain much more insight, deeper insight in understanding the specifications and trying to verify alternate architectures. Also, with a lot of automatic code generation capabilities, we enable export of these models well coupled with the implementation workflows such that the entire design can be tied up to the top specification. The coordination routines between these distinct subsystems can also be anticipated well in advance.
Quite a lot of times, most design teams also find this a very cumbersome exercise, because this adds delay to the start of the actual implementation process. However, time spent in the beginning phase greatly pays back by shorting the implementation and the verification phase. In this talk, most of the features shown in the right is what we will look in a more detailed fashion in subsequent slides. As summarized by Kundert and Chang, inventors of the Cadence tool inspector, profess in this article that top-level design, especially implemented with MATLAB and Simulink, can be greatly beneficial in managing complex mixed-signal designs.
So what do we mean by top-down design? We basically mean to incorporate a central modeling-based design approach, in other words, leveraging the part of behavioral modeling. And how this is done is we start off with a very simplistic abstract-level model and then later keep incorporating imperfections in to estimate the right specification.
And why is Simulink perfect for doing all of this? Simulink creates the notion of time and has an extremely sophisticated time-handling engine which gives it a lot of speed in computation of these time-domain simulations. Simulink also has a huge legacy to be used in designing feedback networks. And it can be also quite easy to create multi-domain scenarios, as you can choose between a wide range of modeling approaches. More importantly, it integrates well with mainstream implementation workflows, which we will see later in much more detail.
A few modeling approaches you can use within Simulink are you can describe your model through sequential code or create a signal flow schematic from blocks in the exhaustive Simulink library. Also you can assemble a physical model, which is very similar to what has been done in SPICE, when which you can create parts of a system with a circuit. Also, another prominent workflow is to be able to create flowchart-based definitions of a finite state machine.
Over the past decade almost, we have been supporting our customers with a wide range of examples in a library, which touches upon all important design products that I spoke about in the first phase of this talk. It is quite a good compilation of PLLs, ADCs, switched-mode power supplies, and of course, SerDes. Systems. I encourage you guys to have a look by going through the link below the slide if you're using an older release or through the Add-on tab on MATLAB if you are using a release that's much more recent.
Let me open MATLAB and quickly show you a few key examples to illustrate these modeling approaches from the library. Go to Add-ons. And type mixed-signal blockset models to arrive at the right install link for this library.
Here is a model of successive-approximation-based ADC. Here you will notice the type of solver picked in the simulation by default is a variable-step solver. In this architecture, there is a tag in the feedback loop to converge at the right output quantization level, while which the inputs are twin sinusoid signals which are placed as a stimuli for the system.
The logic part of this system is in the feedback loop described as a pseudo code within this block, which is correlated based on the signals that actually drive it and the transitions based on the construction of this diagram. This block can be easily transformed as HDL code when needed for implementation, but is also extremely easy to share among other colleagues to get a better understanding if there are more than one people contributing to this particular state machine.
Moving on to one of my favorite examples from this library is a buck converter from the SMPS catalog of this library in which a feedback loop attempts to drop 12 volts to 1.5 volts at the output. Notice that there are three main components in the system tailored with three different modeling approaches. The switching part of the system is defined with a physical model that switches capacitors and inductors, while the PID controller represents a transfer function. And finally, the clocking part is built purely from Simulink blocks.
This other block on the bottom does something extremely interesting, as it injects a small chirp signal along one end of the feedback loop and reads it out of the other side of the feedback loop to construct a transfer function while doing the transit analysis. Once we measure such a response, we can insert a state space representation to the measurement and then load the data to control system designer, indicating the difference between what is coming from the PID controller and what is coming from everything else in the system. On doing so, we can in fact modulate the coefficients of the PID controller to improve the stability of the entire loop.
This can be automatically done by asserting specifications as well. Once we have these new values, we can later feed them back in the original design and verify this change in the entire transient simulation, hence making it very easy to tune components like this in a feedback loop mechanism. Here are the official product names for these modeling approaches so that you can investigate more in our documentation. First, of course, is MATLAB. Second is Simulink, the third being Simscape, and the last one being Stateflow.
Another interesting example of applying these modeling approaches is a model that we created for analog devices, transceiver AD9361. This model includes a wideband transmitter, a receiver, and also an observer receiver to enable DPD. You can download this model through the MathWorks website by using the link on the left. This model has actually been live validated, making it quite realistic to the actual implementation. The link on the slide can guide you to the right model.
In this part of the talk, we will take a closer look into how MATLAB, or more specifically, Simulink can be used to integrate with EDA implementation workflows. Cadence Design Systems, being an important partner for MathWorks, I will demonstrate how all of these workflows can be integrated well with the Cadence suite. But in principle, few of these options are independent of which environment you might want to use them in.
First, we shall see how Simulink models and testbenches can be exported as system verilog models. Secondly, we shall see how these models can be simulated together with Cadence Virtuoso. Thirdly, this is a more recent option. It's a more bottom-up approach in being able to import a SPICE netlist and then map it internally with Simscape or Simulink. And finally, we shall see how MATLAB can be invoked with Cadence ADE Explorer such that simulated data can be used within our platform.
As stated in the previous part of this talk, we mentioned that Simulink models can be exported as C code and then subsequently wrapped by a DPI wrapper which can then be imported as a standard system verilog module. As you already guessed, to achieve this, we must convert this model into a fixed time step before the export, as the DPI wrapper is used to execute the C code in the right time frame.
As C code has no notion of time, the DPI wrapper must be finely sampled such that the error is insignificant. This makes the model easy to translate as the behavioral model quickly, rather than recreating it in another language manually. As these models are executed in native system verilog blocks, they run much faster than spice equivalents.
The generated code is independent on which platform that you might choose to run it. Also the automatic code generation relies on a mature conversion engine to provide real-number models at the interface, thus making it very suitable for testbenches and IC verification for regression testing. The signals supported are both discrete and continuous time, but under the hood, it is discrete in nature of the C code executed, which emulates a finely sampled behavior of the model that you see in the Simulink. Hence, it works just as fast and just as accurate as a quote in Simulink.
Another popular method of integration is co-simulation in time domain, here in which an interface block is used in both the platforms performs real-time handshaking to transfer signals seamlessly within both these platforms. The example shown in the diagram is a shipping example in the library mentioned earlier, in which the charge pump and the loop filter of the PLL is described in Cadence, and everything else is in Simulink. Upon running such a well-coupled setup, all of the detail effects of the charge pump and the loop filter are factored in into the entire loop response, while maintaining the same timeline.
Having high-speed blocks like the VCO, or the Voltage-Controlled Oscillator, described as a behavioral model makes it possible to run a top-level simulation setup like this much faster. This is a much needed functionality, especially if you're evaluating minor changes in your design. Also, the non-obvious effects of the charge pump and the loop filter later can be used to refine the system-level model without incorporating too many mathematical assumptions.
Also a system like this, when it runs in feedback, the entire loop signal converges with an internal co-simulation block, making the use case of such a setup quite relevant when the Simulink block cannot be readily used for co-generation. One limitation that I must point out to you here is that we don't support advanced maneuvers like AC analysis. But once you have a good feel for the non-idealities in the block, you can deduce them in a system-level perspective.
Another key option that is often requested is to be able to support or import legacy implementation of different blocks. And the most obvious way to do so is to convert these entries of SPICE netlist blocks within Simscape, as both of these approaches are of the same modeling approaches of doing physical design. The command used is subcircuit to CCSC, which converts the subcircuit definition to Simscape language components. Newer versions of Simscape does this transition directly.
A very recent workflow that has been a part of Simulink now, recently launched in 2020b, is to enable the notion of bottom-up verification, as it needs to be complete, accurate, fast, and easy to use. In that spirit, we've come up with a new feature called linear circuit visit, in which a netlist derived from a physical SPICE model can be imported through the wizard.
It is internally solved in closed-form equations, transformed to a bicode filter, and then later on in Simulink as a state-space representation. This comes quite in handy when you have to create or validate things like a loop filter for a PLL, and even T coils, that are very commonly used in SerDes links to post the throughput of the link. The linear circuit wizard is shipped with both of these examples, gives you an excellent starting point to understand this workflow better.
And finally, I would like to also mention how MATLAB can be invoked by pressing the M button on the latest version of ADE Explorer and ADE Assembler, which is once MATLAB is started, it automatically points to the database of the recently completed simulation. This avoids the manual steps involved in moving the waveforms from multiple scenarios, which can get quite complicated to handle. Also, MATLAB expressions can automatically be launched to post process these results even further.
Once these data is imported in MATLAB as tables, it opens up huge possibilities to analyze and mine data to deduce useful information. We can fit curves, create automatic reports of these results through scripts, employing a wide range of MATLAB functions to further automate the process of refining the behavioral models and create extensive reports which can be shared with other personnel or even customers. All of the similar features also exists with PSpice, particularly useful for PCB designers using MATLAB separately to do various tasks.
Now moving to the last part of the talk, we will have a closer look at some newer products which are dedicated to mixed-signal design and SerDes design, respectively. Firstly, for folks already on 19a or beyond, we have a new product called Mixed-Signal Blockset, which comprises of Simulink libraries of all possible architectures of PLLs and ADCs. These models are all white-box models, which basically means that you can look into them, see how they're implemented by our development team, and then choose to customize them, if necessary. These models are built from building blocks which already inherit well-known impairments in them. And finally, the product also has dedicated measurement blocks and testbenches for characterizing these models and even the external data.
Just to give you a brief glimpse into these building blocks of a PLL, we have charged pump, pre-scaler, divider, loop filter, phase frequency detector, and a voltage-controlled oscillator, imparting important impairments like phase noise, current imbalance, leakage, finite rise and fall time of signals, a purge editor, and other noise sources like thermal noise and quantization effects.
Similarly, the test bench, mentioned earlier, for characterizing these designs, can do a wide range of measurements for PLLs, things like log time, phase noise profile. And for ADCs, we can usually measure non-linearities in the form of INL, DNL, and perform AC and DC measurements for both ADCs and DACs described in the block set.
To show you guys how that might look like in practice, here I have an example of an integer and dual model PLL, which also is characterized by the PLL testbench. Parameters for this PLL have been asserted by a value prescribed in a commercially available PLL from Skyworks of the same architecture. As you can quickly verify, the measured phase noise for this model is exactly the same as mentioned in the post-silicon result measurements. The important metric like the VCO parameters like sensitivity, phase noise, are all simply extracted from this data sheet with all the rest of the parameters. The example is also shown as an example in the mixed-signal blockset, you can find the description of the entire process in our solution page.
You can find many application-specific examples to get started with everything that is available within the blockset, both for the testbenches and the design architectures. For the SerDes designs, again, in 19a, we launched a new product called SerDes Toolbox which is used to design and analyze transmitters and receivers within the SerDes Designer App. Here I would like to mention is that the tool-- that this is a toolbox and not a blockset. Hence, all the components within the toolbox are described as functions of MATLAB and not constructed with Simulink like the mixed-signal blockset.
The SerDes Toolbox is used to develop equalization algorithms with MATLAB system objects and contains pre-built blocks like feed forward equalizer, decision feedback equalizer, containers time linear equalizer, et cetera, which are used to perform statistical analysis and time-domain simulations. Later, SerDes toolbox is used to generate dual IBIS-AMI models which can run in any third-party channel simulators. This product is shipped with quite a lot of reference designs for high-speed I/Os like ethernet, DDR5, and PCI gen 3.
To start with, the SerDes toolbox is done through an app, which is used to quickly construct the signal chain, and more importantly, do a first check of the architecture and the statistical results. You can also import metrics like back and come. And later, it's exported to MATLAB, or Simulink, or even IBIS-AMI directly.
Recently, an important dimension has been added in 2020b to this app for which the architectures-- the architects can insert jitter parameters in the form of duty cycle distortion, random jitter, deterministic jitter, and sinusoidal hitter, both at the receiver and the transmitter. Here you can see the panel which opens up once you press the jitter dialog button on top. Now let's see how this works. Blocks from the top panel of this app insinuated.
And the plot can be added to see the statistic line. When we select the block, in this case, the DFE CDR, to modulate and change the mode of adoption-- add a few tabs and see the effect in the BER block. The CTLE parameters like peaking frequency can be changed to estimate the specifications that we might need for the CTLE and how it can improve the cycle workflow.
From the Add Plot button, we can visualize the pulse response. Once we have a working signal chain for our specification, we can later export that in Simulink. Once we have the export to Simulink, we can later go into detailed customizations of each of these blocks. As each of these blocks inherit properties through the app, it gives you a convenient starting point for doing all of these customizations.
You will also find in the top-left corner a configuration block which stores all the global parameters for the models, which will be later used to create the IBIS-AMI model. The channel model can be changed, as I will show you in the next slide, while all the equalizer blocks are white box. And they can be opened, and understood, and need customized based on user needs.
Coming to what is possible with respect to channel model, we can convert a single-ended S parameter file from even measurements exactly like the process shown with the switch mode power supply example earlier. We can use a rational fitting curve for getting a state-spaced representation. Hence, we can deduce the impulse response and the poles and zeros from this representation, and later get, an accurate impulse response of the entire signal chain. This can also then be imported into Simulink or even the SerDes Toolbox app.
Applying the same concept for the CTLE parameters if you have frequency response of an existing implementation, rational fitting can be done to extract the GPZ matrix for that CTLE, which can then again be fed back to Simulink and even the SerDes Toolbox app. Further nonlinearities can be easily constructed with the saturation amplifier at the output of the block.
You can find detailed explanations of both of these aspects in our documentation. Also, these examples are published under SerDes documentation within MATLAB. A live script is present to understand this process much better. And this can be later fed into the mask of the CTLE in Simulink, which leads up one step closer in creating the right amount of customizations that we might want to do before we create the IBIS model for our system.
So to do a quick recap, to better understand the origin of the IBIS-AMI model, the analog part contains details about the drivers, the channel, And the input buffer to create the .IBIS file, while the algorithmic part of the model is used to create the .AMI file and the DLL level which is executed the entire model is run in the channel simulator. As this app is used to verify the statistical part of the system, it is well correlated with the time-domain simulation that is done in Simulink. Hence, once we have this setup ready, we can easily create a dual model, if required, as both-- for both the setups, the Init and GetWave for both sides of the signature are available. Also, running this analysis, we can do a quick first pass with the statistical simulation and then do a deeper dive with the time-domain simulation, accounting for nonlinearities, until it's introduced by the CDR.
We can then use both of these representation and then create a standard compliant Init and GetWave based IBIS-AMI model. Later, AMI parameters can be inserted through the AMI wrapper in case additional parameters are needed. Once the IBIS model is created, it is standard compliant. And it can run in any third-party channel simulators for correlation and regression testing. This will be done to verify all possible corners or a large family of channel models and AMI configurations.
The integration of SerDes Toolbox-based IBIS-AMI models with SiSoft QCD and QSI through the SiSoft link creates a very convenient bidirectional link between these two platforms. And QCD/QSI project can be automatically created from SerDes Toolbox, thus to back annotate the channel model, stimuli, AMI parameters is done seamlessly.
Just to see all of this in action, we can take a quick peek into the workflow. Here you can, if you double click on the Configuration in SiSoft export, you would see the IBIS and the AMI section log. Once we have the right parameters, we create the DLL, which can complete the models export. We can then see how size of link is used to create a QCD project.
Once in QCD, you can control all of these parameters, sweep and run across all relevant corners with a more accurate representation of the channel. Once we identify failure cases across a few set of simulation configurations, we can then selectively import them back to Simulink, and reproduce the errors in Simulink, and look for ways to-- methods to fix this, if possible. To summarize the entire workflow, we start with architecture but the SerDes app, perform statistical analysis, then after which we perform and export to Simulink for relevant customizations and do verification in the time domain against the specification. Then SiSoft link can be used to bidirectionally move data and models across these platforms.
In the release of 2020b, we have also added an example of 802.3ck ADC-based SerDes signal chain, which includes an ADC and all the other blocks mentioned in the earlier examples. The IBIS-AMI model can also be readily exported of this model. This year, earlier in January, our team also published this workflow at DesignCon 2020 along with folks from Intel Corporation. Here is a link to a video presenting that work from one of the team members from Intel at a MathWorks conference.
So just to summarize, one, or possibly the most important point that I would like for you guys to take back is that Simulink is a perfect platform for doing top-level top-down design approach. The idea is always to start with something ideal and then keep on adding real-world impairments. These system-level models help in optimizing the design before they can be implemented. And as we consistently saw, we can leverage a wide range of modeling approaches to model our system, then subsequently use model export, forming a well-constructed, connected workflow overall.
Thank you for your patience. We can now move on to the Q&A part of the talk. Please post your questions on the Q&A panel. And we will take a few moments to review them and come back online to answer your questions. Thank you.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.