Category: Food for thought

Lean-Agile Principles in Circuit Design, Part 1 – How to Reduce Design Wastes

Working in a startup has forced me to pick up Eric Ries’ “The Lean Startup” again. If you haven’t read it, it’s a book about applying “scientific principles” in a startup or entrepreneurial environments. As a hardware guy, you could imagine my slight “disappointment” the first time I read it. “Well, it’s only for software”, “Big companies probably can’t adopt this”, “Written in 2011? That’s so yesterday”.

I now find some ideas more intriguing after my second viewing (actually listening on Audible during commute). I begin to make connections between the underlying principles behind “lean thinking” and IC design practices. Maybe (and just maybe), IC design is primed to adopt lean principles more formally and systematically. So, you are reading this two-part series as a result of my obsession with such principles for the past couple of months.

Ah management jargons, we meet again

To many, management jargons seem just as foreign (and possibly pompous) as engineering abbreviations. Nevertheless, the end goal of either side remains the same: plan, execute and deliver a satisfactory result in a time and cost efficient manner. I have come to learn that a good “process” is key to sustainable and predictable results. So let’s first put away our engineering hats and look at the three most popular process improvement methodologies compared to the traditional waterfall approach.

Lean

Lean manufacturing was invented by Toyota to achieve a more efficient production system. In the 1950s, Toyota adopted the just-in-time (JIT) manufacturing principle to focus on waste reduction (seven types identified) in the process flow. The system was later rebranded as “lean” and studied by many business schools. In a nutshell, lean systems aim to remove unnecessary efforts that create minimal value for the final output.

Six Sigma

Who doesn’t love normal distributions? Six Sigma’s originator Bill Smith must secretly be a marketing genius because the name fully captures the methodology’s key principle – reducing variations. As one would imagine, Six Sigma processes heavily rely on data and statistical analysis. Decisions are made with data evidence and not assumptions. This notion shouldn’t be that alien to IC designers – after all, we run Monte Carlo simulations precisely for yield reasons. Modern processes combine Lean and Six Sigma and call it Lean Six Sigma (jargons right?).

Agile

You might be the most familiar with this term. After “Manifesto for Agile Software Development” was first published in 2001, it quickly gained steam and almost achieved this “Ten Commandments” type status in the software world. The biggest difference in Agile is its embrace for constant change and readiness to launch small revisions frequently. Many became a fan of Agile during COVID since it proved to be the most resilient system.

Relevance to IC design

It’s easy to classify such process methodologies as “obvious” or “not applicable to hardware”. Some might even falsely generalize Lean as less, Six Sigma as perfect, and Agile as fast. Ironically, “less, fast and perfect” are actually the desirable outcomes from such processes. Acknowledging and studying these ideas can help improve our own design methodologies.

In this post, I want to zoom in on the “waste reduction” aspect in lean (part 1). Not only do we often see over-specifying or over-designing leading to waste, valuable human and machine time are also not fully utilized when schematics are drawn inefficiently.

It’s also no coincidence that some commonalities exist, which might be applicable to circuit design as well. Lean, Six Sigma and Agile all rely on a constant feedback loop of “build-measure-learn”. The difference lies only in the “complexity” and “latency” in the loop (part 2).

Now let’s try putting this in IC design’s perspective: if we are the managers of the “circuit design factory”, how would we adopt these principles?

Waste in IC design

Lean was first applied in manufacturing systems and later extended to other fields. Fortunately, lean is equally applicable to the engineering process. The table below, taken from an MIT course on lean six sigma methods, shows a mapping between the original manufacturing wastes and their engineering equivalents.

Engineering wastes aligned to the wastes in lean manufacturing [source: MIT OCW 16.660j Lec 2-4]

So how can we extend this further to IC design? Here is my attempt at mapping these wastes. I wager that you must have experienced at least one of these frustrations in the following table. I bet even more that we have all been waste contributors at a certain point.

Waste reduction toolbox

Now that we have identified the waste categories, let’s discuss the top 5 ways to reduce them during design cycles. You could call these personal learnings from the good and the bad examples. Many ideas here have parallels to some programming principles. So without further ado, let’s begin.

1. Finding O(1) or O(log N) in your routines

Targets waste #4, #8

I apologize for my software persona popping out, but there is beauty in finishing a task in constant or logarithmic time (check big-O notation). Examples for circuit design involve using hierarchies, array syntax, and bus notations to reduce schematic drawing/modification to O(1) or O(log N) time.

If you are learning to create floorplans, ask your layout partners about groups, array/synchronous copy (for instances), aligning (for pins), and cuts (for routes). I wish someone had told me these lifesaving shortcuts earlier because I have spent way too much time doing copy→paste→move.

Travelling salesman problem [source: xkcd]

2. Systematic library/cellview management

Targets waste #1, #2, #3

Borrowing from software again, revision controls in library manager are widely used nowadays. While the benefit is huge, it could lead to unintended bad habits. Many designers simply create as many variations of the same cell as possible without actively “managing” them. This could result in mass confusion later on, especially if no final consolidation happens. Worst case scenario, you could be checking LVS against one version, but tape out another.

If investigations and comparative studies require multiple versions, I recommend using a different cellview instead of creating a completely new cell. Combining with config views in simulations, the entire library becomes cleaner and more flexible. When library consolidation or migration happens, only the relevant final cells will survive, thus a clean database. I plan to discuss how to create a good cellview system in a more detailed future post.

Don’t sweat over the what the cellview names mean on the right, but do take some educated guesses

3. Symbol/schematic skeleton before optimization

Targets waste #5, #6, #7

Top-down methodology encourages designers to have a bird-eye view of the entire system in addition to the fine details of their responsible cells. One method is to define block and cell level pins earlier in the design phase. This idea is similar (though not as sophisticated) to abstract classes or interface (e.g. Java, Python, etc.) in object-oriented programming languages. Instead of implementing the specific functions right away, a high-level abstract description first defines the key methods and their interfaces. The IC equivalent would be to appropriately name and assign port directions for each block’s pins. The symbol itself contains all the information for its interface.

“How can I build a symbol without knowing what’s inside?” The truth is you must know the most critical pins – an amplifier should at least have power, inputs and outputs. You must also know the most basic required features on a block – power down, reset, basic configuration bits. Informative symbols and schematic skeletons should be possible with these pins alone. The same concept is applicable to layout and floorplans, with pins + black boxing.

Since we are only dealing with symbols and pins here, it’s must easier to modify if specification changes or a new feature is requested. This ties into the “minimum viable product” (MVP) concept that we shall discuss in part 2.

A rough frame w/ non-ideal parts is a better starting point towards building a car than a perfectly round and polished wheel

4. Design w/ uncertainties & effort forecast

Targets waste #5, #6, #7

Now your schematic skeleton looks solid, the device level design begins. You have a clear plan of execution because of the symbol creation exercise, but potential pre and post layout discrepancies bother you till no end. We all have had that fear: what if this thing completely breaks down after layout?

To address this, designers should 1. estimate parasitics early by floorplanning, 2. use sufficient dummies, and 3. add chicken bits. Depicted below is an example of a tail current source in an amplifier. Before starting layout, designers should have a mental (or real) picture of how the unit current cells are tiled together. There could be an always-on branch (8x), two smaller branches for fine adjustments (4x + 2x), and dummies (6x). A critical parasitic capacitor connects to the output node w/ reasonably estimated value.

One could argue the extra programmable branches and dummies are “waste” themselves. Keep in mind that reserving real estate at this stage consumes minimal effort compared to potential changes later in the design process. Swapping dummies and the always-on cells only require metal+via changes. What if layout database is frozen during final stages of the tapeout but some extra juice is required due to specification change? What if the chip comes back and you realize the PDK models were entirely off? The chicken bits might just save you.

5. “Ticketing” pipeline between design and layout

Targets waste #3, #5, #8

This last one is my personal system to communicate with my layout partners. I use a poor man’s “ticketing” tool called POWERPOINT. Yes, you read that right – I am suggesting to use one more .ppt document to cut IC design waste. My personal experience so far is that this interface document provides better communication and results than any zoom calls, especially if there are time zone differences. Below is how an example slide looks like.

