Ahmed Reda
02/27/2023, 12:27 AMMitch Bailey
02/27/2023, 2:18 AMbase/netgen.c
/*----------------------------------------------------------------------*/
/* Series and Parallel combination: */
/* All devices of the same type that exist in series and parallel */
/* combinations will be treated as a single device in a network. */
/* Series connections are only allowed for resistors and inductors. */
/* Any device may be connected in parallel. For combinations of series */
/* and parallel, as in a resistor network, there is a set of rules: */
/* */
/* Running parallel and series checks: */
/* 1. Run parallel once. If a repeat run and no devices are merged, */
/* then go to 4. */
/* 2. Run series until no devices are merged. */
/* 3. If series ran more than once, then go to 1. */
/* 4. End merge */
/* */
/* Each merge procedure, when it finds two devices that can be merged, */
/* removes the second device from the netlist and adds its properties */
/* to the first device. If a series merge, then the nodes are adjusted */
/* appropriately. Where A is the property list of the first device and */
/* B is the property list of the second device, the first and last */
/* properties of A and the first property of B may require a marker to */
/* indicate the topology of the network, as follows (in order): */
/* */
/* For a parallel merge: */
/* 1) If A has series components then tag first property of A with */
/* "open" and tag first property of B with "close". */
/* 2) If B has series components then tag first property of B with */
/* "open". */
/* */
/* For a series merge: */
/* 1) If A has unbalanced "opens", then add "close" to first */
/* property of B to balance the "opens". */
/* 2) Always tag B with "series". */
/* */
/* Tags are indicated by a property named "_tag" which has a string */
/* value of ordered characters, "+" for series, "(" for open, and ")" */
/* for close. A device with only one property record has no "_tag" */
/* record. A device which is in parallel with the device(s) in front */
/* of it is implicitly parallel by not having an "+" tag, and may not */
/* have a tag at all. */
/* */
/* The property check routine is responsible for comparing device */
/* series/parallel networks against each other. Otherwise, each */
/* series/parallel network is considered topologically as a single */
/* device, and any differences in the series/parallel networks between */
/* two circuits being matched will be treated as a property error. */
/*----------------------------------------------------------------------*/
So the layout is a loop of 8 resistors, with none in parallel and all in series. The comment seems to indicate that series reduction will be performed until one device remains.
The netlist is a loop of 2 resistors, these are reduced parallelly (new word) to one resistor.
The CombineSeries
routine needs to stop if it reduces to a parallel combination, but the function comment states
/*----------------------------------------------------------------------*/
/* Find all nodes that are connected to exactly two devices of the same */
/* class. Where found, if the device is allowed to combine serially */
/* (check properties), then remove the node and merge the devices into */
/* one. */
/* */
/* This routine depends on CombineParallel() being run first so that no */
/* parallel devices are reported as series. */
/* */
/* Return the number of devices merged. */
/*----------------------------------------------------------------------*/
Maybe a parallel check is needed in CombineSeries
.
Another consideration (possible solution) is that ports should probably not be deleted during series reduction.Ahmed Reda
02/27/2023, 1:55 PMTim Edwards
02/27/2023, 2:12 PMAhmed Reda
02/27/2023, 2:32 PMrpx1.spice
LVS output comp.out
and gds rpm1.gds
Mitch Bailey
02/27/2023, 2:34 PMAhmed Reda
02/27/2023, 2:37 PMnetgen -batch lvs "rpm1.spice rpm1" "rpx1.spice rpx1" /home/ahmedreda/PDK/sky130A/libs.tech/netgen/sky130A_setup.tcl
Tim Edwards
02/27/2023, 2:47 PMTim Edwards
02/27/2023, 3:03 PMMitch Bailey
02/28/2023, 12:15 AMLVS REDUCTION PRIORITY {PARALLEL | SERIES}
There may be a mismatch if only one side needs to be reduced. For example, a simple 2 resistor loop with one port can be series reduced to a resistor with both terminals connected to the port or parallel reduced to a resistor with one floating port.Tim Edwards
02/28/2023, 3:34 AM