source: asp3_tinet_ecnl_rx/trunk/asp3_dcre/target/gr_sakura_gcc/tSIOPortGRSakura.cdl@ 337

Last change on this file since 337 was 337, checked in by coas-nagasima, 6 years ago

ASP3版ECNLを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/plain;charset=UTF-8
File size: 7.8 KB
Line 
1/*
2 * TOPPERS/ASP Kernel
3 * Toyohashi Open Platform for Embedded Real-Time Systems/
4 * Advanced Standard Profile Kernel
5 *
6 * Copyright (C) 2015 by Ushio Laboratory
7 * Graduate School of Engineering Science, Osaka Univ., JAPAN
8 * Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
9 * Graduate School of Information Science, Nagoya Univ., JAPAN
10 * Copyright (C) 2017 by Cores Co., Ltd. Japan
11 *
12 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
13 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改
14 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する.
15 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
16 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
17 * スコード中に含まれていること.
18 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
19 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用
20 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記
21 * の無保証規定を掲載すること.
22 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
23 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ
24 * と.
25 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著
26 * 作権表示,この利用条件および下記の無保証規定を掲載すること.
27 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに
28 * 報告すること.
29 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
30 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること.
31 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理
32 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを
33 * 免責すること.
34 *
35 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お
36 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的
37 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ
38 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ
39 * の責任を負わない.
40 *
41 * $Id$
42 */
43
44/*
45 * シリアルインタフェースドライバのターゲット依存部(GR-SAKURA用)
46 * のコンポーネント記述
47 */
48
49/*
50 * GR-SAKURAとRX631/RX63Nに関する定義
51 */
52import_C("gr_sakura.h");
53import_C("rx630.h");
54
55/*
56 * FIFO内蔵シリアルコミュニケーションインタフェース用 簡易SIOドライバ
57 */
58import("tSCIF.cdl");
59
60/*
61 * シリアルインタフェースドライバのターゲット依存部の本体(シリアルイ
62 * ンタフェースドライバとSIOドライバを接続する部分)のセルタイプ
63 */
64celltype tSIOPortGRSakuraMain {
65 /*
66 * シリアルインタフェースドライバとの結合
67 */
68 [inline] entry sSIOPort eSIOPort;
69 [optional] call siSIOCBR ciSIOCBR;
70
71 /*
72 * SIOドライバとの結合
73 */
74 call sSIOPort cSIOPort;
75 [inline] entry siSIOCBR eiSIOCBR;
76
77 /*
78 * 割込み要求ライン操作のための結合
79 */
80 call sInterruptRequest cRxInterruptRequest;
81 call sInterruptRequest cTxInterruptRequest;
82};
83
84/*
85 * シリアルインタフェースドライバのターゲット依存部(複合コンポーネン
86 * ト)のセルタイプ
87 */
88[active]
89composite tSIOPortGRSakura {
90 /*
91 * シリアルインタフェースドライバとの結合
92 */
93 entry sSIOPort eSIOPort;
94 [optional] call siSIOCBR ciSIOCBR;
95
96 /*
97 * 属性の定義
98 */
99 attr {
100 uintptr_t baseAddress; /* ベースアドレス */
101 INTNO rxInterruptNumber; /* 受信割込み番号 */
102 INTNO txInterruptNumber; /* 送信割込み番号 */
103 PRI isrPriority = 1; /* ISR優先度 */
104 PRI interruptPriority = -4; /* 割込み優先度 */
105 uint32_t baudRate = 115200; /* ボーレートの設定値 */
106 };
107
108 /*
109 * SIOドライバ
110 */
111 cell tSCIF SCIF {
112 baseAddress = composite.baseAddress;
113 baudRate = composite.baudRate;
114 ciSIOCBR = SIOPortMain.eiSIOCBR;
115 };
116
117 /*
118 * シリアルインタフェースドライバのターゲット依存部の本体
119 */
120 cell tSIOPortGRSakuraMain SIOPortMain {
121 ciSIOCBR => composite.ciSIOCBR;
122 cSIOPort = SCIF.eSIOPort;
123 cRxInterruptRequest = RxInterruptRequest.eInterruptRequest;
124 cTxInterruptRequest = TxInterruptRequest.eInterruptRequest;
125 };
126 composite.eSIOPort => SIOPortMain.eSIOPort;
127
128 /*
129 * SIOの受信割込みサービスルーチンと割込み要求ライン
130 */
131 cell tISR RxISRInstance {
132 interruptNumber = composite.rxInterruptNumber;
133 isrPriority = composite.isrPriority;
134 ciISRBody = SCIF.eiRxISR;
135 };
136 cell tInterruptRequest RxInterruptRequest {
137 interruptNumber = composite.rxInterruptNumber;
138 interruptPriority = composite.interruptPriority;
139 };
140
141 /*
142 * SIOの受信割込みサービスルーチンと割込み要求ライン
143 */
144 cell tISR TxISRInstance {
145 interruptNumber = composite.txInterruptNumber;
146 isrPriority = composite.isrPriority;
147 ciISRBody = SCIF.eiTxISR;
148 };
149 cell tInterruptRequest TxInterruptRequest {
150 interruptNumber = composite.txInterruptNumber;
151 interruptPriority = composite.interruptPriority;
152 };
153};
154
155/*
156 * シリアルインタフェースドライバのターゲット依存部のプロトタイプ
157 *
158 * サンプルプログラムが使うポートが,SIOPortTarget1に固定されているた
159 * め,ポート1とポート3を入れ換えている.具体的には,SIOPortTarget1は
160 * SCIFのチャネル2(チャネル番号は0から始まるので,ポート3のこと)に,
161 * SIOPortTarget3はSCIFのチャネル0につながっている.
162 */
163[prototype]
164cell tSIOPortGRSakura SIOPortTarget1 {
165 /* 属性の設定 */
166 baseAddress = C_EXP("SCI0_BASE");
167 rxInterruptNumber = C_EXP("INT_SCI0_RXI");
168 txInterruptNumber = C_EXP("INT_SCI0_TEI");
169};
170
171[prototype]
172cell tSIOPortGRSakura SIOPortTarget2 {
173 /* 属性の設定 */
174 baseAddress = C_EXP("SCI1_BASE");
175 rxInterruptNumber = C_EXP("INT_SCI1_RXI");
176 txInterruptNumber = C_EXP("INT_SCI1_TEI");
177};
178
179[prototype]
180cell tSIOPortGRSakura SIOPortTarget3 {
181 /* 属性の設定 */
182 baseAddress = C_EXP("SCI2_BASE");
183 rxInterruptNumber = C_EXP("INT_SCI2_RXI");
184 txInterruptNumber = C_EXP("INT_SCI2_TEI");
185};
186
187[prototype]
188cell tSIOPortGRSakura SIOPortTarget4 {
189 /* 属性の設定 */
190 baseAddress = C_EXP("SCI3_BASE");
191 rxInterruptNumber = C_EXP("INT_SCI3_RXI");
192 txInterruptNumber = C_EXP("INT_SCI3_TEI");
193};
194
195[prototype]
196cell tSIOPortGRSakura SIOPortTarget5 {
197 /* 属性の設定 */
198 baseAddress = C_EXP("SCI4_BASE");
199 rxInterruptNumber = C_EXP("INT_SCI4_RXI");
200 txInterruptNumber = C_EXP("INT_SCI4_TEI");
201};
202
203[prototype]
204cell tSIOPortGRSakura SIOPortTarget6 {
205 /* 属性の設定 */
206 baseAddress = C_EXP("SCI5_BASE");
207 rxInterruptNumber = C_EXP("INT_SCI5_RXI");
208 txInterruptNumber = C_EXP("INT_SCI5_TEI");
209};
210
211[prototype]
212cell tSIOPortGRSakura SIOPortTarget7 {
213 /* 属性の設定 */
214 baseAddress = C_EXP("SCI6_BASE");
215 rxInterruptNumber = C_EXP("INT_SCI6_RXI");
216 txInterruptNumber = C_EXP("INT_SCI6_TEI");
217};
218
219[prototype]
220cell tSIOPortGRSakura SIOPortTarget8 {
221 /* 属性の設定 */
222 baseAddress = NULL;
223 rxInterruptNumber = NULL;
224 txInterruptNumber = NULL;
225};
Note: See TracBrowser for help on using the repository browser.