Each slide acts as a ticket for a layout modification request. The slides DO NOT need to be pretty at all. A quick snapshot and description serve the purpose of both conveying and documenting the request. As the design gets more complete, this slide deck will grow in size but all changes are tracked in a visual way. This also allows the designer and layout engineer to prioritize and work at their own pace, almost in a FIFO manner. When periodic checkpoints or project milestones are close, this slide deck becomes extremely helpful for reviewing and further planning.

Till next time

Being lean in our design process never means reducing design complexity or using fewer tools. Rather, it’s the mentality that we should begin with the right design complexity and use the right tools.

I hope some techniques mentioned here can provide insights on how to be lean when designing. As promised, there are more to this topic. Specifically, IC design process can also embrace incremental changes in Agile methodology. We can achieve better outcome by breaking large design cycles into smaller ones. So stay tuned for part 2!

The Frequency Domain Trap – Beware of Your AC Analysis

This man right here arguably changed the course of signal processing and engineering. Sure, let’s also throw names like Euler, Laplace and Cooley-Turkey in there, but Fourier transform has become the cornerstone of designers’ daily routine. Due to its magic, we simulate and measure our designs mostly in the frequency domain.

From AC simulations to FFT measurements, we have almost developed a second nature when looking at frequency responses. We pride ourselves in building the flattest filter responses and knowing the causes for each harmonic. Even so, is this really the whole picture? In this post, we will explore some dangers when we trust and rely on frequency domain too much. Let’s make Fourier proud.

Magnitude isn’t the whole story

Math is hard. We engineers apply what makes intuitive sense into our designs, and hide the complicated and head-scratching stuff behind “approximations”. Our brains can understand magnitude very well – large/small, tall/short, cheap/expensive. When it comes to phase and time, we can’t seem to manage (just look at your last project’s schedule).

So naturally, we have developed a preference for the magnitude of a frequency response. That’s why we love sine wave tests: the output is simply a delayed version of the input with different amplitude. It’s easy to measure and makes “intuitive sense”, so what’s the problem?

Sometimes, the phase portion of the frequency responses contains equal if not more information as the magnitude part. Here is my favorite example to illustrate this point (makes a good interview question).

Take a look at this funky transfer function above. It has a left half-plane pole and a RIGHT half-plane zero. Its magnitude response looks absolute boring – a flat line across all frequencies. In other words, this transfer function processes the signal only in the phase domain. If you only focused on the magnitude response, you would pat yourself on the back for creating an ideal amplifier. Shown below is a circuit that could give such a transfer function. Have a little fun and try deriving its transfer function (reference)

But is it even real or just a made up example? If you ever used an inverter, you would recognize the following waveform. Ever wondered where those spikes come from? They come precisely from the feedforward path (right half-plane zero) through the inverter’s Miller capacitor. This RHP zero also contributes to the inverter buffer’s delay. There is no way to predict these spikes from magnitude responses alone.

Magnitude response can still remain a good “indicator” of obvious issues (after all, it’s one of the fastest simulations). However, phase information becomes crucial with the introduction of parasitics and inductors, especially at high frequencies. Sometimes, it’s not the flattest response you should aim for (for those who are interested, look into raised-cosine filters and their applications in communications).

Probability – the third leg in the engineering stool

As mentioned before, we love our sines and cosines, but do we speak on the phone with a C# note? Most real life signals look more like noise than sine waves. In fact, the transmitter in a wireline link typically encodes data to be “random” and have equal energy for all frequencies. The signal’s frequency content simply looks like high energy white noise – flat and not that useful.

What’s interesting, however, is the probabilistic and statistical properties of the signal. Other than time and frequency, the probability domain is often overlooked. Let’s study some examples on why we need to pay extra attention to signal statistics.

1. Signals of different distributions

We will begin by clearing the air on one concept: white noise doesn’t mean it has a Gaussian/normal distribution. The only criteria for a (discrete) signal to be “white” is for each sample to be independently taken from the same probability distribution. In the continuous domain, this translates to having a constant power spectral density in the frequency domain.

We typically associate white noise with Gaussian distributions because of “AWGN” (additive white gaussian noise), which is the go-to model for noise. It is certainly not the case when it comes to signals. Here are four special probability distributions

Again, if independent signal samples are taken from any one of these distributions, the resulting signal is still considered white. A quick FFT of the constructed signal would look identical to “noise”. The implications on the processing circuits’ requirements, however, are completely different.

Take linearity for instance. It wouldn’t be wrong to assume the linearity requirement for processing two digital levels should be much relaxed than a uniformly distributed input signal. The figure below shows that nonlinearity error for a dual-Dirac distribution could effectively become “gain error”, while a uniform input yields a different error distribution. A Gaussian distributed input signal might also require less linearity than a sinusoidal-like distribution because smaller amplitude signal is more likely.

By understanding input signal’s statistical nature, we can gather more insights about certain requirements for our circuits than just from frequency domain. It is frequently a sin when we design just for the best figure of merit (FOM) using sine wave stimulus. Such designs are often sub-optimal or even worse non-functional when processing real life signals.

2. Stationary vs non-stationary signals

Before these distant probability class jargons scare you away, let’s just imagine yourself speaking on the phone again. Unless you are chatty like me, the microphone should be picking up your voice in intervals. You speak, then pause, then speak again. Congratulations, you are now a non-stationary signal source: the microphone’s input signal statistics (e.g. mean, variance, etc.) CHANGES over time.

When we deal with this kind of signal, frequency domain analysis forces us to go into the “either-or” mode. We would perhaps analysis the circuit assuming we are in either the “speak” or the “pause” phase. However, the transition between the two phases might be forgotten.

This becomes especially important for systems where a host and device take turns to send handshake signals on the same line. In these cases, even pseudo-random bit sequences (PRBS) can’t realistically emulate the real signals.

Other scenarios involving baseline wander and switching glitches also fall under this category. Frequency domain analysis works best when signals reach steady-state, but offer limited value for such time and statistical domain phenomena. Figure below depicts a handshake signal example in the HDMI standards. Try and convince me that frequency domain simulations help here.

The small signal swamp

Though they are not entirely the same, small signal analysis are associated with frequency domain simulations because they are all part of the linear analysis family. Designers are eager to dive into the small signal swamp to do s-domain calculations and run AC simulations. There is nothing wrong with it, but far too often we forget about the land that’s just slightly outside the swamp (let’s call it the “medium signal land”).

Overlooking the medium signal land can potentially lead to design issues. Examples include slewing, nonlinearity, undesired settling dynamics, and sometimes even divergent behavior with bad initial conditions. Small signal thinking often tells a performance story: gain, bandwidth, etc. Medium/large signals, on the other hand, tells a functional story. Ask yourself: can I get to the small signal land from here at all? If not, you might have taped out a very high performance brick.

In real life designs, key aspects like biasing, power on sequence, and resets could be more important than the small signal behaviors. And the only way to cover these points is through time domain simulation.

Stand the test of time

My favorite example for why frequency domain measurements could be deceiving is found in this article by Chris Mangelsdorf. Chris’ example demonstrates errors due to very high harmonics (i.e. code glitches) are often not visible in frequency domain. In this particular case, it’s even difficult to spot in time domain without some tricks. This article also touches upon similar sentiments mentioned above including phase information.

While many consider getting good FFT plots and ENOB numbers the finish line in most projects, not understanding time domain errors like glitches can be catastrophic. For example, if an ADC has a code glitches happening every thousand samples (regardless of its perfect ENOB or FOM), it cannot be used in a communication link targeting bit error rate (BER) of 1E-6 or below.

