Packing
packing
Utilities for packing KCells and Instances.
pack_instances
pack_instances(
target: KCell,
instances: Sequence[Instance],
max_width: int | None = None,
max_height: int | None = None,
spacing: int = 0,
) -> InstanceGroup
Pack KCells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target
|
KCell
|
KCell to place the packed instances in. |
required |
instances
|
Sequence[Instance]
|
Sequence of Instances to pack. |
required |
max_width
|
int | None
|
Maximum width of the packed rectangle |
None
|
max_height
|
int | None
|
Maximum height of the packed rectangle |
None
|
spacing
|
int
|
Spacing between the instance bboxes |
0
|
Source code in kfactory/packing.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
pack_kcells
pack_kcells(
target: KCell,
kcells: Sequence[KCell],
max_width: int | None = None,
max_height: int | None = None,
spacing: int = 0,
) -> InstanceGroup
Pack KCells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target
|
KCell
|
KCell to place the packed instances in. |
required |
kcells
|
Sequence[KCell]
|
Sequence of KCells from which to create instances. |
required |
max_width
|
int | None
|
Maximum width of the packed rectangle |
None
|
max_height
|
int | None
|
Maximum height of the packed rectangle |
None
|
spacing
|
int
|
Spacing between the instance bboxes |
0
|
Source code in kfactory/packing.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |