astrimid - I'd like to extract the new proposed...
I'd like to extract the new proposed API here from the previous thread on dual package mosfet chip representation. The phase 1 of the proposal includes: 1. New ChipProps extensions to add: schDisplay?: "expanded" "collapsed" "hidden" Support for <internalcircuit as a child pinMap
I'd like to extract the new proposed API here from the previous thread on dual package mosfet chip representation.
The phase 1 of the proposal includes:
1. **New `ChipProps` extensions** to add:
- `schDisplay?: "expanded" | "collapsed" | "hidden"`
- Support for `<internalcircuit>` as a child
- `pinMapping` functionality
2. **New `<internalcircuit>` component type** with its own props interface. This is added to `<chip>` but may potentially be extended to other components (maybe even user defined elements, like custom/simplifed schematic view for `<group>` or `<subcircuit>` while keeping pcb/bom representation intact)
3. **Reference designator composition logic** to combine chip name with child names (e.g., "Q203" + "A" = "Q203A")
4. **Pin mapping reconciliation** to validate that internal primitive terminals map correctly to footprint pins
Phase 2 makes the approach more generic, by introducing `schOnly` and `pcbOnly` attributes or some other way that extends beyond `<chip>`.
The `schOnly` and `pcbOnly` attributes already defined in `ConstrainedLayoutProps`, so `<constainedlayout pcbOnly><chip></constrainedlayout>` should already work, but `constainedlayout` element isn't registered in core and doesn't have any influence so causes compilation error.
A
astrimid
the naive representation would be:
```
<chip name="Q203" pcbOnly>
<mosfet name="Q203A" schOnly>
<mosfet name="Q203A" schOnly>
```
But that loses references between those, e.g. if I want to display physical pin numbering on logical schematic elements
A
astrimid
tagging <@1079361271687807026> as he was the one proposing `<internalcircuit>`
M
Mustafa7
We cannot make any decisions without seve. So cc <@757706909351411845>
Seve
Hello
A
astrimid
FWIW, `<schematicbox chipRef="Q1"/>` + `noSchematicRepresentation` for `<chip name="Q1">` seems to do the trick. But I still feel API could be more intuitive.
should i revert what we did till now for internalcircuit?(its almost done, just the displayName for internal components has to be set in core)
Seve
<@1079361271687807026> you should do `<schematicsymbol chipRef=".U1" symbolName="mosfet..." />` for the mosfet symbols i think
Seve
<@1079361271687807026> yea i mean i think if we do the revert in one big PR- it might be easier for us to come back to it later (especially if the title is pretty explicit)
Seve
i think we'll maybe bring back internalcircuit when we do advance spice modeling (maybe- there are also other ways to do that)
M
Mustafa7
So should I revert it and then we should implement the above style with schematicsymbol?
Seve
yea i agree with that
A
astrimid
the current blocker is `noschemaicrepresentation` leaves orphan traces behind. Does using `<schematicbox` approach mean the mosfet flipping logic should be reimplemented?
Also, using `Q` name for `<chip` as it's a mosfet creates a warning that I should name it `U`. Ignorable but annoying, leaky abstraction
A
astrimid
I guess, it also means I can't use mosfet simulations either, as it's opaque chip
A
astrimid
OTOH, separating schematic box out of `chip` means we can compose new functionality on top of `<schematicbox` as it's a cleaner representation of underlying `circuitjson` concept?
A
astrimid
I quess now we need some `<electicalbox` counterpart that could cleanly represent any of mosfet, resistor, capacitor, diode, etc? and possibly extend `<chip` and `chipRef` into any pcb component that might have different schematic representation, or even multiple pcb components or subcircuit mapped to a single `schematicbox`?
A
astrimid
or maybe the `<schematicbox` should have some internal model projerty that represents `<mosfet` and display it both as a symbol on schematic and simulated on electrical model, but doesn't have any schematic nor pcb nor bom domain.
A
astrimid
I'm still dreaming of some `<circuitjson>` component or API, from which I could layer my own primitive components and props when tscirciuit falls short. But maybe even `circuitjson` has its limitations?
Seve
<subcircuit circuitJson={circuitJson} /> should work for that
Seve
subcircuit also has showAsSchematicBox
A
astrimid
> <subcircuit circuitJson={circuitJson} /> should work for that
It has some key limitation: it's an isolated namespace
Seve
right yea
Seve
you can do `exposedNets` etc. to explicitly expose stuff tho
Want to add to the conversation?
Reply in Discord so your notes stay connected to the source.