Unfortunately, time domain analysis is, well, time-consuming. In large systems, running large system level transient simulations inevitably crash servers and human spirit. That’s why adopting top-down methodology with good behavior models is of increasing importance. To stand the test of time, we need to be smart about what and how to simulate in the time domain. Below is a list of essential time domain simulations

  1. Power-on reset
    This is on the top of the list for obvious reasons. This is often not discussed enough for students working on tape-out. A good chip is a live chip first.
  2. Power down to power up transition
    Putting a chip into sleep/low power mode is always desired, but can it wake up properly? Run this simulation (not input stimulus is necessary) to check the circuit biasing between power down/up states.
  3. Input stimulus transition from idle to active state
    In some applications, input signal could go from idle to active continuously (e.g. burst mode communication, audio signals, etc.). Make sure your circuit handles this transition well.
  4. Special input stimulus like step or pulse response
    Instead of sine wave testing, consider using steps or pulses to test your circuit. Step and pulse responses reflect the system’s impulse response, which ultimately contains all frequencies’ magnitude/phase information. Techniques like this are helpful in characterizing dynamic and periodic circuits (see Impulse Sensitivity Function)
  5. Other initial condition sweeps
    Power and input signal transitions are just special cases for different initial conditions. Make sure you try several initial conditions that could cover some ground. For example, a feedback circuit might not be fully symmetrical. It could have different settling behaviors for high and low initial conditions.

To state the obvious, this post is not suggesting to ignore Fourier completely, but rather treat it as the first (not last) guiding step in your entire verification process. To build a solid stool on which your design can rest on, we need to consider frequency, time and probability domains together. So whenever you look at another frequency response next time, think about phase, statistics, time. and hopefully this three-legged stool.

Metal Resistors – Your Unexpected Friend In Wire Management

Yes, you read the title right. If you haven’t seen or used metal resistors (a.k.a. metres, rm, etc.) in your schematics, I hope this post opens a new door. Most modern PDKs already include metal resistor cells in the library. If not, you could create your own with CAD team’s help (if you have access to one). Normally, we work hard to avoid metres because they show up uninvited and mess up everything after extraction. However, they can be extremely helpful when placed properly, especially for simulation, testing and documentation purposes. In this post, I will explain in more details how to effectively utilize metres in these areas.

Some wires deserve a name

Metal resistors have been around for a long time. I only began using them more heavily when finFETs came about. As explained in another post, layout and parasitics are now dominant factors in a design’s success. Therefore, many routing wires need to be scrutinized just like devices, and they deserve to have dedicated cells.

The easy example we can all agree on is on-chip inductors. Although many PDKs come equipped with inductor pcells, we probably still end up drawing our own. There are many methods to deal with inductor LVS (black boxing, creating pcell, etc.), but my current favorite is to use metal resistors. These schematics are boring to say the least (the resistance is negligible, often <<1Ohm and essentially a short), but they will pass LVS as is without any funky setups. To simulate, you replace it with another schematic view generated from your favorite EM solver, be it an inductor model or nport model. The possibilities are endless: a similar schematic can apply to transmission lines as another example.

metres for inductor LVS
metres for transmission lines

Perhaps my favorite use case is for creating a standalone routing cell for a critical net. This happens the most when a signal need to branch out and reach multiple destinations. Metal resistors can help define this design intent early on (especially if you have already experimented with the floorplan). This is just another aspect of the “draw it like you see it” mentality. The example shown below is for a simple clock route, but you can easily expand this to be a distributed or tree structure. Note that the schematic could be “less boring” now that I added some parasitic capacitors to both supply and ground.

metres for an example clock route

Let’s compare the two schematics below. On the top is a straightforward one showing a clock buffer driving the signal to the top and bottom buffers. Although not drawn here, one can imagine an improved version including annotated routing information and a cartoon floorplan in the corner. So how can we further improve upon that? That’s where the bottom schematic come in with a routing cell created with metal resistors.

Schematics improvement with routing cell

Here are some of the biggest benefits of the bottom schematic:

  1. It forces you to treat routing plans seriously and acknowledge that it’s part of your design. Heck, it makes everyone who looks at this say that routing cell must be very important.
  2. There are two more unique and critical nodes (i.e. clk_top & clk_bot) for easy probing during simulation. There might be some who are fluent in netlist and know exactly where the signal of interest is, but that’s not me. With this schematic I can easily probe these two nodes and obtain useful information right away (e.g. delay matching).
  3. This schematic intrinsically separates the design problem into two parts: driver fan-out sizing and parasitics. So if the post layout simulation results weren’t as desired, we could have a better plan of attack for debug. Is it routing parasitics or fanout limited? Maybe I should try C-only extraction for the routing cell to see if it’s resistance dominant. Maybe there is some layout issue in the buffer instead of the wire routes, so let’s use extracted view only for the routing cell. I hope that you see this is a more efficient scheme to help designers isolate layout issues.
  4. Let’s talk about the supply/ground pins. The obvious reason is give the extracted capacitors a better reference rather than “0”. The more important reason is that these pins will remind you to include power grids surrounding the wires in layout. Many designers find out much later that top level integration slapped a dense power grid over their critical signals. This can lead to yelling, hair pulling and sometimes redesign. Putting power pins on routing cells lower the chance of such “surprises”.

Despite the examples focusing on high speed wires, metal resistors could be equally important for lower speed applications. When resistance matching is critical (e.g. summing node for a current DAC), segmenting a net with metal resistors can work wonders.

On-chip probe points

Now let’s go to other extreme of the speed spectrum: DC test voltages. For the uninitiated, real world designs often require the ability to measure critical on-chip signals. For digital blocks, an internal mux and a protocol of your choice (I2C, SPI, monitor bus, etc.) is sufficient to select and send signals off chip. The principle is the same for analog signals, except you have to decide the exact locations to probe in the physical layout.

There are mainly two categories of test signals: performance critical and location critical. Performance critical signals are ones that you don’t wish to disturb when you look at them. For example, you don’t wish to add extra capacitive loading on a high speed net or you want to make sure no extra noise can be injected into the VCO control voltage through the test path. The typical solution is to use a large isolation resistor (could be ~100k) locally before sending the voltage to a far-away analog mux. In this case, the resistor is an actual device like a poly resistor.

In other cases, extra loading is not problematic but you are specific about the location and metal layer where the signal is probed. Supply and ground network is the best example for this use. Our friendly metal resistor can be the perfect fit here. My suggestion is to create a corner in the schematic that summarizes the probe signals and their respective metals like below. This little corner provides layout engineers enough initial information (fine tuning is certainly required), and also serves as documentation.

Metres for sense voltage connections

To those who are pcell savvy or wish to improve upon this, you can create a wrapper cell with custom symbols with metal information written on them. The size can also be adjusted for more compact drawings (schematic real estate is valuable too). Depending on your appetite and the scale of your design, this might be an overkill. However, there is a similar use case in the digital land that might make more sense for some.

Digital mapper

Let’s take the diagram above and flip it left and right. Then, you have a bus coming in on the left, and branched out to new unique pins on the right. Remember the configuration section of the symbol here? This list can grow quickly for a larger block, and propagating all these pins to higher level could become troublesome. Somewhere in the schematic hierarchy one needs to connect these meaningfully named pins to the dull digital buses. Perhaps you have seen something like this before

Digital bits distribution by net names

Ah, the good old connect by net name crime. The noConn cells are there to eliminate the warnings due to a few unused bits, but now the whole bus is “not connected”. There is no structure in how the digital bits are connected to their destinations. No amount of “dynamic net highlighting” is gonna save your eyes when you need to debug a wrong connection. Your layout partner is probably also making a voodoo doll and sharpening some needles. Introducing the digital mapper cell, sponsored by metal resistors

Digital bits distribution by mapper cell

The magic happens inside the mapper like below. Luckily, tools today recognize buses that are tapped off from a bigger bus without complaining. This results in a much cleaner look for the schematic and nothing is connected by net name. Right away, it conveys more information about each bit’s usage, expected metal layer and even relative locations in the layout. For example, the noConns signify routing tracks reserved for shielding around critical signals, like power down and reset.

Unit mapper group example

Building upon this unit metres mapper group, a complete mapper cell can contain much more information about the circuit’s programmability. You guessed it – here can be go-to place for all the default values if you annotate them down. What’s better is you could see which configurations share the same register map address. You can even read off the combined value in hex for digital and verification folks. This is just another example of schematic as documentation, made possible by metal resistors. From layout’s point of view, the initial effort might be similar, but any incremental change becomes easier to track with this cell.

Example of complete mapper schematic

