PhysicalObject class#

class laygo2.object.physical.PhysicalObject(xy, name=None, params=None)[source]#

Bases: object

Base class for physical layout objects with physical coordinate info.

Notes

(Korean): 물리 객체들의 기본 클래스, 물리 좌표 정보를 갖고 있다.

Public Data Attributes:

name

Object name.

xy

Physical coordinate values of the object in the form of [bottom_left, top_right].

master

Master ojbect for current object (for arrays and pins).

params

Dictionary storing the parameters associated with the object

pointers

The dictionary containing the key-value pairs of the major physical coordinates of the object, such as 'left', 'right', 'top', 'bottom', 'bottom_left', 'center', etc.

left

The left-center coordinate of the object.

right

The right-center coordinate of the object.

top

The top-center coordinate of the object.

bottom

The bottom-center coordinate of the object.

center

The center-center coordinate of the object.

bottom_left

The bottom-left coordinate of the object.

bottom_right

The bottom-right coordinate of the object.

top_left

The top-left coordinate of the object.

top_right

The top-right coordinate of the object.

bbox

The physical bounding box of the object.

Public Methods:

__init__(xy[, name, params])

The constructor function.

__str__()

Return the summary of the object information.

summarize()

Return the summary of the object information.


__init__(xy, name=None, params=None)[source]#

The constructor function.

Parameters
  • xy (numpy.ndarray) – Physical coordinate values of the object in the form of [bottom_left, top_right].

  • name (str) – Object name.

  • params (dict) – Dictionary storing the parameters associated with the object.

Return type

PhysicalObject

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]],
        name="test", params={'maxI': 0.005})
>>> print(obj)
<laygo2.object.physical.PhysicalObject object at 0x000001ECF0022948>
 name: test,
 class: PhysicalObject,
 xy: [[0, 0], [200, 200]],
 params: {'maxI': 0.005},

Notes

(Korean) PhysicalObject 클래스의 생성자.

파라미터
  • xy(numpy.ndarray): 객체의 물리적 좌표 (bbox).

  • name(str): 객체의 이름.

  • params(dict): 객체의 주요 속성을 갖고 있는 dict.

_get_xy()[source]#

numpy.ndarray(dtype=numpy.int): Retrive x,y coordinate values of the object.

_set_xy(value)[source]#

numpy.ndarray(dtype=numpy.int): Update x,y coordinates of the object.

_update_pointers()[source]#

The internal function that updates the object’s pointers after a change in its physical coordinates.

summarize()[source]#

Return the summary of the object information.

_xy = array([0, 0])#

The x and y coordinate values stored within.

Type

numpy.ndarray(dtype=numpy.int)

property bbox#

The physical bounding box of the object.

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]])
>>> obj.bbox
array([[  0,   0],
       [200, 200]])
_images/object_physical_PhysicalObject_bbox.png

Notes

(Korean): numpy.ndarray: 객체의 bbox (bounding box).

Type

numpy.ndarray

bottom = None#

The bottom-center coordinate of the object.

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]])
>>> obj.top
array([100,   0])
_images/object_physical_PhysicalObject_bottom.png
Type

numpy.ndarray

bottom_left = None#

The bottom-left coordinate of the object.

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]])
>>> obj.bottom_left
array([  0,   0])
_images/object_physical_PhysicalObject_bottom_left.png
Type

numpy.ndarray

bottom_right = None#

The bottom-right coordinate of the object.

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]])
>>> obj.bottom_right
array([200,   0])
_images/object_physical_PhysicalObject_bottom_right.png
Type

numpy.ndarray

center = None#

The center-center coordinate of the object.

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]])
>>> obj.center
array([100, 100])
_images/object_physical_PhysicalObject_center.png
Type

numpy.ndarray

left = None#

The left-center coordinate of the object.

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]])
>>> obj.left
array([  0, 100])
_images/object_physical_PhysicalObject_left.png
Type

numpy.ndarray

master = None#

Master ojbect for current object (for arrays and pins).

Example

>>> import laygo2
>>> obj1 = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]],
        name="test1", params=None)
>>> obj2 = laygo2.object.physical.Pin(xy = [[0, 0], [100, 100]],
        layer = ["M1", "drawing"], master=obj1)
>>> obj2.master
<laygo2.object.physical.PhysicalObject object at 0x00000204AAF3C7C0>

Notes

(Korean): 객체의 master (배열 element 또는 pin 객체들의 master 객체에 연결).

Type

numpy.ndarray

name = None#

Object name.

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]],
        name="test", params={'maxI': 0.005})
>>> obj.name
“test”
_images/object_physical_PhysicalObject_name.png
Type

str

params = None#

Dictionary storing the parameters associated with the object

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]],
        name="test", params={'maxI': 0.005})
>>> obj.params
{‘maxI’: 0.005 }

Notes

(Korean): 객체의 속성.

Type

dict

pointers = None#

The dictionary containing the key-value pairs of the major physical coordinates of the object, such as ‘left’, ‘right’, ‘top’, ‘bottom’, ‘bottom_left’, ‘center’, etc.

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]])
>>> obj.pointers
{'left': array([0, 100]), 'right': array([200, 100]),
 'bottom': array([100, 0]), 'top': array([100, 200]),
 'bottom_left': array([0, 0]), 'bottom_right': array([200, 0]),
 'top_left': array([0, 200]), 'top_right': array([200, 200]),
 ‘center’: array( [100, 100] )
}
_images/object_physical_PhysicalObject_pointers.png

Notes

(Korean): 객체의 주요 좌표들을 담고 있는 dictionary.

Type

dict

right = None#

The right-center coordinate of the object.

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]])
>>> obj.right
array([200, 100])
_images/object_physical_PhysicalObject_right.png
Type

numpy.ndarray

top = None#

The top-center coordinate of the object.

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]])
>>> obj.top
array([100, 200])
_images/object_physical_PhysicalObject_top.png
Type

numpy.ndarray

top_left = None#

The top-left coordinate of the object.

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]])
>>> obj.top_left
array([  0, 200])
_images/object_physical_PhysicalObject_top_left.png
Type

numpy.ndarray

top_right = None#

The top-right coordinate of the object.

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]])
>>> obj.top_right
array([200, 200])
_images/object_physical_PhysicalObject_top_right.png
Type

numpy.ndarray

property xy#

Physical coordinate values of the object in the form of [bottom_left, top_right].

Example

>>> import laygo2
>>> obj = laygo2.object.physical.PhysicalObject(xy = [[0, 0], [200, 200]],
        name="test", params={'maxI': 0.005})
>>> obj.xy
array([[  0,   0],
       [200, 200]])
_images/object_physical_PhysicalObject_xy.png
Type

numpy.ndarray