1 | # -*- coding: utf-8 -*-
|
---|
2 | #
|
---|
3 | # TECS Generator
|
---|
4 | # Generator for TOPPERS Embedded Component System
|
---|
5 | #
|
---|
6 | # Copyright (C) 2008-2014 by TOPPERS Project
|
---|
7 | #--
|
---|
8 | # ä¸è¨èä½æ¨©è
|
---|
9 | ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
|
---|
10 | # ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ã使ç¨ã»è¤è£½ã»æ¹
|
---|
11 | # å¤ã»åé
|
---|
12 | å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
|
---|
13 | # (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
|
---|
14 | # 権表示ï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
|
---|
15 | # ã¹ã³ã¼ãä¸ã«å«ã¾ãã¦ãããã¨ï¼
|
---|
16 | # (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
17 | # ç¨ã§ããå½¢ã§åé
|
---|
18 | å¸ããå ´åã«ã¯ï¼åé
|
---|
19 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨
|
---|
20 | # è
|
---|
21 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
|
---|
22 | # ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
23 | # (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
24 | # ç¨ã§ããªãå½¢ã§åé
|
---|
25 | å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
|
---|
26 | # ã¨ï¼
|
---|
27 | # (a) åé
|
---|
28 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨è
|
---|
29 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
|
---|
30 | # ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
31 | # (b) åé
|
---|
32 | å¸ã®å½¢æ
|
---|
33 | ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSããã¸ã§ã¯ãã«
|
---|
34 | # å ±åãããã¨ï¼
|
---|
35 | # (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
|
---|
36 | # 害ãããï¼ä¸è¨èä½æ¨©è
|
---|
37 | ããã³TOPPERSããã¸ã§ã¯ããå
|
---|
38 | 責ãããã¨ï¼
|
---|
39 | # ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
|
---|
40 | # ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
|
---|
41 | ããã³TOPPERSããã¸ã§ã¯ãã
|
---|
42 | # å
|
---|
43 | 責ãããã¨ï¼
|
---|
44 | #
|
---|
45 | # æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
|
---|
46 | ã
|
---|
47 | # ãã³TOPPERSããã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
|
---|
48 | # ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
|
---|
49 | # ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ害ã«é¢ãã¦ãï¼ã
|
---|
50 | # ã®è²¬ä»»ãè² ããªãï¼
|
---|
51 | #
|
---|
52 | # $Id: location.rb 1011 2016-07-11 02:20:01Z coas-nagasima $
|
---|
53 | #++
|
---|
54 |
|
---|
55 | class TECSGEN
|
---|
56 |
|
---|
57 | #------ manupulate location information --------#
|
---|
58 | def self.new_cell_location cell_location
|
---|
59 | @@current_tecsgen.new_cell_location cell_location
|
---|
60 | end
|
---|
61 | def new_cell_location cell_location
|
---|
62 | @cell_location_list << cell_location
|
---|
63 | end
|
---|
64 | def get_cell_location_list
|
---|
65 | @cell_location_list
|
---|
66 | end
|
---|
67 |
|
---|
68 | def self.new_join_location join_location
|
---|
69 | @@current_tecsgen.new_join_location join_location
|
---|
70 | end
|
---|
71 | def new_join_location join_location
|
---|
72 | @join_location_list << join_location
|
---|
73 | end
|
---|
74 | def get_join_location_list
|
---|
75 | @join_location_list
|
---|
76 | end
|
---|
77 |
|
---|
78 | #== Cell_location
|
---|
79 | # tecscde ã®ä½ç½®æ
|
---|
80 | å ±
|
---|
81 | class Cell_location
|
---|
82 |
|
---|
83 | #=== Join_location#initialize
|
---|
84 | #cell_nspath::NamespacePath
|
---|
85 | #x,y,w,h::Expression
|
---|
86 | #port_location_list::[ [Symbol(ep_or_cp_name), Symbol(edge_name), Expression(offset)], ... ]
|
---|
87 | #ep_name::Symbol
|
---|
88 | def initialize( cell_nspath, x, y, w, h, port_location_list )
|
---|
89 | # p "Cell_location: #{cell_nspath}, #{x}, #{y}, #{w}, #{h}, #{port_location_list}"
|
---|
90 | @cell_nspath = cell_nspath
|
---|
91 | @x = x.eval_const nil
|
---|
92 | @y = y.eval_const nil
|
---|
93 | @w = w.eval_const nil
|
---|
94 | @h = h.eval_const nil
|
---|
95 | @port_location_list = port_location_list
|
---|
96 |
|
---|
97 | TECSGEN.new_cell_location self
|
---|
98 | end
|
---|
99 |
|
---|
100 | def get_location
|
---|
101 | [ @cell_nspath, @x, @y, @w, @h, @port_location_list ]
|
---|
102 | end
|
---|
103 |
|
---|
104 | end # Cell_location
|
---|
105 |
|
---|
106 | #== Join_location
|
---|
107 | # tecscde ã®ä½ç½®æ
|
---|
108 | å ±
|
---|
109 | class Join_location
|
---|
110 | @@join_location_list = []
|
---|
111 |
|
---|
112 | #=== Join_location#initialize
|
---|
113 | #cp_cell_nspath::NamespacePath
|
---|
114 | #cp_name::Symbol
|
---|
115 | #ep_cell_nspath::NamespacePath
|
---|
116 | #ep_name::Symbol
|
---|
117 | #bar_list::[[Symbol (VBar or HBar), Expression(position mm)], ....]
|
---|
118 | def initialize( cp_cell_nspath, cp_name, ep_cell_path, ep_name, bar_list )
|
---|
119 | # p "Join_location #{cp_cell_nspath}, #{cp_name}, #{ep_cell_path}, #{ep_name} #{bar_list}"
|
---|
120 | @cp_cell_nspath = cp_cell_nspath
|
---|
121 | @cp_name = cp_name
|
---|
122 | @ep_cell_path = ep_cell_path
|
---|
123 | @ep_name = ep_name
|
---|
124 | @bar_list = bar_list
|
---|
125 |
|
---|
126 | TECSGEN.new_join_location self
|
---|
127 | end
|
---|
128 |
|
---|
129 | def get_location
|
---|
130 | [@cp_cell_nspath, @cp_name, @ep_cell_path, @ep_name, @bar_list]
|
---|
131 | end
|
---|
132 |
|
---|
133 | end # Join_location
|
---|
134 |
|
---|
135 | end # TECSGEN
|
---|