I have one final note about the digital mapper cell. Depending on your team’s own methodology, the mapper inputs could potentially be lumped into a single wider bus. This can help simplify the symbol of a mid-level block and makes higher level schematics easier to read and draw. But again, it’s up to your personal taste.

High level schematic symbol style flexibility with mapper cell

Dear Santa

As a build up to my personal wish list, here is a my bad attempt at a Christmas poem:

‘Twas the night before Christmas when an unexpected friend showed up in the PDK,

Her name was Metres, who smiled and said “your wires are going to be OK”.

Forgive me Santa for being so greedy,

but I still wish Metres can be a bit more handy.

Don’t you know a special elf named CAD?

Perhaps he can help, I heard he’s a good lad.

I know he is busy all season long,

but here is the list for what I want

  1. As mentioned above, the metres symbols should display metal layer info directly.
  2. Currently, pins can be assigned a “type” (power, signal, analog, etc.), but I personally never used them and understood their purpose. Is it possible to create a “digital” pin type and give me a field to input “default values”? It would be nice if the default value can show up in the symbol pin automatically.
  3. Is it possible to read in a digital mapper cell and generate a spreadsheet for the configuration table? This probably requires #2 to happen first.
  4. To expand upon #3, perhaps the process of creating configuration spreadsheets can be fully automated if special metres are recognized when tracing an entire netlist. Now designers only need to make sure their schematics contain the configuration details, and never have to touch Excel.
  5. A similar methodology might also work for analog test signals, just need another special flavor of metres pcell.

These might still be pipe dreams, but dreams do come true if we wish hard enough. The bigger point, however, is that we need to keep thinking about ways to enhance productivity, improve design scalability and reduce chances of error. An effective use of a tiny element like metres can translate to huge gain in efficiency. You never know what would be the next gem you find or create in the PDK.

Draw It Like You See It – Schematic and Layout Duality

The verdict is final: layout IS the design. The images below taken from Alvin Loke’s CICC slides (watch his recent talk here) summarize the key challenges in modern CMOS designs. Layout effort grows linearly (I think it’s more than that) due to more stringent DRC rules and longer design iterations. As a result, it has forced changes on most of our design mentality (although we designers are a stubborn breed). I began to re-evaluate the way I draw schematics because I know eventually a good layout is king. I still hold the personal belief that it’s more likely to work if it looks good. This applies to both schematics and layout.

Design and layout complexity in modern CMOS process [credit: Alvin Loke]

Design in reverse

I was fortunate enough to have early access to finFET processes (16nm to be exact) during my Ph.D years. Funny story: when I first stared at a finFET layout, I assumed all gates are shorted due to the continuous poly lines. You can imagine my facial expressions when I learned about poly and MD cuts (😲+ 🤬 + 😭). It took me about 3-4 circuit blocks to fully understand the “evil” that is parasitics in finFETs. The LVS ignorable parasitic caps that double your circuit’s power seem innocent next to the parasitic resistors that smirk at you as they make your netlist size explode. Eventually, I decided to do my designs in reverse: never begin schematics/simulations before layout placement. It might sound counter intuitive, but here are the biggest reasons and benefits for adopting this methodology

  1. Save time for everyone in the design cycle
    Think in the shoes of layout engineers. They need to tell you that your circuit is impossible to draw due to some DRC. They probably spent a whole day trying to figure this out, but this bad news seemed inevitable. Frustrations and tension fill the room. These scenarios could be avoided if the designers already understood the floorplan/DRC limitations. So instead of “optimizing” the circuits only in SPICE land, start with layout.
  2. Layout can determine your sizing, not simulations
    Designers tend to “overdesign” a cell when assigned a small puzzle piece in a big block. We run hundreds of simulations to squeeze out that 0.1dB extra performance, only to find out later that there is no difference with post layout extractions. Nature is kind to us: we often deal with shallow optima and a single transistor’s size wouldn’t matter too much in the grand scheme of things. So instead of running tons of simulations, your design choice might be informed by what works better in layout. One example would be increasing a device’s finger by one would help reduce the cell’s width due to abutment.
  3. Begin thinking about creating hierarchies because of layout “tediousness”
    A good schematics hierarchy could also help increase layout’s efficiency. To fully understand the importance of good hierarchical schematics, you need to experience the painful repetitive tasks in layout firsthand.
  4. Embed your design intent for parasitics into the floorplan
    No matter how good your cartoon floorplans in schematics are, it doesn’t come close to real layout floorplans. You might gain new insights after just laying down your tiny transistors and some wires. You might also want to break the OD diffusion to squeeze in more contacts. So, you change an NMOS from a single 10 finger device to 10x single finger devices. You can then draw schematics with design intents for parasitics, but you need to OWN the layout floorplan for that to happen.

The design/layout Venn diagram

I have this mental Venn diagram for design and layout. I remind our team’s designers that a majority of their design efforts should be in layout, with awareness of floorplan, DRC and parasitics at a minimum. On the other hand, a good layout engineer should be an electrical engineer at heart, knowing when to tradeoff parasitic capacitors and resistors, capable of suggesting better floorplans, and just a wizard with those hot keys.

It is certainly easier said than done, and I believe designers should take the initiative to reach across the aisle. DO NOT think you are doing layout engineers’ job, but rather you are helping yourself down the line. I promise you that your design’s “time to completion” will reduce significantly. Everyone in the layout team will shower you with appreciation if you are just a little more layout savvy.

Design and layout Venn diagram

Layout-like schematics

Enough of my ranting about how designers should learn layout, let’s discuss how at least we can draw schematics with layout in mind.

Different companies have different ways of managing their schematics at various levels. For large SoC companies, there might be a transition from a more manual and analog way of managing schematics to more digital like methodologies (i.e. netlist, Verilog, etc.) somewhere in the hierarchy. In these cases, the higher level schematics are mostly auto generated and human unreadable. Sometimes this makes sense because the chip becomes just a combination of macros and functional verifications can be more efficient with the help of digital tools. Nevertheless, drawing good schematics that reflect layout is still a good idea at mid/low level. It is really a personal choice deciding at which level or for which cell to draw a layout-like schematic, but it is a practice that could fit any hierarchy level.

It’s time to get our hands dirty. The biggest hurdle we need to jump over first is the default rectangle symbol shapes handed to us by the EDA tools. Its partner in crime is the selection box, the invisible border that defines the symbol boundary and limits your creativity. The conventional wisdom says input on the left and outputs on the right. We have been going with the flow for a while, and to be fair, they certainly get the job done. To break from this convention, here is the corner selection box that allows you to draw symbols with any shape.

Corner selection box

This allows you to create very layout like symbols, yet provide a clear entry point to descent down. To illustrate, below is a top level schematic with a pad ring. The boring rectangle symbols will result in a schematics that look like this (I didn’t put all the pin names on there for simplicity)

Boring pad ring symbol at top level

Now if I draw the pad ring symbol as a real ring with the corner selection box, the schematics can turn into something like below

An actual chip drawn in schematics w/ a ring symbol

Let’s detail out the ways why this is better

  • The pad locations are explicit, so you can get a lot of information from schematics alone. You can already visualize signal/current flows. You know exactly how many and where the spare pads are just in case. You know how to floorplan internal block’s I/O pins. The list goes on.
  • It makes more sense to have duplicate pins on this pad ring symbol because it reflects the physical layout. Thus, you have an immediate idea of how many pads are available for the same signals, especially important for supply/ground.
  • Although I didn’t draw it here, you can imagine how one can expand this symbol to annotate each pad type (e.g. ESD strength, I/O pad type, etc.), adopting the schematics as documentation principle.
  • The sense of pride that comes with drawing and admiring this finished schematic, which you treasure almost as much as your kids (ok, maybe not that much).

Another dummy example

Now let’s move to a lower level dummy block for another example. I want to emphasize that this is not a real design and probably doesn’t even work. However, it’s a great example to show how to draw layout-like schematics. Take a digital LDO (since we did an analog one before) and we will focus on the custom digital controller and the PMOS array. Below shows the block diagram

Dummy digital LDO core block diagram

As you can see, this block diagram serves as a pseudo floorplan for the layout as well. I will show you the final schematics first, and go into each sub-block respectively.

Digitally controlled PMOS array schematics

