append() method#

Design.append(item)[source]#

Add physical object to Design without taking any further actions.

Parameters:

item (laygo2.object.physical.PhysicalObject) – The physical object to be added.

Returns:

A list containing the name of item and the item itself ([item.name, item]).

Return type:

list

Example

>>> import laygo2
>>> from laygo2.object.database import Design
>>> from laygo2.object.physical import Rect, Pin, Instance, Text
>>> # Create a design
>>> dsn = Design(name="mycell", libname="genlib")
>>> # Create layout objects
>>> r0 = Rect(xy=[[0, 0], [100, 100]], layer=["M1", "drawing"])
>>> p0 = Pin(xy=[[0, 0], [50, 50]], layer=["M1", "pin"], name="P")
>>> i0 = Instance(libname="tlib", cellname="t0", name="I0", xy=[0, 0])
>>> t0 = Text(xy=[[50, 50], [100, 100]], layer=["text", "drawing"], text="T")
>>> dsn.append(r0)
>>> dsn.append(p0)
>>> dsn.append(i0)
>>> dsn.append(t0)
>>> print(dsn)
<laygo2.object.database.Design object at 0x0000024C6C2EF010>
    name: mycell, params: None
    elements: {
        'NoName_0': <laygo2.object.physical.Rect object at 0x0000024C6C230F40>,
        'P': <laygo2.object.physical.Pin object at 0x0000024C6C2EFF40>,
        'I0': <laygo2.object.physical.Instance object at 0x0000024C6C2EFDC0>,
        'NoName_1': <laygo2.object.physical.Text object at 0x0000024C6C2EF8B0>}
    libname:genlib
    rects:{
        'NoName_0': <laygo2.object.physical.Rect object at 0x0000024C6C230F40>}
    paths:{}
    pins:{
        'P': <laygo2.object.physical.Pin object at 0x0000024C6C2EFF40>}
    texts:{
        'NoName_1': <laygo2.object.physical.Text object at 0x0000024C6C2EF8B0>}
    instances:{
        'I0': <laygo2.object.physical.Instance object at 0x0000024C6C2EFDC0>}
    virtual instances:{}

See also

laygo2.object.database.Design.place

Place a (virtual) instance on a grid and append to the design.

laygo2.object.database.Design.route

Route on a grid and append to the design.

laygo2.object.database.Design.route_via_track

Route on a track on a grid and append.

laygo2.object.database.Design.pin

Place a pin on a grid and append to the design.