kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #42110
Re: [RFC] Symbols and Pin mapping in v6 - Proposal
-
To:
kicad-developers@xxxxxxxxxxxxxxxxxxx
-
From:
Johannes Sprigode <jos@xxxxxxxxxxx>
-
Date:
Wed, 18 Sep 2019 12:56:16 +1200
-
Autocrypt:
addr=jos@xxxxxxxxxxx; keydata= xsBNBFpDLzIBCACqxSP3Ctfpu8McGO6C8jlhZJdWHA/QpEdvrczSR+ImnpaW/lx7kGXgHvM+ 2xK/1mXyDw8j9/0u0rVFfgENZYmtswext0mr7i9a4YZnI2TURlEKkUBLfrh+ilTxF03c4Jb3 1PCllCPfxdeOqeHR5qMq4/WJFERR8Jkhqho333nQ9ekSNdiKv+zerxYKghX9lp9BRDL9s2/2 9OFo26ZimUI5XRl3CMvHn5CmCFX7cqXqAJRxVyOGeQGL04+c/o0FTOBpK2170suBtHPddXkF sTGYigjyEpG7UB/7O9P16tW/z1HNOzk0Gc09lJ3+LhnxDhWySAsH1p77WREaXkeWKHXXABEB AAHNI0pvaGFubmVzIFNwcmlnb2RlIDxqb3NAdmZlZHRlYy5jb20+wsCUBBMBCAA+AhsDBQsJ CAcCBhUICQoLAgQWAgMBAh4BAheAFiEE60l7KEo1nMQG9OvQelodVk+2oksFAlv8m3sFCQOa n8kACgkQelodVk+2okvYGQf+Kzs0Ezv/f6NRyxt+1NFjQqS8XKnF/Y9Q+g3MLwRYFT1Gnsj0 2eZUp7WFiuRfFrLdPA4GBkJfp7+7KuQqMChiYYspR3gwde7gyeJPSfhUW4eSkOb8u2nHH7pa /rEhNLnboXfMswC/iC/aLDV1OgyQaitGaP3bNcPWvK+xwMgTli6eD3r4UvA6+5aaghs66bAt a1WSLESdzau0RsGNdOBTLZrqwvmlOsfHOz7aWVbXUa2lBSDY/pE3Bq/x9aJZdfn2iMTgieU+ USJ/v5slDaifQr2CxLwYNaN0PGoQYS8B7JRHLdz421hdtrolS4NJtnbofacAziAtdajsCPuZ LVtZTc7ATQRaQy8yAQgAx3VWcy97OGM9UWlLLmqpeHH2NfGLDeMeAp43sK3PBOaQmK0PxBSC CJoVc9jbQCtdLm0PJPVjAK9Wrwz2tDCHgaq72dekOB0Ksfp081imazWCWZUzjXwFrcz4oXN5 zUrnxMdS1hrpckvMEEUBEJTXaUnce/WjMZoyV48QEVnJjC2uAqgwrf9UdCu8yZTrAW/EGgRK E0Wncz7htoBygeQMeCq1aGtMCAxEXlSUH9CNyvRJuFF/2QxOTAIFO2sq5gvnWZtr8rpyceL8 gvxvozKVEAuJPuEViabXjdQv6LSWX2TiKEq1Sgnq7tgNS5cbAKWI1HAAfyFeVLmBa1z/qgSW LQARAQABwsB8BBgBCAAmAhsMFiEE60l7KEo1nMQG9OvQelodVk+2oksFAlv8m3sFCQOan8kA CgkQelodVk+2okuTogf+LV8I9jKeiAgSs+/ecqjQ+tl6c4nPQAWSZrEGa66jkGxjg6avnTGC qbx0jS6ZGQ1DFGcjQ/ckW4VqRcZM2E3Xcwi4FfxrLpJTVr7yT5cv76ELBq7dM3nVcLnoy2Pj 0sUxP6AeT3IJs4fToA73PjcW8Coc2H4c3txVIuDbfBhi9EHogbTgCs7Fi+3SBhCkPim485yE J8Bg1Sl3C9+4mi2IIUchKJkitQFyHzT7RqPzSjs6HJtK3uLGQWHOvoUNdQ7zJHa/074VYgoB I1uPqXAhbRXLZCbq3x2fljfMls6vlpsCcbJ3LdpcaLBzxJwtg+863EK+KlMWogk21NdAi1vC oQ==
-
In-reply-to:
<CACp=Vfbpc0_ThzuOARRUs_RmPfsr2z0MJknNZy+HykowL7TRtA@mail.gmail.com>
-
Openpgp:
preference=signencrypt
-
Organization:
vfed technologies
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
It is obvious that there can be only one physical pin as SCH_PIN which
in turn however can be referenced in a multitude of functionalities. A
very simple solution below.
There is a
class SCH_PIN ...
and there is
/// A container for several SCH_PIN items
typedef std::vector<SCH_PIN> SCH_PINS;
As the comment for above typedef already suggests SCH_PINS should be a
public property of SCH_PIN as a container/(collection) class rather than
just a typedef.
SCH_PINS then contains, among other properties as required, SCH_PIN as a
property.
With that, just about any level of device functionality can be defined.
If SCH_PINS is nil then the one and only SCH_PIN is seen by the system.
With SCH_PINS (as a selectable property) <> nil that selected PIN is seen.
A basic real world example
SCH_PIN 3 can be (in any desired order, whatever the preferred prime pin
should be)
PE0
PTCXY
ACO
CP4
SDA1
SCH_PINS = nil --> SCH_PIN = PE0
SCH_PINS = ACO --> SCH_PIN = ACO
etc ad infinitum
With this kind of object structure it is easily possible to go 'down'
many levels, however, the system always sees just one SCH_PIN relevant
for all the follow through connections, tests etc.
Cheers
On 17/09/19 10:03 PM, Ian McInerney wrote:
> Unfortunately, no I don't agree that the grouping should be by
> peripheral. The purpose of a schematic is to capture the electrical
> connections of a circuit, and allow the designer to reason about it.
> On most chips, the electrical specifications of the same peripheral
> type can differ between instances (e.g. I2C0 has different specs than
> I2C1 because they use different pins).
>
> The most useful grouping for capturing these differences are the ports
> (since those map to the raw pins). The electrical characteristics are
> usually defined on a per-port basis (so all pins of a port will
> usually share the same Vcc, contribute to a per-port current
> limitation, have the same voltage tolerance, etc). If you abstract the
> IC into the peripheral functions, it becomes a lot harder to analyze
> the electrical characteristics when doing a proper design. For
> instance, say you want to use the STM32F413ZH. This chip has multiple
> SPI ports, but one of them (SPI1) has pins that are not 5v tolerant,
> and are only 3.3v tolerant. It becomes easier to analyze and work with
> when you group by port/pins because the datasheet doesn't tell you
> that SPI1 as a whole is not 5v tolerant only that pins PA4/PA5 (which
> it uses) are not 5v tolerant. This limitation is also present for all
> other peripherals that share those pins.
>
> This same reasoning also applies to FPGAs, and I think it is better to
> keep the same reasoning across device types so people don't have to
> learn multiple ways of using the symbols and analyzing the design.
>
>
> As for the generation of pin constraints to map into the embedded
> software, I have been thinking of ways to do that but I haven't had
> time to write up a full RFC for it. I am approaching it from an FPGA
> viewpoint first though, since those pin constraint maps can be very
> tedious to write and it would be nice to ensure there is consistency
> between the schematic and the options (such as pull-up/down status,
> CMOS voltage level, etc). Initially I am thinking of just introducing
> text fields the user fills in, but I am also going to investigate if
> we can define a new properties field type for selecting values from a
> discrete set. Then the symbol can define the valid field values and
> the user can choose from them. This will be a long time in
> development, since it will rely on the new file format and also
> Eeschema Python bindings for generating the constraint files.
>
> -Ian
>
> On Mon, Sep 16, 2019 at 7:51 PM Andy Peters <devel@xxxxxxxxx
> <mailto:devel@xxxxxxxxx>> wrote:
>
>
> > On Sep 16, 2019, at 6:12 AM, Clemens Koller <cko@xxxxxxxxx
> <mailto:cko@xxxxxxxxx>> wrote:
> >
> > Hello, Tim!
> >
> > I agree that in the near future, the demand for (I'd call it)
> "Table Based Design Entry" will rise tremendously,
> > when we reach pincounts in the high hundreds and thousands.
> >
> > It is a lot of work to draw and maintain complex MCUs/SoCs/FPGAs
> in some schematic when pins can have 8 different functions which
> might change during product development. A current example: i.MX8
> [1] with i.e. 625 pins.
> > So, it might not even be sufficient to be able to import (and
> export) .CSVs. It might be a good idea to prepare for some
> automatism to be able to update and version control pin
> multiplexing changes!
>
>
> How about this?
>
> We can all agree that grouping MCU pins by peripheral makes the
> most sense. So rather than having a big box symbol (or symbols)
> with pins in a default order, why not have each part of a
> component be a peripheral? Instead of having a multisymbol part
> with one or two or three boxes for my EFM32GG11B820F2408GL192 in
> the library, instead of EFM32GG11B820F2048GL192 as the part name
> and within the part have all of the valid peripherals for that
> device?
>
> Here’s the cool thing. This device has, say, I2C0, I2C1, I2C2,
> UART0, UART1, USART0, USART1, TIMER0, TIMER1, all of it, and there
> are a fixed number of peripherals for a given device. Each
> peripheral is a symbol (a sub-part of the device) you can place on
> your schematic. Need a UART? Place the EFM32GG11_UART0 symbol on
> the schematic. Since this particular chip family gives you several
> choices for each pin, the symbols are “Smart” and have a drop-down
> menu you use to assign the pin. Those assignments also
> automatically set pin direction and the other ERC stuff. For
> peripherals which have one location for their pins obviously this
> drop-down doesn’t exist.
>
> Cool, right? It can be better. Any pin not explicitly designated
> for a peripheral that can be used as GPIO gets enabled in the GPIO
> symbol. In that symbol then you set the direction, etc after you
> place it on the schematic.
>
> Since all of the ARM vendors these days have some kind of software
> tool that handles peripheral setup including pin assignments,
> having the ability to read that output (whatever it is) and then
> parse it and set up the individual blocks would be very cool.
>
> Right now I just rely on sensible net names to keep my MCU pinouts
> straight. I used to make a custom symbol for each MCU in a design
> but that got to be too much.
>
> FPGAs are a different can of worms.
>
> -a
> _______________________________________________
> 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
Attachment:
signature.asc
Description: OpenPGP digital signature
References