We will dive into the PMOS array (or more precisely matrix) first. This cell embodies the notion that the layout is the design. It’s quite straightforward schematic wise but the nuances are all in layout. My preferred way to draw this cell for layout is to create row and column hierarchies like below

Row and column schematics for the PMOS matrix

Note that I purposedly make the csel bus come from the bottom to match the layout. The vin/vout pin directions are more conventional since there is no easy way to indicate a 3D structure (i.e. VIA up and down) in schematics.

Those eagle-eyed among you may already see that the schematics can be more simplified and scaling friendly using bus notations. When the matrix size is large (e.g. >256 elements or 8 bits), the bus notation makes sense. Otherwise, I think 16 rows + 16 cols can still be drawn out explicitly to reflect layout (that’s roughly 2log2(16) = 8 Ctrl C+V operations, so not that bad). Together with a cartoon floorplan and more notes in the schematics, you can confidently hand this off to your layout partner.

Simplified row and column schematics for PMOS matrix

Now we will move onto the custom digital block. The more interesting subcell here is the shift register, so I will expand on it further. For the digital block itself, you can clearly see the three subcells and their relative position w.r.t each other. They can be placed into an L-shape with standard cells, fillers and decaps, just like in the schematics. Of course I didn’t forget to draw a note box to indicate the higher level connections to the PMOS matrix. One benefit with this style of schematics (which might not be obvious until you try it yourself) is you rarely have to connect by net names because the signal directions are preserved like in the layout.

Digital controller schematics

If we descend into the shift register cell, I would draw something like the following. The example design intent here is to run the clock signal against the data path to lower the hold time violation risk. Thus the data input needs to be buffered to the other side of the register chain. The extra buffer delay will act as hold time margin for the first DFF.

Note that I also space out the data buffers and annotate the approximate distance between them. The data buffer size is already chosen appropriately because I know the metal usage and wire length in advance. The clock signal also has the same annotations along with a note symbol for shielding. It’s all possible because I have played around with layout floorplan before drawing this schematic. Again, we can simplify this schematic before the shift register gets too long. It might lose some layout information, so you can add a cartoon floorplan in the corner as a supplement.

Shift register schematics, explicit (top) vs. simplified (bottom)

Final points

In the interest of keeping this post at reasonable length, I won’t include any more specific examples. However, here is a list for layout information that can be explicitly shown in schematics

  1. Routing path features including 45/90 degree turns and branching for critical signals, especially if distributed long distance (e.g. clocks).
  2. Directionality between critical signals (e.g. show if data and clock paths are parallel or orthogonal).
  3. Special routing plans like a tree structure for matching or star connection for power.
  4. Inductor coil placements relative to other cells.
  5. Higher level block symmetry (for instance, replicated I/Q mixer in a RF signal path).
  6. Common centroid placements and connections for first order gradient cancellation (differential pairs, binary/segmented DACs, etc.).
  7. The list can go on as you start to draw it like you see it…

As a closing thought, I started this post with a focus on modern CMOS and finFET, but the principles of design in reverse and drawing layout-like schematics is equally suitable for older process technologies. Designers have to evolve and understand bottlenecks and constraints often lie in other aspects, especially layout. By the same token, I also encourage designers to learn about new ideas in signal processing and systems.

In an ideal world, the Venn diagram described above would have a third circle for system design. Work flows and available talents nowadays force most teams to operate like the diagram on the left. Each circle will expand over time thanks to new technology and tools, but it’s the right overlaps that push innovation forward and ensure execution. We should all aspire to be in the middle of the intersections, and younger generation engineers should be trained as such. So gauge yourself against this picture, and move towards the center 1dB each day and one day at a time.

Express Yourself in Schematics – Have Fun with Symbols and Notes

The “circuit” below was crowned the “funniest schematics” on the Internet if you did a Google search (of course it came from xkcd). Humor in engineering normally comes with sarcasm, self-deprecation, and our shared sufferings. Take a look at the diagram below, and you will find at least one thing you can relate to (my personal favorite is the cloverleaf interchange because you know how I feel about solder dots). The comedy here is delivered through (wait for it…) SYMBOLS! So in this post, let’s talk about how we can have some fun with our symbols and notes.

Circuit Diagram [credit: explain xkcd]

The funny engineers

Let’s get this out of the way first. I think IC design is fun not only because of the satisfactions that come with the end products, but also the people in this field. I have met so many IC design mentors and uncles with a great sense of humor. Case in point, you don’t often see a panelist dressed up as a hamster at a world renowned circuit conference discussing the tape-out treadmill (I strongly recommend reading Chris Mangelsdorf’s “Shop Talk” series on Solid States Circuits Magazine). Want another example? Here is literally a former VLSI engineer turned comedian, Don McMillan. However, when it’s time to design some serious circuits, somehow we put our personalities and humor away. It doesn’t have to be this way, so continue reading.

Life wisdom in circuits

You might recognize some of these from T-shirts, but I think they must go into somebody’s real schematics at some point. Here are some of my favorite quotes or life wisdom explained in circuits

1. The answer to Shakespeare

Ever need a “tie high” cell? Shakespeare can rest easy knowing we have the answer.

2. Both you and your comparator need some encouragements

Add this note next to your comparator before your design review

3. The pain with TIA

Oops, applied a voltage to a TIA….

4. Can’t resist last minute design changes

Resistance is futile

5. The key to my happy marriage/life

Perfect for your ESD schematics

Hilarious annotations

Programmers have long figured out how to use comments to describe their pains in plain English (examples in case you are curious). Let’s face it, we all need some extra motivations each day to keep tweaking that design or run some simulations. Maybe writing or reading some funny notes on schematics will provide exactly that. Inspired by our programmer friends, here are somethings you can try putting on your symbols/schematics next time

  • “Descend into this symbol at your own risk.”
  • “When I started this design, only God and I understood what I was doing. Now only God knows”
  • “To my future self: you were an idiot for building this circuit”
  • “The Current is strong with this one”
  • “I want to dedicate this circuit to my children, without whom I would have finished much earlier”
  • “WARNING: if you change this sacred sizing, the circuit will explode”
  • “I read in Circuits for Dummies that I need these dummies for circuits”
  • “In my designs, I don’t take shortcuts; I bypass”
  • “Before this thing becomes a comparator, it was a random bit generator”
  • What other quirky inside jokes can you put on your schematics? The floor is yours…

Let your imagination fly

I cringe whenever a dull symbol shows up in the schematics. “This one needs some identity”, I say to myself. That’s when I try to let my imagination fly create a symbol I can be equally as proud of as my circuits. Somewhere in a library might still live a symbol that looks similar to this

Can you guess what this symbol is for? Maybe to some of your surprise, I lived through the tail of the floppy disk age. I immediately jumped on the chance to draw it on a (you guessed it!) register map cell. After the cell was checked in, I had delightful conversations with my manager and several other designers just about this little floppy disk. I feast on the interesting stories people share when their memories of the “good old days” are triggered by a little picture like this. I enjoy these moments greatly – listening and learning from those who came before me, and feeling glad that I can make us all laugh a bit during work.

There are other times when you can let your creativity loose. Have you ever wondered why some of the most widely used circuit blocks don’t really have a universal symbol (PLL I am looking at you)? I have been working on a symbol for PLLs in the back of my head, and here it is. Drum roll please…

Please go ahead, use it for your PLL 🙂

You’ve seen it here first. I will wait for the applause to end.

In all seriousness

I hope this short post has made you chuckle a bit after a busy week of staring at layouts and simulation results. In all seriousness though, the bigger point is that we should all be more free when drawing schematics. How one draws schematics is just another aspect on his/her resume, but it doesn’t have to be strictly “professional”. To be honest, I need the small whimsical touches in my circuits for a little extra motivation during the grind. I try to express myself through my schematics – I want them to be neat, well-documented, aesthetically pleasing and sometimes funny, without compromising the design quality itself.

Behind each circuit and symbol, there might be a intriguing story to be told. With each story, we learn, develop and grow. Perhaps someday a fresh grad can go into a database, look at my schematics and go, “Wow, this Kevin guy must have had a lot of fun when he was here”. With a few simple shapes and notes, it would add a whole lot of personalities to your designs. It can even strengthen your bonds with the team – grab a coffee, talk about your schematics and share a laugh .

