forked from huangqiangsheng/Ruby_mask
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheam_post3.rb
More file actions
37 lines (34 loc) · 743 Bytes
/
eam_post3.rb
File metadata and controls
37 lines (34 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
load "Eam_class.rb"
include RBA
#creat awg with same waveguide spacing
# create a new view (mode 1) with an empty layout
main_window =Application::instance.main_window
layout = CellView::active.layout
layout_view = LayoutView::current
dbu = layout.dbu
top = layout.top_cell
top.each_inst do |child|
#puts child.cell.name
case child.cell.name
when 'layer1'
iter = 0
when 'layer3'
iter = 1
when 'layer4'
iter = 2
when 'layer5'
iter = 3
when 'layer7'
iter = 4
when 'layer8'
iter = 5
when 'layer9'
iter = 6
end
i = iter.modulo(2)
j = iter/2
child.trans = Trans::new(6000*i/dbu,-4500*j/dbu)
end
layout_view.select_cell(top.cell_index, 0)
layout_view.add_missing_layers
layout_view.zoom_fit