-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathABC-CABpix.il
86 lines (76 loc) · 2.95 KB
/
ABC-CABpix.il
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
;; copyleft ebecheto ;; load("ABC-CABpix.il")
ineed('(CreateVias createHexagon bBoxShrink textDisplay2label createPinLPP))
;; NXmax=10000
;; NYmax= 4500
;; NX=NXmax/(2*1.5*pitch/sqrt(3));=> 1154.701
;; NY=NYmax/(3*pitch) ;=> 300
;; nbpixels=1154*300*6 ;=> 2 077 200 : 2Mega-pixels
;; 10000 * 4500 /(5**2*sqrt(3)/2);=> 2078461.0 ;<= verification with hexagon surface area calculation.
;; ; aire d'un hexagone : 3*sqrt(3)*a²/2 2b=a.sqrt(3)=pitch => a=pitch/sqrt(3) => Aire =pitch²*sqrt(3)/2
;; NX=11 NY=3
;; NX=1154 NY=300
NX=115/2 NY=30/2
NX=115/4 NY=30/4
printf("%d-A, %d-B, %d-C for Dist_Y=%d[um], Dist_X=%d[um]\n" 2*NY NX+NY NX+NY round(NY*3*pitch) round(NX*sqrt(3)*pitch ))
printf("%d-discri for Dist_Y=%d[um], Dist_X=%d[um]\n" 2*NY+NX+NY+NX+NY round(NY*3*pitch) round(NX*sqrt(3)*pitch ))
label=""
; cv=geGetWindowCellView() ; lib="picmic0_master"
lib="picmic0_ebecheto"
cv=dbOpenCellViewByType(lib sprintf(nil "hexTricot_%d-%d" NX NY) "layout" "maskLayout" "a")
tech = techGetTechFile(cv)
layers=foreach(mapcar l list("M3" "M4" "M5") list(l "drawing")) ;=> (("M3" "drawing") ("M4" "drawing") ("M5" "drawing"))
viaNames=list("M4_M3_S" "M5_M4_S" "ML_M5_S")
vias=foreach(mapcar v viaNames techFindViaDefByName(tech v))
pitch=5
xStep=1.5*pitch/sqrt(3)
yStep=pitch;<=
minTOP=0.46
r=(pitch-minTOP)/sqrt(3) ; r=xStep/sqrt(3)
;<== radius of the hexagone. By radius, i mean a = arete = demi-diametre du cercle circonscrit de l'hexagone
pw=1 ;<= width line of the interconnecting layers.
X=0 Y=0 i=0
printf("Creation array of %L-pitch, hexagon a=%L, b=%L space=pitch/2-b=%L\n" pitch r r*sqrt(3)/2 pitch/2-r*sqrt(3)/2)
wireSteps=list((2*xStep:0)(xStep:xStep*sqrt(3))(xStep:-xStep*sqrt(3)))
AST=list(list(0 0) list(xStep xStep*sqrt(3)))
names=list("A" "B" "C")
xya=car(AST)
;; AST represent the even and odd ROWS
pair=0
;; foreach(mapcar xya AST) ) ;<== equiv for(paire 0 1 ...)
for(pair 0 1;<= oddOReven
xya=nth(pair AST)
xa0=car(xya) ; 0 puis xStep
ya0=cadr(xya) ; 0 puis xStep*sqrt(3)=1.5*pitch : A1 yOffset from A0
xa=xa0
for(row 0 NX
ya=ya0
for(col 0 NY
for(i 0 2 ;<= creation des pixels ABC espaces de yStep
via321=nthcdr(i vias)
;; creation du premier demi motif pour A
X=xa
Y=ya+i*yStep
when(and(pair==1 i==2) Y=ya-yStep)
wxyp=nth(i wireSteps) wxy=mapcar('plus X:Y wxyp)
rodCreatePath(?cvId cv ?layer nth(i layers) ?width pw ?pts list((X:Y) wxy))
hex=createHexagon( X Y "TOP_M" cv r)
CreateVias(via321 X Y cv)
;; PIN NAMES ADJUSTMENT
;when(row==0 ;<= check first row only for now =< to remove later
; i=0 => A
; i=1 => B
; i=2 => C
(cond
((i==0) label=sprintf(nil "%s_%d" nth(i names) col*2+pair))
((i==1) label=sprintf(nil "%s_%d" nth(i names) col-row ))
((i==2) label=sprintf(nil "%s_%d" nth(i names) col+row ))
)
createPinLPP(label bBoxShrink(hex~>bBox 0.1) '("TOP_M" "drawing"))
;);end row
); end loop 3 : ABC
ya=ya+3*pitch
)
xa=xa+2*xStep
))
printf("Opening %s\n" cv~>cellName) geOpen( ?lib cv~>libName ?cell cv~>cellName ?view cv~>viewName )) ;; <== check results
textDisplay2label(cv)