Hierarchical Anisotropic scaling

edited August 2016 in General
You have added anisotropic scaling, but only in individual cells and converting wires to polygon.
The problem with rotated instances and wires going in X and Y directory present problems.

Drawing with advanced processes the layout is on a fix grid across the chip in both directions.
Different fabs have slightly different rules, X direction is about 10% different. But :-

- Y direction gridding is identical
- Poly is in one direction , so nothing can be rotated 90 deg (except vias)
- No circles, no 45 deg allowed

Manual adjusting is very tedious, generally redraw the whole design.

Would it be possible to write an Anisotropic scaler that only :-

- changes X co-ordinates of polygons
- changes X co-ordinates of wires. Not change width.
- Changes X co-ordinates of instances.

The result would not be perfect, but all data would be in the correct X,Y locations and fixes easily made.

Thanks, Bob

Comments

  • edited August 2016

    Hi Bob,

    Anisotropic scaling is not a core feature of KLayout, so I guess you are referring to a script like http://www.klayout.org/svn-public/klayout-resources/trunk/scripts/scale_anisotropic.lym.

    You can basically modify the script any way you want to achieve the desired result. The script currently treats all "solid" shapes (boxes, polygons, paths) in the same way. To preserve a path's width, you'll need to provide a separate scaling implementation for paths which you can readily derived from the polygon implementation (not tested):

          if obj.shape.is_path?
    
            path = obj.shape.path
            new_points = []
            path.each_point do |p|
              new_points.push(RBA::Point::new((p.x * fx + 0.5).floor, (p.y * fy + 0.5).floor))
            end
            path.points = new_points
            obj.shape.path = path
    
          elsif obj.shape.is_box? || obj.shape.is_polygon?
    
            ...
    
          end
    

    I'd like to add however, that a true hierarchical implementation of anisotropic scaling (or any anisotropic operation) requires formation of cell variants in the general case: a cell may be placed rotated plus non-rotated. Both versions need to be handled differently so you'll need to create two variants. That is not a trivial algorithm and in general variant building is not desired when doing manual layout. That's why there is only little support for anisotropic operations.

    Matthias

Sign In or Register to comment.