Category: Opinion

Top Down or Bottom Up – Where Should Designs Begin?

I might not be considered a “seasoned veteran”, but I have experienced some personal design paradigm shifts over the years.

Starting in undergrad, circuit design meant discrete components and breadboard. The equivalent of IC hazing was to read through countless datasheets and choose between a bad and an OK op amp. Moving to graduate studies, shrinking my breadboard designs into GDS was definitely dopamine inducing. Meanwhile, I began to get a taste of the challenges that come with more complex circuits and systems. Various internships taught me the importance of designing for PVT and not just for Ph. D. Working full-time opened my eyes to the internal structures of a well-oiled IC design machine (system, design, layout, verification, etc.). I picked up the design reuse mentality along with a new set of acronyms (DFT, DFM, DFABCD…). Interestingly enough, I need to draw on ALL of these experiences in a startup environment.

What I just described here is how my own methodology went from bottom-up to top-down, and today I live mostly in the middle. To get started, I recommend everyone to read through Ken Kundert’s article on top-down methodology first. Based on what he wrote more than 20 years ago (!), I will then add my take on this topic.

Where’s top? Where’s bottom?

This is an obvious question to ask, but how is “top” and “bottom” really defined? In the good old days, “bottom” meant transistors and “top” meant amplifiers. It was easier to draw the line because there weren’t that many layers. However, the increasing number of hierarchies in SoCs has forced us to rethink what top/bottom means.

It’s easier to define what “top” is: whatever block you are responsible for. “Bottom” becomes trickier. This is where models enter the chat. British statistician George Box famously pointed out the true nature of models, and it is especially true for IC design. My definition of “bottom” is the layer at which the model is still useful but details become cumbersome for the design of interest.

Digital designers have moved their collective “bottom” to the gate level because transistor details become unnecessary. For a PLL charge pump designer, transistors could mean the bottom, but for the overall PLL owner, the bottom stops at the current source/sink model of the charge pump. My top can be your bottom like the picture below. The hierarchical tree depicted here shows a clean boundary between each owner, but sometimes there could even be overlaps. Therefore, every designer has the opportunity to practice “top-down” methodology and think like a system architect, which I would expand upon in a later section.

The simulation problem

My post won’t be complete without a xkcd reference, so here it is:

Compiling. [credit: xkcd]

Change “compiling” to “simulating”, you get a pretty accurate representation of our daily lives. I am kidding of course, but the underlying message is valid. Large IC systems nowadays are simply impossible to simulate. The fact that a billion-transistor chip works at all is nothing short of a miracle.

There are mainly two ways simulation speed can be dragged down:

1. Netlist is too big

Do I hear a resounding “duh”? In modern PDKs, the transistor models themselves are becoming more complex already. Multiple flags and parameters are included in the model for layout dependent effects and parasitic estimates. When we add extra transistors in the circuit, we are also adding more resistors and capacitors. Layout extraction (especially RC extraction) makes the netlist size explode further.

2. Time constant gaps

More and more mixed-signal systems run into this issue. Examples include oversampled converters, digital/hybrid PLLs, TIA with DC offset cancellation, etc. A block may have signal and loop bandwidths that are orders of magnitude apart. A high speed TIA processes GHz signal, but the DC offset loop might only have kHz bandwidth. In order to fully simulate functionality, a millisecond long simulation with a picosecond time step might be needed. This becomes a problem regardless of the netlist size.

To make matters worse, designers also often relegate into the role of “SPICE monkeys”. Without a good understanding of the top level requirements and behaviors, many fall in a trap of “tweak, sweep and press run”. Perhaps this is the reason why many fear an take-over by the AI over lord, because computers are way better at loops than us.

The simulation bottleneck worsens the already long time-to-market for IC products. To address these issues, top-down methodology introduces the use of behavioral models to allow trade-offs between simulation time, accuracy and gaining insights.

The top-down loop

Behavioral models are the key enablers in a top-down design flow. Top-down design typically requires new modeling languages other than SPICE to describe block behaviors. One can use software programming languages like Python and MATLAB, or hardware description languages (HDL) like Verilog-AMS or SystemVerilog.

When I went through my graduate program, our group had a unwritten rule. No one touched PDKs without at least a year of work in MATLAB. Our daily work revolved around models and algorithms before we can finally put down transistors. Unfortunately, not many circuit design programs enforce students to pick up a modeling language skill, which is reflected in the industry today.

With the benefits of behavioral models, I often find myself in a top-down loop at a design’s early phase. Here is what I mean:

  1. Begin at the top level for the system, and assume relative ideal blocks. Verify that your proposed system/architecture works with these assumptions using behavioral models.
  2. Question your assumptions and each block’s ideal nature. Start adding non-idealities into your models and re-evaluate. The key here is to pinpoint the non-idealities that matter the most in your system, and keep the ideal approximation for other aspects.
  3. You should have the “preliminary specs” for each block at this point. Now question if these specs are reasonable.
  4. Do order-of-magnitude low level simulations for feasibility study. Note that we are already at the “bottom” layer here!
  5. Repeat the process until the specifications converge as more low level simulation data becomes available

