IP Libraries

I’ll ask here, since I use Kicad, but it seems that I could equally ask this question on any of the commercial toolchain sites.

Background:
To reduce time to market and human error, areas such as ASIC, FPGA and software make extensive use of IP libraries, where the IP has been developed in-house, proven, and is re-used. Whatever it is has been designed once, tested thoroughly once and is known good working, if/when used correctly.
Looking at schematics in both my professional and personal life I see lots of potential IP, but I don’t see a good/easy way of using it.

What I see is that if I want to reuse part of a schematic I essentially need to remember where the part was last successfully used, and copy that part of that schematic to my current design.

Why is there no obvious push for libraries of IP in schematic capture?
I get and understand component libraries, and their importance, but a circuit is more than just any one component, and why do I need to copy a manufacturers recommended circuit from the datasheet/app note every time I use that particular device.

I would really like to be able to create a library of circuit IP, just as I do for FPGA and software, and pull circuits from that IP library, rather than start from scratch or copy from the right/wrong design.

What am I missing that makes this so undesireable, that none of the schematic capture tools appear to support it, including Kicad.

One way is to create your personal symbol and footprint libraries, and put the parts in it you have created / used, and have been verified to work. But that is only a small part of what you want.

For the rest, there is a feature request on gitlab for Design Blocks. A design block can be a partial circuit, for example a schematic for an SMPS circuit, and it’s corresponding PCB layout. In a future implementation of design blocks, such blocks can be “swapped” between pre-made modules for quick prototyping, and the parts on the module (with PCB layout) as a start for the next integration step. Going for this in KiCad is very slow though (multiple years). There are over a thousand issues and Idea’s on Gitlab for KiCad, and there is only a limited amount amount of developer time available.

It’s likely that some other EDA suites do already have (some?) functionality in this direction, but I don’t know nothing about that.