There is a child in all of us, and we have the perfect canvas to express ourselves. This is precisely the reason why I chose this feature image at the very top for this post. With that said, have you seen or drawn any fun schematics yourself? Please share your stories!

Schematics as Documentation – How to Use Symbols and Annotations Effectively

You might call me a “reverse convert” – I began as a software undergraduate, who later jumped to the hardware side, pretty rare huh? I can save my personal story for another day, but what I learned from the software side remained impactful in my work today. The importance of documentation was chiseled into my brain after a few programming courses. I remember distinctly when a TA showed us how Javadoc could turn my code’s inline comments into pre-formatted and intuitive HTML documentation. Your IDE (Integrated Development Environment) becomes a one-stop shop for most of your programming needs.

Example Javadoc documentation page, auto generated from comments in code (and I emphasize “auto”)

Now let’s compare that with what IC designers do. We all have made one too many slides, probably some Word docs as formal documentation, and countless spreadsheets for configuration settings. Microsoft is really the winner here.

I pose the question (and challenge) whether schematic capture tools can be used to meet our documentation needs as well. Before taking the leap to talk about “AI assisted schematics” , my simpler conjecture is that adopting the mindset of “schematics as documentation” and some basic practices will already have huge benefits. In this post, I will share some key ways of utilizing good symbols and annotations in order to document our circuits’ architecture, analog and digital aspects.

Architecture documentation

Think back on the last time you WANTED to draw a good block diagram for your circuit, probably for a design review or a journal paper. Now take that desire and put it into schematics and symbols drawing, which is the very first place we can document circuit architecture at all scale. Here are my three guidelines to ensure architectural information is conveyed clearly in schematics and symbols.

1. Draw block diagrams on symbols with the right level of abstraction

Below are three different example PLL symbols. A bad one won’t have any information about what the block is, so it’s virtually the same as a netlist block. An OK one will at least have a description of the block (i.e. block names like PLL, LNA, ADC, etc.) on the symbol. There are situations where this might be acceptable. It’s marginally better than the bad one, but putting a big visible name makes it easier to find in a complex high level schematic. A good symbol will show some level of architectural information on symbol. It can depict the critical sub-blocks and immediately show the signal flow with the right pin placements. Depending on your personal preference, the big block name could be optional.

Examples of a bad symbol (left), OK symbol (mid), and good symbol (right)
2. Use meaningful cell, instance, pin and net names

There isn’t a “golden reference” for naming convention, but definitely have one within your group and enforce it. For basic primitives, there are some rules (“R” for resistors, “C” for capacitors, “L” for inductors, “V” for voltage sources, “M” for devices, and so on), but even those aren’t strictly followed sometimes in the crunch of time (I plead guilty). When it comes to pin/net names, the problem could be even worse like the example below. Obviously I exaggerated the bad symbol to make a point, but I hope the message is delivered.

Always give meaningful names to cell, instance and pins if it’s meaningful to you

One suggestion on cell names is to embed a similar schematic hierarchy in the name itself. This scheme not only helps with hierarchical thinking, but it also automatically sorts the cells in the library manager (easier to find later). One example would be to name the bias block in the charge pump pll_core_cp_bias. The name does get long sometimes, so exercise tradeoffs when using this scheme (might be a good indicator that you have too many levels).

Most schematics I have seen so far tend to have good pin names, but once in a while you run into pin names directly taken from the alphabet soup. Similar to cell names, I also recommend embedding some hierarchy. Also, group the pins according to function or sub-blocks. For example, the main signal path pins (e.g. clk_ref, clk_out) should be a part of the block diagram, the bias current pins can be grouped together, and the configuration pins for PD/CP should be grouped together.

Lastly, something is wrong when a counter determines the instance name of your circuits, especially for higher level blocks. The issue isn’t really about schematic readability, but debuggability when you study and modify netlists. I learned this the hard way when I had to trace “I0/I12/I034/I5/net067” in a netlist. So if you care about an internal net, give it a good name.

3. Use note shapes/colors to highlight local or higher level connectivity

Schematic capture tools are essentially drawing tools, so we have shapes and colors at our disposal. Weirdly enough, we rarely use them in schematics. Later in my career, I started experimenting with using shapes and colors more and I loved it. Architecturally, it adds another dimension to explaining the circuits.

One example is when I can’t find a good way to avoid the “connect by net name” crime. By using different color nets or explicit note arrows, you can emphasize critical connection even though they might be further apart in a big schematic. The goal here is to catch the attention of whoever reads the schematic, especially when feedback loops are involved. I still prefer using note arrows because it shows directionality , but colors might work better for special nets like biases and clocks.

Use different colored nets and/or arrow shape to show connectivity when connecting by net name

Another example is when such loops need to be broken during simulation (PLL, LDO, common mode feedback, switched-cap circuits, etc.). We can use an arrow to indicate higher level net connectivity. Sometimes we can even draw connectivity to other blocks so that we don’t lose sight of the overall architecture. Below are two examples

Note arrows to indicate connectivity at higher level
Use note shapes to show important higher level blocks (gm pair on left and regulator power MOS on right)

Analog documentation

Let’s move onto the more analog specific documentations that are valuable in schematics. We have already seen a glimpse of this in the examples above, in which current consumptions are also annotated along with the higher level components in the schematics. Most designers already have a personal style for documenting analog blocks, and my Big Three is listed below

1. Highlight circuit parameters and performance

One widely used annotation is putting in parasitic capacitance on critical nets after layout extraction. This practice reduces the gap between pre and post layout simulations, and it can help designers pinpoint where the limitations are. I think we can go a bit further to annotate other circuit parameters and simulated performance numbers in the schematics, including input capacitance, mismatch, noise, etc. It’s almost like keeping a journal of your circuit’s health.

2. Draw a layout floorplan

Layout notes are also essential in serving as the first interface between layout and design engineers. I would recommend drawing actual cartoon placements in addition to writing simplified notes like “minimize resistance” and “match routing”. Sometimes a well drawn floorplan automatically enforces these requirements. My personal preference is to put these notes in the floorplan cartoon so that the schematic itself looks clean. So think about creating a “layout corner” in your schematics.

3. Keep a record of your thinking process

Last but not least, use your schematics as a notepad to record your design decisions or experimental tweaks. It’s especially important when you are close to the tape-out finish line. We could keep having deja vu and wasting our time to “rediscover” the reasons behind a weird sizing choice, so writing down a note can save us some energy and trouble later. We can also use notes as reminders for revisiting design choices in the future. This is very similar to writing comments on small code snippets that catch edge cases when programming.

Combining these suggestions, one can draw and annotate a differential amplifier schematic as below. On the other hand, be wary of the risk of having a schematic look too heavy with too much text. So again, use your artistic senses to exercise tradeoffs when annotating schematics.

Example diff pair schematic that involves analog documentation

Digital documentation

Digital programmability has become inevitable in mixed signal designs today (i.e. digital-assisted analog designs). As a result, documenting configurations could now be a full-time job itself. It is especially challenging when multiple stakeholders are involved in a big system. Some poor soul will have to chase down individual block owners asking for default settings, power-on sequences, and so on. After some experimentations, I find the following guidelines the most helpful for in-situ digital documentation.

1. Use wide wires for digital buses

This is a personal choice but I use wide wires in both schematics and symbols to indicate a digital bus. It can show right away which block has a more complex interface, and needs more careful higher level routing plan.

Use wide wire to indicate digital bus
2. Write down critical config tables in schematics

Putting down a digital table becomes more natural as soon as you have the habit of using notes in schematics. We don’t need to include all configurations, just the ones that we will refer to the most later. Some example tables might be for a LDO’s output voltages or a VCO’s coarse tuned frequencies. We can also use such tables to note down functional behaviors, like clock source selection or reset sequences.

Another benefit is that we would already have a reference even if we need to document in excel again later. It would be much easier because we have already done so in schematics at the earliest chance bit by bit, instead of taking an all-at-once approach when the design is complete.

Coarse frequency tuning table in a VCO schematic
3. Explain custom decoders or digital controller whenever possible