A simplified illustration of this top-down loop is shown above. If everything goes well, we traverse on the green and blue arrows until we reach a final design. Note that the green path signifies a top-down approach and blue is for bottom-up. When people refer to top-down approach today, they are really talking about this loop, not just the green path. It’s the continuous re-evaluations and requirement updates at the model and circuit levels that ensure optimal designs and smooth executions.

Sometimes we might run into the red arrow where a fundamental limit pushes us to rethink the overall system (and worse, our career choice). While it sounds disastrous, a brand new architecture or a neat circuit trick typically comes to life to break this limit. About 80% of my current job happens when I am driving. My mind goes around the loop several times, shuffles around some blocks and plays more mental gymnastics when I believe a fundamental limit is reached. It takes some practice and time, but anyone can grow into a “system architect” after living in this loop long enough.

System architect – the man, the myth, the legend

Ken Kundert specifically wrote about system architects in another similar article. A system architect’s job is to own the top-level schematic, help define block interfaces, develop simulation and modeling plans, work with verification and test engineers, etc. A system architect basically acts as the middle man who speaks different languages to coordinate multiple efforts during a design cycle. They are the go-to person when an issue arises or change is necessary.

Sounds like a talent that’s extremely hard to come by. Yet, every team has to task a single engineer to be this person in a top-down design flow. All too often a system architect ends up being a guru with models but with minimal circuit design experience. Thus they wouldn’t spot a fundamental limitation until it’s too late.

My belief is that every designer can be a system architect to some extent and on different scales. Regardless of how complex your circuit block is, you can adopt the top-down loop methodology as long as you treat it as a system. Here are some ways for you to try and play system architect

1. Always question specifications

While specifications serve as the first line of interface between designers and the final product, that is really all it is. No requirement is sacred and no sizing is sacred, as my last manager loves to say. One example is the use of effective number of bits (ENOB) for specifying data converters. There has been a shift from using this generic figure of merit to a more application specific way of defining converter requirements. A noiseless but nonlinear ADC will impact the system differently than a noisy but perfectly linear one. So next time when you are handed a specification table, ask WHY.

2. Always question the signal nature

Most circuit requirements come from assuming some signal type going into the circuit. Sinusoidal signals have been the go-to choice because we love Fourier and AC responses. They are easier to simulate and measure. Unfortunately, almost no real application only processes single-tone sine waves. With the system architect’s hat on, you should understand fully the signal nature. There might be characteristics in the signal that can be exploited to simplify or improve your circuits. Is the signal DC-balanced? What does its statistics look like? How does it handle weak and hard nonlinearity?

3. Create simple simulatable models in schematics

Building models is difficult and requires a picking up a new skillset. However, you could build many useful models with ideal analog components without any knowledge of Verilog or MATLAB. More complex primitives are already available including delays, multipliers, converters, etc. Start building simulatable models with these components first. You will be surprised at how effective they can be in reducing simulation time and providing insights. There are more sophisticated modeling tools, like Xmodel, if you have become more comfortable and proficient later on.

4. Define symbols and pins early before drawing transistors

Lastly, a system architect has a bird’s-eye view of what the finished product looks like. Start with the end product and you will get a better picture of how to get there. Try identifying and naming the most critical pins for each cell first. While you create symbols, your mind is already computing how to connect each block and prioritizing what the do next. Empty schematics with meaningful symbols can still be full of information. Be mindful that these symbols will definitely change later, so nothing needs to be perfect. Treat this exercise just as drawing block diagrams on a scratch pad. Your muscle memory for drawing schematics will put you in design turbo mode and keep you motivated to continue the design effort.

Conclusions

The boundary between “top” and “down” is muddier than most think. Top-down design is really a mindset where designers treat the circuit block as a system rather than a soup of transistors. Education and training programs in IC design still tend to produce good designers, but do little to steer them towards becoming architects.

In my personal view, schematics and basic component libraries provide enough tools for anyone to play the role of a system architect at all levels. I encourage all students and designers to start incorporating behavioral models (with ideal components and/or Verilog-AMS) in their schematics, even if there is a separate army for system modeling. The right models can help reduce simulation efforts, assist in debug, and solidify your own understanding of the circuit.

It is no secret that polyglots have huge advantages in the globalized world, and the analogy is equally true for circuit designers. Adopting a top-down design mentality is like learning multiple new languages, which will definitely prove fruitful in the long run.

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!

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.

© 2024 Circuit Artists

Theme by Anders NorenUp ↑