Constructor
new Pin(coord, name, instTermNumber, net)
Generates a pin.
Parameters:
Name | Type | Description |
---|---|---|
coord |
Coordinate | the coresponding coordinate |
name |
string | name of the pin, e.g. "gate" |
instTermNumber |
number | number for matching with ADS pins |
net |
Net | the correspondind net/potential |
Properties:
Name | Type | Description |
---|---|---|
coord |
Coordinate | the coresponding coordinate |
name |
string | name of the pin, e.g. "gate" |
instTermNumber |
number | number for matching with ADS pins |
net |
Net | the correspondind net/potential |
Methods
clone() → {Pin}
Clones the instance.
This is not a deep clone. Neither coord nor net is cloned.
Returns:
the new instance
- Type
- Pin
deepClone() → {Pin}
Clones the insstance with the param coord.
The param net will not be cloned.
Returns:
the cloned pin
- Type
- Pin
findPosition(placement, pinsopt, instanceCoord, wires, _nets, coords, relativeCoordsopt) → {Pin}
Search the position of this pin using hints from existing wires, coordinates and the main coordinate of the component.
Creates a new coordinate if no existing one is found in a certin distance.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
placement |
Object | general component placement information |
||
pins |
Array.<Pin> |
<optional> |
[] | list of all pins |
instanceCoord |
Coordinate | the component position |
||
wires |
Array.<Wire> | list of all wires |
||
_nets |
Array.<Net> | list of all nets |
||
coords |
Array.<Coordinate> | list of all coordinates |
||
relativeCoords |
boolean |
<optional> |
true | set to false if the pin should not be scaled, mirrored, etc. |
Returns:
the new pin
- Type
- Pin