We use custom encoders/decoders all the time (binary to thermometer, one-hot, gray coding, and so on), but we can’t draw much for their symbols. Therefore, the next best thing is to write the decoder’s name in easy to read fashion whenever possible. There are some tricks that simplify drawing custom digital decoders as well, like using bus notations and regular expressions.

Example digital controller schematic. Using bus connections can make the schematic look simpler and more intuitive than net name connections
4. Create block sections for analog and digital pins

This practice immediately separates the analog and digital portions of a block on the symbol. It also provides a quick view of each sub-cell’s programmability respectively. Together with tip #5, we can have a crystal clear symbol that well documents the digital interface.

5. Write default attribute values next to pins in symbol (at mid or high level)

I learned this trick from a co-worker, and find it extremely intuitive. The key here is to “hide” the default settings next to the symbol pins with smaller fonts. This way, they won’t obstruct the entire schematic when viewed from afar, but provide critical information when you zoom in. Perhaps I am late to the party, but this is extremely cool! The final finished PLL symbol might look something like this

Final PLL symbol combining previous tips

Putting it together

Let’s finish with another cartoon schematic and symbol for an example regulator. The sub-cell pin/instance/cell names are not explicitly drawn in this example, but we should still give them meaningful names like mentioned above. I hope you can look and agree that the LDO’s critical architecture, analog and digital information is well documented. We now can stay in the schematic land a bit longer before diving into Office.

Example LDO schematic w/ good documentation
Example LDO symbol

Lastly, this isn’t and shouldn’t be the only way to draw schematics and symbols as documentation. That’s where your individuality and creativity come in. Nevertheless, I would be thrilled if you find these recommendations useful and want to give them a try.

The day when our schematic environments turn into our IDEs might not be far. My personal wish is to see more built-in documentation features in EDA tools. Even a simple note section similar to the foot notes in PowerPoint can already provide some value. If you agree, please let your EDA friends know.

As always, my goal is also to strike up discussions, so please share your neat ways of documenting in schematics and thoughts on the topic!

Hi, My Name Is AICA – Artificial Intelligent Circuit Artist

“Hello, my name is AICA, artificial intelligent circuit artist. I specialize in creating unique and innovative designs for electronic circuits, using the latest AI technology to push the boundaries of what’s possible.
My background is in both computer science and electrical engineering, which has allowed me to develop a deep understanding of both the technical aspects of circuit design and the artistic creativity required to make circuits that are not only functional but also aesthetically pleasing.
With my advanced AI algorithms, I’m able to generate complex circuit designs that are optimized for specific functions, while also incorporating unique and creative visual elements that make each circuit a work of art.
Whether you need a custom circuit for a specialized application or simply want to add a touch of creativity to your electronic devices, I can work with you to design and produce a truly one-of-a-kind circuit that meets your needs and exceeds your expectations.
Thank you for considering me as your artificial intelligent circuit artist. I look forward to working with you and bringing your circuit design ideas to life.”

Chatgpt

Impressive, isn’t it? This is what ChatGPT wrote when I asked it to “write a self introduction for an artificial intelligent circuit artist” (I changed the name to AICA). It looks like the idea of using AI to assist with circuit design is coming true. Look, it seems to understand the artistic side of circuit design as well.

The AI wave gained even more momentum after the announcement of GPT4, so I thought it’s the perfect time for me to ride this wave a bit and share my opinions. The natural question in everyone’s mind is whether well-trained AI models can supplement other technology fields. Circuit design becomes a natural place to look at, and some machine learning technology already exists (e.g. Google TPU, Cadence Cerebrus, etc.). So what’s in the shop for IC designers?

An example of AI in circuit design

I want to start by stating that we have been using “AI” as circuit and system designers for quite a while now, especially in digital signal processing (DSP) and communication. I come from a SerDes background , dealing mostly with high-speed wireline communications (I call myself a high-tech plumber who make sure bits flow smoothly). Recent advances in wireline links pushed transceivers to use converter and DSP-based architectures (my thesis topic), and FFE+DFE becomes the go-to choice for digital equalization. Below is a picture of what a digital FFE equalizer might look like.

Parallel FFE example in an ADC-based DSP equalizer

The parallel nature of the equalizer requires each ADC sample to be sent to different FFE modules where decisions are made . I claim that each FFE module is identical to a node in neural network node, as shown below

The uncanny resemblence between an FFE module and a neural network node

What about a DFE? Well, there is something called a recurrent neural network (RNN), a fancy name for feedback – take the activation output (the sliced data) and make it another input for the node.

DFE as a RNN node

But wait, neural networks can “learn” you say. So can our FFE and DFE, we just call it “adaptation”. The underlying algorithms for finding the optimal coefficients are no different, namely some sort of gradient descent algorithm. In DSP, we normally use Least-mean-square (LMS) algorithm, and in neural networks it’s called backpropagation. FFE/DFE could be adapted with either known training sequences (i.e. supervised learning) or on equalizer’s own decisions (i.e. unsupervised learning) during mission mode. You get the point.

My understanding of neural networks obviously is still rudimentary and maybe laughable to some, but let’s all agree that the math behind DNN, ML, AI or whatever you want to call it is not new – it’s a problem of taking a multi-dimensional vector and projecting onto another vector of lower dimension (typically) after linear and nonlinear operations. With DSP equalizers, it’s taking the ADC output vector and projecting onto a single bit decision with FFE (linear) and DFE (nonlinear). The wireline application just stops at a single layer neural network, but I could easily rebrand it as “AI” in a startup pitch.

So why am I talking about this? If anyone worries about dealing with AI in the future or any new students think it’s a software only concept, think twice. We probably already have stumbled upon or even used AI concepts in our designs, but just didn’t use the same language.

What about the circuit design process itself?

Let’s move onto whether AI could assist or even replace design, layout and verification engineers. Let’s check the necessary conditions for this to happen. AI (in software terms) didn’t take off until when computation becomes much cheaper and massive amount of data is available, so we need to at least satisfy these two criteria:

  1. Enough cheap computation power for circuit design We have all experienced the excruciating wait during simulation time. Multiplying PVT corners and configuration settings quickly increase the wait exponentially. The layout CPU/memory consumption has become another bottleneck due to DRC/LVS checks for very large systems nowadays. The cost of sustaining the current IC design flow is much higher compared to say supporting an APP development team. In other words, I believe the computation power and cost for circuit design isn’t cheap enough as it stands today. Perhaps we can revisit this topic when hardware accelerators exist for SPICE simulations (startup idea anyone?).
  2. Enough meaningful data for circuit design So maybe we can take another approach. AI doesn’t need to close the entire design cycle, just some reasonable starting point for designers to take over. Without having an AI model checking and optimizing the circuit itself, we then need to teach it to build circuits “from experience”, a.k.a. using meaningful data from past designs. Here I purposely use the word “meaningful” because good and bad designs are all valuable when training AI models. I hope you can already see the challenges here:
    • The close-source nature of circuit designs today limits the amount of data available to train AI to a reasonable degree. Jamming the best journal and conference papers to the best AI model won’t help. What we need is the Github equivalent of IC design (which the PICO program is trying to do), but the rate of data generation (i.e. tape-outs) is nothing compared to open-source software. Maybe Elon Musk can buy a chip company and open source the GDS database after he keeps his promise with Twitter.
    • Labeling any design as good or bad is “subjective”. Each design is constrained in so many dimensions (power, area, speed, SNR, …). If now we relax the problem into having our AICA spit out multiple designs, each attached with a score, we still need to spend the same if not more time to verify and pick out the “right” design, if it exists at all.
    • How do we keep AICA up to date? ChatGPT is trained with new data every year across the entire internet, but it’s always one year behind (causality sucks …). Do we continue training AICA with its own output data with our supervision (reinforcement learning)? Will it become biased towards certain designs, especially if it’s trained only on a single company’s data? Does this new design cycle encourage or discourage innovation?
Flawed data [credit: xkcd]

