Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorhpishvai
    • CommentTimeJan 22nd 2018
     
    Hi,

    I need a hint on how to retrieve the dbu of a new gds that I load into a layout.

    Is it possible to extract this information using script?

    Thank you,
    Hamedp
    • CommentAuthorMatthias
    • CommentTimeJan 23rd 2018
     

    Hi Hamed,

    you mean a fresh layout? That's "layout.dbu". I think that this will be the DBU of the last layout loaded, if you load multiple layout files into the same layout object.

    Matthias

    • CommentAuthorhpishvai
    • CommentTimeJan 24th 2018
     
    Hi Matthias,

    Basically I wrote the following method in order to load new cell of a gds file into the current layout. So, what you are saying is that the second line of the code "p lyo.layout.dbu" will give me the DBU of the loaded gds file? (just to confirm)

    Thank you,
    Hamed

    def insert_gds(file_path,gds_name,cell_name,foundry1_to_foundry2,scale,rot_angle,flip,new_x,new_y,lyo)

    lyo.layout.read(file_path +gds_name+".gds")

    p lyo.layout.dbu

    lay = lyo.layout.layer_indices.find do |li|
    info = lyo.layout.get_info(li)
    info.layer == 90 && info.datatype == 0
    end
    lay || raise("The label's layout does not contain layer 90, datatype 0")
    lyo.layout.set_info(lay, RBA::LayerInfo::new(101, 0)) # change layer
    lyo.topcell.insert(RBA::CellInstArray::new(cell_index,RBA::CplxTrans::new(scale,rot_angle,flip,RBA::DPoint::new((new_x / dbu).round,(new_y / dbu).round))))


    end
    • CommentAuthorhpishvai
    • CommentTimeJan 24th 2018
     
    It confuses me a little bit, because the layout I am working on has its own dbu and I do not understand how "layout.dbu" will give me the data-base unit of the loaded gds file, rather than giving the data-base unit of the layout that I am working on, itself.

    Regards,
    Hamed
    • CommentAuthorMatthias
    • CommentTimeJan 24th 2018
     

    Hi Hamed,

    "read" on an existing layout is rather simple merge - it will read the shapes and cells from the layout file right into your existing one, adding to existing layers and cells if possible.

    The database unit will simply be overwritten. If you want to check wether the database unit is different, save it before the "read" and compare against the one after the "read". However this will just tell you that the DBU's were different and it's too late then to correct the differences.

    If you need better control, you two layout objects and Cell#copy_tree to copy over the cell trees from the new layout object to your working object.

    Matthias