Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Digital to Kicad exporter #464

Closed
rraider opened this issue May 27, 2020 · 2 comments
Closed

Digital to Kicad exporter #464

rraider opened this issue May 27, 2020 · 2 comments
Labels

Comments

@rraider
Copy link

rraider commented May 27, 2020

I'd like to be able to export a circuit directly to Kicad in order to speed up designing processes and verify the design.

@hneemann
Copy link
Owner

That would be very difficult to implement. The only thing I could imagine would be exporting a netlist. But how useful that would be, because connectors etc. would be missing.

@mplucinski
Copy link

mplucinski commented May 11, 2024

Hello, from what I've seen, nothing is going on in this area. Because of that, I've decided to play with this a bit in my fork:

https://github.com/mplucinski/Digital/tree/kicad

The code is quite dirty, but I'm already able to export the basic structure of the project. All built-in parts are handled as hierarchical sheets, user defined parts get their own hierarchical sheets too. There's still no wiring and only very few parts are supported yet. Only CLI export is implemented right now. (note to anyone going to try it: some paths are hardcoded, including my home directory, if you get exceptions about missing files, you need to adjust the paths in KiCadExport.kt)

The basic idea is that the user should be able to configure an "implementation" for each element, including the logic family, parts numbers, values, etc. Based on the user choice, an appropriate hierarchical sheet is placed in the generated schema.

For example, a NAND gate can be implemented as TTL 74xx chip, CMOS 40xx chip, discrete TTL, discrete DTL, discrete RTL... . Each of these will have its own "kicad_sch" (hierarchical) sheet file. The user can switch between these implementations by going to a NAND gate settings, probably to a new tab, and choosing an appropriate variant. Some variants may have sub-options, e.g. TTL can offer a choice between H and LS sub-families, between 7400 and 7424 chips, etc.; RTL may offer setting transistor model and resistors' values, etc. To simplify this, a global setting is also available in the project configuration, which presets configurations of all elements. E.g. user can select "TTL 74xx" globally, and all parts, that don't have a local override, will use this family only.

(the "selection" part is not yet implemented, at the moment every supported part has only one "implementation" which is always used)

Some things I'm still undecided how to solve:

  • external connectors - perhaps could be handled in the input/output parts settings (but how exactly?)
  • power on the board - can be specified with a new special part
  • footprints - on the basic level, can be specified per part as a string. Not very user friendly - it'd be better to have a selector similar like in eeschema, but this would be much more effort to implement
  • multi-unit parts, like 74xx chips in eeschema - all gates of the same type and logic family have to be gathered together and assigned chips (e.g. 4x TTL NAND -> 1x 7400). I still need to think on how to make it play well with hierarchical sheets.

Placement algorithms aren't really my strength, so the elements are currently all over the place. It shouldn't matter for KiCad, but may be very important for human inspection/manual adjustments.

@hneemann What do you think about the idea? Is it something you'd see as a good thing to add to Digital? Or perhaps as a plugin? (there's no plugin support at the moment, if I'm not mistaken). It's implemented in Kotlin btw, hope it's not an issue.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants