Video demonstrating prototype analog/mixed signal CAD flow with Kicad (w / hierarchical symbols)

Greetings fellow Kicad users/developers and chip designers,

I have been working on an IC RF/Analog/Mixed-signal design flow using KiCAD eeschem as the schematic capture front end to a design framework called Confirma. This has been a multi-year project for me.

I’ve decided to share some of the progress through a 9 minute youtube video showing synthesis and spice simulation of a digital logic circuit within this design flow as a demonstration vehicle.

You will see the following in this video,

  1. a gate netlist and simulate-able kicad schematic test bench that is automatically created from a user defined truth table.

  2. The simulatable eeshema test bench schematic with hierarchical symbols (symbols with underlying schematics). Note: These hierarchical symbols work the same as in other commercial tools, such as those from Cadence and Mentor, and may be kept in standard kicad libraries for reuse across projects.

  3. A glimpse on how the schematic hierarchy is viewed and navigated from the confirma design cockpit.

  4. Creation of the spice netlist from the eeschema schematics using the custom Confirma hierarchical netlister

  5. simulation of the design and plotting of the results.

Confirma is meant to replicate a Cadence/Mentor type analog IC design flow. It allows for interaction with IC layout tools such as Calibre, etc. A variety of spice simulators may be plugged into the flow.

It is pretty far along but not yet ready for wider testing. This is just a quick snapshot to get a feel for what has been implemented.

Here is the link.

Confirma chip design flow with Kicad

All the best!
Kevin

Its a bit out of my area, but I can appreciate the work you have put into it. I do have an OT question: what motocross bike is that? I see fork boots, so guessing mid/late-80s.

1 Like

hahaha, good eye there! That is my 1980 Husqvarna 390 CR. I have several vintage MX bikes. My wife thinks I am getting too old for this!

IMG_20241123_203223|281x499

Nice. Love radial fins. I had an 87 yz250, but the one I lusted after in high school was the then-new 73 cr250m elsinore. Need to make a kicad model for a magneto now, to get back on topic :slight_smile:

Interesting concept. One practical suggestion, your video is a bit hard to follow because it is a video of a computer screen (which sometimes isn’t in focus or close enough to see what is going on) and the narration appears to have been sped up so the audio is somewhat difficult to understand at times.

I recommend using a tool like OBS or the Windows 11 Snipping Tool to create screencasts like this by directly capturing your screen. If you are uploading to YouTube, I would leave it at normal playback rate, since the YouTube player lets the viewer speed up or slow down the playback if desired (and will do a better job speeding up the audio in my experience)

1 Like

Hi Jon,

Thanks much for your suggestions on OBS etc. I have started looking at it as admittedly my vid is quite terrible, ha!

Would you have any recommendations on best method these days for distributing this work? This would be in the form of executable code, kicad libs, documentation and app notes. Ive only just started to look into setting up a web page for it but perhaps there is a better way.

Thanks again for your reply and comments!
Kevin

Is your work going to be an open-source project? If so, a reasonable default is to use GitHub. You can use GitHub pages for the website / documentation hosting, and GitHub releases to publish the binaries.

If this is a closed-source/commercial project, probably a custom website is what I would do.

OK… as pointed out, my 1st attempt at a video is less than stellar! Sorry to those who suffered through it! :slight_smile:

Never-the less, I did what to share my approach for implementing hierarchical symbols (symbols that are attached to schematics) in case it may be helpful to kicad developers working to implement this capability into a future release of Kicad. Perhaps it will provide a useful roadmap.

First, let me say, I did make an attempt at trying to do this within kicad code. Frankly, that is way beyond me. I am a chip designer, not a software expert. Also, everything I have done here is from the point of view of rf/analog chip design flow as it might look like using Cadence tools.

So here we go.
As truly excellent as Kicad is, a key shortcoming for my purposes is the capability to have hierarchical symbols with underlying schematics that can be kept in symbol libs for reuse across projects.

