← Back to team overview

kicad-developers team mailing list archive

Re: Feature Proposal: Schematic Netlist modules for Eeschema/SKIDL hybrid

 

On 5/2/19 9:34 PM, Jon Evans wrote:
> Neat idea, Russell!
> 
> In theory, this is possible.  In practice, there are many challenges to
> overcome.
> 
> The internal representation of the schematic does not resemble the
> netlist that is given to PcbNew.
> So, a PcbNew netlist (whether generated by SKIDL or anything else) would
> have to be "imported" to
> the schematic in order to create a "Subsheet from Netlist" as you describe.
> This import process would need to parse the netlist and generate the
> internal connectivity state
> to allow the schematic connectivity code to work with that subsheet the
> same way it works with
> regular graphical subsheets.
> 
> That part is technically possible, but the surrounding code to make this
> a nice experience would
> also be a significant task.  How would you edit or update the underlying
> SKIDL code generating the
> subsheet?  How would you display ERC errors that involve both a
> graphical schematic and a subsheet
> created from a SKIDL netlist?  Would you be able to make changes to the
> components on the subsheet
> generated from a SKIDL netlist (for example, to edit properties) using
> the Edit Symbol Fields
> dialog and other things that interact with objects across the whole
> schematic hierarchy? If so,
> would you be able to back those changes out to valid SKIDL code?
> 
> I don't mean to discourage you or others from pursuing things like this,
> I just want to caution
> that there would be many, many details to talk through and figure out
> before a feature of this
> complexity could be added to KiCad.
> 
> A route that may be easier to implement, and less intrusive, would be to
> wait for the coming
> Eeschema file format update and Python API, and add support for
> generating schematic sheets to
> SKIDL itself.  Of course, the complexity there would lie in the
> algorithm for laying out the
> items described in SKIDL in a graphical fashion.  But, it doesn't have
> to be pretty as long as
> it is electrically consistent.  You could then include the generated
> sheet as a subsheet in the
> normal fashion, and update it using Python (since SKIDL is implemented
> as a Python library, it may
> be possible to have fairly tight integration between SKIDL and KiCad
> once the Python API is more
> stable and it is possible to interact with the schematic using Python).

This is probably the best course of action.  Once the schematic and
symbol library code is swigged out to Python, integrating functionality
as a third party Python script should be possible since all of the low
level objects will be exposed to Python scripting in much the same way
as the low level board objects are exposed in the board and footprint
editors.

> 
> Best,
> Jon
> 
> On Thu, May 2, 2019 at 9:16 PM Russell Oliver <roliver8143@xxxxxxxxx
> <mailto:roliver8143@xxxxxxxxx>> wrote:
> 
>     Hi All,
> 
>     First off congratulations to everyone involved with KiCon for making
>     it a success and the great progress that is happening with Kicad at
>     the moment.
> 
>     I've been following Dave Vandenbout's work on SKIDL [1] a while but
>     his talk [2] at the conference on SKIDL really showed the power that
>     programmatic circuit design could bring to electronic design
>     especially with a simulation/optimization loop.
> 
>     To that end I wondered weather it would be possible to include the
>     netlist output from a SKIDL script into a traditional schematic,
>     allowing for the best use of both worlds?
> 
>     Given that we currently have subsheets that can be reused multiple
>     times, could it be possible through the inclusion of a netlist reader
>     into Eeschema to read either a netlist file directly or the result of
>     executing a SKIDL script and incorporate that back into the larger
>     netlist?
> 
>     I can imagine a type of hierarchical sheet where the user can specify
>     the nets to be shown as sheet pins, which would be connected to the
>     matching nets from the netlist file.
> 
>     My question to those with more knowledge of the current netlist
>     generation algorithm is how possible this would be?
> 
>     [1] https://github.com/xesscorp/skidl
>     [2] https://www.youtube.com/watch?v=WErQYI2A36M
> 
>     Regards
>     Russell Oliver
> 
>     _______________________________________________
>     Mailing list: https://launchpad.net/~kicad-developers
>     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     Unsubscribe : https://launchpad.net/~kicad-developers
>     More help   : https://help.launchpad.net/ListHelp
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


Follow ups

References