I’ve just added my support for “Support Design Blocks (reuse library) for schematics (lp:#1797683)”

I’m just surprised that IP reuse is not a bigger issue in the world of schematic capture.

This is the motivation for my circuits as code project, but it uses text instead of schematics.

I have experience with 2 commercial tools - OrCad and Altium. Both have some kind of solution to re-use the schematics/layout blocks.
I believe the main reason why there is no IP library solutions is the differences in the EDAs. There’s no easy way to use Altium schematics in OrCad and vice versa. Same goes for KiCad. Even when the Design Blocks feature arrives it will be limited to KiCad. So if you develop your schematic/layout block in KiCad it will be only available to KiCad users.

That’s not a blocker in my opinion. Changing tool flow inside any organisation is a big deal, a massive deal actually, so that design IP from Orcad is not readable in Altium or Kicad, etc, or vice versa, is not an issue, in my opinion.

Changing tool flow means that reusing any existing circuit IP just becomes orders of magnitude more difficult, regardless of how it is managed, via templates, copy/paste or design blocks.

Don’t get me wrong, it would be a nice to have, but its not an essential feature. For most organisations I think it would be enough to be able to reuse design blocks from a circuit designers existing tool flow, because they would be reusing “tried and trusted” circuits that they know work reliably/to a cost point under the conditions required for their designs. I don’t see an initial need for shared IP to be available from different vendors. What I think should be happening is that the tools should support circuit designers to leverage their own/in-house circuit IP, in/from their own designs.

In my professional life we have no in-house PCB layout capability, we draw from a pool of established layout engineers. Each uses their preferred layout tool (all use different layout tools). We do have in-house schematic capture capability though. The schematic capture tool chain is well established, and delivered through a well established commercial product. It provides netlists to our selected layout engineers. This actually works very well for us, but as far as I know it has no support for design blocks either. We obviously do reuse “design blocks”, but it’s not as clean as it could be, if the tools supported the (re)use of design blocks.

For clarity: I use Kicad in a private capacity, when I’m tinkering with things, and trying to make my life better. For the extra effort of creating a library/IP block once and debugging it, I can see that even hobby design could be really enhanced.

My best guess is, these “design blocks” are a useful thing, but not as useful as you assume them to be. There are literally millions of different electronic parts “out there”, and even if the dame partial circuit is used. size constraints may very well demand a new layout.

Also, when you consider this:

Then even if you are re-using a part of a schematic, when you send a design to a different engineer / company, they do not have the “design block” for that partial circuit. Those PCB design companies just design what their customers want.

And there is another way of sharing and reducing work. Olimex for example has made most of the products they sell also available as complete KiCad projects. You can use the design to study and learn from, but also for creating a similar PCB. ST also has a lot of their Nucleo development boards available as altium projects. I once imported a few into KiCad to test the importer and the results were quite good.
I have not checked a lot of manufacturers, but I hope there would be a trend in which de designs of demo, evaluation and breakout boards get shared freely by IC manufacturers to ease the design process for their customers.

There is a Save/Restore Layout plugin which enables block reuse with KiCad. But with the KiCad tooling available at the moment it makes sense to share the block only within an organization. If you’d want to share the design blocks with wider audience, you’d need to first set up a standard that design blocks would adhere to, such as a KLC is for symbols and footprints.

Could you share the tool name? There are not that many big tools in reality and most of them have some kind of re-use of schematics.

If you only need schematics reuse, then put the block you need on a separate sheet and make it a block in your main schematic. I did this in KiCad for all the common subcircuits I had. The point with this was to have same parts in all the products that used this subcircuit. When I found python scriptthat helped with coping the layout this made even more sence.
In Altium with have some common sub-circuits across the company. However, sometimes we are forced to change them as they might not fit the producut or the new stackup doesn’t match the one used for the snipet.

The layout, whilst not irrelevant, is not that important from the IP perspective. Every PCB will have different constraints, even if in the same form factor (# layers, #components, overall functionality). What’s critical, though that may sound like heresy to many, is that the schematic is correct. Professionaly, I expect every layout to be different, even for subcircuits that have been used for many years, but I don’t want/expect the schematic of each design IP block to change.

It would be great to be able to paste in identical blocks into the layout, but in my world, size constraints and component densities mean that every layout is unique, even identical sections of schematic will have different layouts on the same PCB because of these constraints.

Its the schematic that really matters to me, once the schematic is correct, the layout is the “easy” bit.

We’ll have agree to disagree on the importance. Schematic design bocks are much more useful to a circuit designer than layout blocks, and I’m definitely coming at this from the point of view of a circuit designer rather than a layout designer. In work we recently had an issue, which resulted in a PCB respin, where an existing design was “almost” reused. Because the circuit was redrawn rather than being available as IP/design block, a rather critical aspect was missed. No amount of simulation caught the issue. It only showed up when the prototype unit was powered up, then the problem became very obvious. Not the end of the world, but clearly no “right first time” design in this instance.

Sorry, no names, no pack drill wrt tools. I shouldn’t really be talking about work at all, though it informs how I approach my hobby designs.

2 Likes

KiCad does support hierarchical schematics, and each schematic sheet is it’s own file. The schematic sheets (files) also do not have to be in the same location. You can for example create a “design block” directory, and collect verified schematic files in that location, and then just link to them from other projects.

However, when you add schematics this way, there is no mechanism in KiCad to prevent them from being changed accidentally. Maybe you can make them read-only, generate / verify them with checksums and/or put them in GIT or similar.

KiCad is also desgined to have multiple instances of a schematic sheet, (also works very nicely with the Replicate Layout plugin). The annotation for the different instances is (I think) saved in the root sheet of each project. I’m not sure about the details, I trust you can figure them out if you put some effort in it.

1 Like

It really depends on the design process and it’s requirements. The automotive industry has strict design process requirements (automotive spice, ISO26262) and thorough EMC/EMI requirements and testing. This in turn causes bureaucracy heavy design process where partial/complete products have to be verified and validated. Having the layouts fixed for parts of the design can speed up the process significantly:

  1. once you have a working design that complies with EMI/EMC requirements you can lock this design. So when you reuse this design in new project this gives you a significant trust that the design will comply.
  2. if you use a couple of previously used design blocks (reverse polarity protection, input DC/DC switcher, low volatile DC switcher for MCU supply) the verification and validation processes can be accelerated. Even when you use existing design block with new design block this dents to accelerate the verification and validation process.

The major issue I have with this is that literature on this topic in nonexistent and each company (or even each design group) has integrate into their design process. Weather they do this or not really comes down if people involved see this opportunity, the have some spare time and are given the authority.

The was one publication of KiCad design block (snippet) use in space industry (https://www.jstage.jst.go.jp/article/jesa/1/0/1_31/_pdf/-char/ja)

Obviously one design block layout works only for the same stackup, DRC settings and other const4raints. But you can have multiple design block layouts for the same schematic block.

Now where KiCad fits in all of this. As paulvdh mentioned, KiCad schematics file by design support use of a schematic file in multiple projects. This makes the implementation of schematics design blocks quite easy. The only downside is that as the file is used in other project, the file gets changed. So you can not use timestamp to check if there were any schematics changes. But it is not that hard to write a hashing function which checks only the schematics part and ignores project specific part.

This functionality (use of same schematics file in multiple projects) might be removed sometime in the future. IIRS Wayne mentioned this somewhere (Zuplip group, google groups, Gitlab comment in some issue, …)

For layout design block there is already mentioned Save/Restore layout plugin which works basically as Replicate Layout plugin across different projects. I think there is work to implement both features natively in KiCad (replicate layout, layout design blocks), but I think it is too soon. I think it would be better to implement padstacks first.

1 Like

KiCad also has a Schematic Blocks Plug-in, in the plugin and content manager. I have not used it myself (and therefore did not mention it earlier) and am not sure what it does exactly. It’s description is:

Schematic Blocks Plug-In

A plug-in can be used to save circuits as blocks. Then these circuit blocks can be reused in different projects. This plug-in aims to reduce schematic drawing time significantly.
To create a schematic block, first, select the circuit and copy it to the clipboard (Ctrl+C). Then open up the plug-in and give it a name by writing it in the text field at the top. Click the “Save Block” Button to save it in the working directory. If you want to change the working directory, you can click the “Change Working Directory” button. All the blocks are saved in the working directory. Also, all the blocks in that directory will be listed in the List box.
To import a Schematic Block to the project, first, select the Block in the plugin and click “Import Selected Block to Clipboard”. Go to the schematic and paste it on the sheet.
Metadata

Package identifier: com.github.Sajitha-Aldeniya.KiCAD-Schematic-Blocks-Plugin

License: MIT

Author: Sajitha Aldeniya

web: Sajitha-Aldeniya (Sajitha Aldeniya) · GitHub

Maintainer: Sajitha Aldeniya

web: GitHub - Sajitha-Aldeniya/KiCAD-Schematic-Blocks-Plugin: A plug-in can be used to save circuits as blocks. Then these circuit blocks can be reused in different projects.

Resources

homepage: GitHub - Sajitha-Aldeniya/KiCAD-Schematic-Blocks-Plugin: A plug-in can be used to save circuits as blocks. Then these circuit blocks can be reused in different projects.

Thanks. I’ll try that and see how it goes.