To solve this, I first reorganize the file structure for each kicad library, adding additional folders for schematics and spice circuit files as well as other folders for special purposes. These new folders hold schematics and spice netlists for the symbols that make up the particular library. This approach would look familiar to users of Mentor Dx Designer.

Here is an example for a symbol library folder for a set of spice simulatable behavioral cells within b_analog. Folder “sch” holds the schematics, “cir” holds the spice netlists, etc.

folder_layout

b_analog is the eeschema nickname for the symbol library b_analog.kicad_sym

Other library folders, say b_digital, b_pll are arranged in a similar way. In each case, the schematics for the hierarchical symbols are kept in the “sch” folder for the corresponding symbol library.

Here is an example of a behavioral rf library as it appears in the symbol editor. The shown symbol is a spice simulatable lc filter. The bandwith may be passed as a parameter into the schematic. The symbol as defined within it a “Typ” parameter that is set to “sch:” . This identifies the symbol as a hierarchical symbol and tells the spice netlister to look for and netlist the underlying schematic that is attached to it.

And here is the schematic that is associated with the filter symbol.

The above is a very brief description of how Ive organized the libraries for hierarchical design. Keep in mind that this does not work with standard kicad spice netlisting. I have had to write my own hierarchical spice netlister outside of Kicad to implement this capability. At some point Id like to make this available or perhaps Kicad will have something like this in the near future.

Continuing on a bit, here is the top level test bench schematic shown in the video.

This has a variety of symbol “typ” 's in it. "sch: type symbols have underlying schematics. “net:” type symbols point to text based spice netlists kept in various libraries that are accessed during simulation.

It is desirable to transverse the design hierarchy and open underlying schematics. I do this through the Confirma analog simulation cockpit via a hierarchy navigator. This is the left side panel with the “up” / “dwn” buttons. The “sch” button opens the schematic selected in the symbol list.

The re-netlist/Fast Netlist buttons to the right activates the hierarchical spice netlister. The resulting netlist is displayed within one of the tab windows in the middle. “Sim Netlist” sends the netlist together with any reference libraries, foundry libraries, etc to the chosen spice simulation engine. The spice engine may be topspice, ngspice, qspice, ltspice, smartspice, eldo and even spectre, whatever the user decides to plug into the framework.

The Confirma framework has been in use for a long time but with Mentor Dx as the schematic capture front end. Mentor has become difficult to work with and this is what has driven the effort to use Kicad. A big plus is that, with Kicad, you will never lose access to your schematic IP.

Finally, although the focus is on chip design, this flow also works well for system development. With enough spice simulatable behavioral components, it is fairly straightforward to put together systems as you would in matlab/simulink. Spice is actually a great simulator, especially that ngspice now that I have had a chance to use it a bit. Bravo to that Holger guy!

All for now… Kevin

My current thoughts are that I would make the entire flow available free. However, this would be for the binaries and not the source code. The main reason is so I can keep track of things as I progress with new feature. I dont think I could manage source code changes I didnt make myself.

I am not sure if this meets the definition of open source or not.

I am not looking for a new job! :slight_smile:

Up to you, but open-source does not imply an obligation to accept code changes from anyone. There are some high-profile open-source projects that do not accept any outside contributions. The typical definition of open source just relates to users being free to view and modify the source code themselves, and does not say anything about how you manage the project / whether users are free to contribute to the project.

@teletypeguy We must be around the same level of “experience”. I had a 74 yz125 and TM 125 followed by a variety of 250’s and open bikes. Currently have some yz465/490’s, Maico’s and Huskies. Breaking bones over the last 10 years is slowing me down now Im afraid. I still have all these and more.

A while back I started to collect papers on magneto ignitions and CDI circuits with the idea of modeling them on spice. That has taken a back seat to other projects.

@craftyjon Thanks Jon, much appreciated.

Still coming up to speed on this world. It seems what I want to do is allow free usage but not yet sure about the opening the source code. Thanks again, Kevin

2 Likes