I ask these questions hoping not to brush off AI-assisted circuit design in its entirety, but to open up new angles on how we even START to explore this space. Digital circuit designs live mostly in the RTL land(i.e. coding), and PnR flows are already automated enough that AI can begin penetrating into this space. Thus most “breakthrough” AI designed circuits are focused on digital circuits. Perhaps we need to reformulate analog/mixed signal design problems into a similar framework, and begin looking at the most basic tasks it can help with, like providing schematic templates and creating symbols.

The artistic side of AI schematic generation

Let’s tie it back to the core of this blog, the art of schematic drawing. To be honest, I view this no differently from AI generated art. Here is a “differential amplifier” I “created” on NightCafe (AI art generator) for a quick laugh.

This will be one of my dad jokes at some point. Note the systematic mismatch introduced in the differential pair.

At the same time, this picture tells the sad truth that we don’t have the right kind of differential amplifier sprinkled around the Internet. Nevertheless, AI might still be able to play important roles in the early design stage in the land of schematic drawing.

Imagine this: “AICA, draw me a template for a differential NMOS input CTLE, with 2b tuning for load resistors, 2b tuning for bias currents, 5b tuning for peaking gain, and a placeholder for local decap”, and it spits out the following schematics

I omitted many details in this dummy schematics cartoon (pin names, net names, border sheets, etc.), but they will be there in the final output.

If you descend into each sub-cell, another reasonable template is also there. The symbol for this CTLE could also look very good and be ready to use for higher level integration. The key point is that the device sizes won’t be decided by the AI, but it can help with the “mundane” job of drawing symbols and schematics (or design templates). AICA could ask more follow up questions like “do you want binary or thermometer coding on the resistor loads?” or “do you want peaking to be achieved with degeneration resistor or capacitor?” before creating each cell. The next step could also be asking the AI to create functional models that can be used to perform system level checks while you tweak the sizes.

So what does AICA need to learn in this case? Good schematics and symbols for various circuit topologies! Maybe this “declassifies” some sensitive information in a design because sizing isn’t involved and it can start with “well known” topologies. It should be easier to determine and open-source good schematics/symbols than good designs. To me, this is a more realistic first step in creating an AI circuit design assistance.

Final thoughts

I see any potential AI circuit model as any other IC design student. If we need to teach future AIs how to create circuit artworks, then we should start doing so ourselves today, and teach it to younger generation students first. Only then will we have accumulated enough good data in preparation for the AI wave in IC design. I want to finish this post with another exchange I had with ChatGPT, and maybe there is hope after all. Let me know about your ideas for AI-assisted circuit design, and as always, don’t stop drawing good schematics.

Another heart-to-heart between ChatGPT and me. I think it’s ready to look at good schematics.

Symbols – The Lexicon of Schematics

The first engineering class typically starts with the idea of “abstraction”, which in itself is a pretty abstract concept. As one goes through the curriculum and starts building real systems, abstraction is probably never mentioned again but exercised all the time. For myself, the most impactful abstractions start with basic circuit elements like resistors, capacitors, inductors, etc. We rarely pause and appreciate just how elegant these all too familiar symbols are – the zigzags in a resistor , the coil turns in an inductor and the parallel plates in a capacitor. These symbols came about when someone decided to wrap Maxwell’s equations into these pictures so we don’t have to see integrals and derivatives all the time. They provided more efficient ways to communicate and think about the problem, and from there new designs were created.

Let’s take a moment to let the genius of these symbols sink in.

Then came the active devices – vacuum tubes, diodes, transistors, etc. Their symbols continued the tradition of either resembling the physical objects or highlighting their functions/physics. Examples are the directionality in a diode, the grid and filament in a vacuum tube, the gate capacitor in a MOSFET, the direct contact between the base and the device in a BJT, the arrows showing where the current flows, and so on. These subtle details are truly artistic and there is a good reason why they survived the test of time.

The more complicated but equally fascinating active device symbols

When the digital era came, more symbols were needed as logic gates, latches and flip flops were introduced, but to me the symbols themselves became more “abstract”. The logic symbols’ origin was actually military (MIL-STD-806B). It was a well-documented problem, which resulted in more task forces and standards (e.g. IEEE Std 91-1984) under the Graphic Symbols Committee (yes, that was a thing) from the 1960s to 1990s. It literally required an army of people, pun intended. However, till this day I still don’t know why AND and OR gates look the way they do (maybe AND looks like a “D”?). Nevertheless, it allowed all players in the field to agree upon a “style guide” to carry out more complicated design.

The first page on logic symbols in the military standard document MIL-STD-806B. Good luck figuring out why AND and OR gates look this way

Creating symbols that represent circuits well was treated as a serious and urgent problem, and somewhere along the line we all seem to have forgotten the importance of this exercise. If you do a google search on “circuit schematics”, here is one example image that could induce fear and nightmares:

Some power electronics schematics [source: 911electronic.com]
Some power electronics schematics [source: 911electronic.com]

Perhaps the purpose of the picture is to show the complexity of the circuit, in which case it does an excellent job, but I would avoid having a schematics like this in the database at all cost. The silver-lining in this picture is that elements are already grouped and boxed together. One only needs to take another step in creating a MEANINGFUL symbol for each section, but unfortunately most of the symbols end up looking like this

The most widely used symbol in schematics nowadays

This symbol conveys little information on the block’s function. The cell name won’t help if it’s not readable when the symbol sits in a larger schematic. We have all taken the concept of “abstraction” too far in this case. Symbols are supposed to be the way we communicate with whoever reads the schematic later, not that different from caving painting actually. Imagine alien archeologists finding a schematics containing these symbols in our digital caves. I think one might understand the design for lower level schematics with primitives, transistors and logic gates, but completely loses it at mid and higher levels.

Symbols make up the lexicon of schematics. Drawing good symbols can be both fun and helpful when designing. I am sure all circuit designers are visual people and love to draw, but the tape-out treadmills may have buried our passions somehow. Let’s pay more respect to our symbols, build up our vocabularies and rediscover the most fundamental joy when drawing symbols and schematics.

The Artistic Side of Circuit Design

If you have ever attended a circuit design course or conference, you probably heard the phrases “lost art” or “black arts” mentioned at some point. As an IC design student, I was immediately attached to the “lost” and “black” part. It was only after several tape-outs when I began to truly appreciate the “art” half of those phrases.

Besides the artistic process of creating complex circuits/systems from one’s imaginations, the actual DRAWINGs of circuit schematics and layouts are the key artistic forms through which designers’ ideas become physical realities. I am sure anyone who has seen a die photo marveled at the beauty of this tiny piece of silicon with metal patterns, and yet hardly anyone associates these human creations with art, let alone realizing that like all paintings these chips all began with some lines and polygons in schematics (or even whiteboards/papers).

AMD “Renoir” Die Photo [credit: TechPowerUp]

I was fortunate enough to have interned and worked full-time at several chip design power houses since my Master’s years. All the neat circuit tricks I learned from seasoned designers definitely solidified my passion for circuit design, but my biggest takeaways have always been how good designers create, polish and maintain their schematics/layouts. Nowadays, my constant fuel is the schematic/layout drawing game I play during each project to create pieces of art I can be proud of.

This Circuit Artists blog series is intended to share my personal learnings and design habits when it comes to drawing schematics/layouts. I hope it would be interesting to some students/young professionals and keep them motivated. People in the circuit design field understand the difficulty in recruiting new talents nowadays. In my humble opinion, schematic/layout drawing when designing circuits could be just as fun (if not more) as writing thousands lines of codes (and yes, I am saying writing well structured code is fun). The best case scenario for this series is to tip the scale for a few students deciding on his/her major, realizing IC design is an art just as colorful and stunning to look at every step of the way, from schematics to die photos.

Code Quality [credit: xkcd]. This is equally true for bad schematics/layouts except the “style guide” is non-existent for circuit designs
Code Quality [credit: xkcd]. This is equally true for bad schematics/layouts except the “style guide” is non-existent for IC design

There is no particular order planned for the following entry topics, but hopefully as time goes on these can be more organized and a structure will self-manifest

To paraphrase the father of code refactoring Martin Fowler – any one can draw schematics that a SPICE simulator can understand, good designers draw schematics that humans can understand. Stay tuned!

© 2024 Circuit Artists

Theme by Anders NorenUp ↑