XMOS プログラミング入門 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 初版 1 刷発行時のものです.

Similar documents
<4D F736F F D B B BB2D834A836F815B82D082C88C602E646F63>

HW-Slides-03.ppt

<91E63389F1>

放射線生物学

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>

provider_020524_2.PDF

地盤環境振動の対策技術-00-前付.indd

<4D F736F F D B B BB2D834A836F815B82D082C88C60202D B2E646F63>

生活設計レジメ

44 4 I (1) ( ) (10 15 ) ( 17 ) ( 3 1 ) (2)

I II III 28 29


24,828,330 Contents 9,931,332 8,223,840 3,436,978 9,931,332 7,674,406 3,413,724 2,985,287 1

untitled

数理計画法入門 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 初版 1 刷発行時のものです.

医系の統計入門第 2 版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 第 2 版 1 刷発行時のものです.

AccessflÌfl—−ÇŠš1

コロナ社

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>

例題で学ぶオペレーションズ リサーチ入門 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 初版 1 刷発行時のものです.

i まえがき コロナ社 PC

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>

C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 新装版 1 刷発行時のものです.

CPU VS-RC003 RobovieMaker for VS-RC003

微分積分 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 初版 1 刷発行時のものです.

ESP32-KEY-KIT-R1 (ESP-WROOM-32 ) Copyright c 2

背景

untitled


i


Wide Scanner TWAIN Source ユーザーズガイド

Microsoft Word - Bluetooth doc

soto44_kosei_03.pdf

aichi_1_24_b


第1部 一般的コメント

untitled

表1票4.qx4

福祉行財政と福祉計画[第3版]

第1章 国民年金における無年金

VM-53PA1取扱説明書

橡ミュラー列伝Ⅰ.PDF

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C602E646F63>


これわかWord2010_第1部_ indd

パワポカバー入稿用.indd

これでわかるAccess2010

II III I ~ 2 ~

中堅中小企業向け秘密保持マニュアル


PR映画-1

- 2 -



1 (1) (2)

26 FPGA FPGA (Field Programmable Gate Array) ASIC (Application Specific Integrated Circuit) FPGA FPGA FPGA FPGA Linux FreeDOS skewed way L1

<4D F736F F D B B BB2D834A836F815B82D082C88C60202D B2E646F63>

フリーソフトでつくる音声認識システム ( 第 2 版 ) サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 第 2 版 1 刷発行時のものです.

02›f›æ’»“ì-16.qxd

vol4.qxd

コンテンツ・プロデュース機能の基盤強化に関する調査研究

「産業上利用することができる発明」の審査の運用指針(案)

コンテンツ・プロデュース機能の

エクセルカバー入稿用.indd



MINI2440マニュアル

<4D F736F F D B B BB2D834A836F815B82D082C88C602E646F63>

CX-G6400 ユーザーズガイド

土木工事の

DATA BOOK 01

178 5 I 1 ( ) ( ) ( ) ( ) (1) ( 2 )

Excel ではじめる数値解析 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 初版 1 刷発行時のものです.


<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>

Microsoft Word - 本文.doc

untitled

1_sugata

MacOSX印刷ガイド

Œ{Ł¶/1flà

9 chapter

荳也阜轣ス螳ウ蝣ア蜻・indd

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202D B202D B202D

活用ガイド (ソフトウェア編)

ESP8266-CORE-R Copyrig

ONLINE_MANUAL

ONLINE_MANUAL

ルベーグ積分 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 初版 1 刷発行時のものです.

U


<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>

untitled

前付(念).indd

CX-G2400 ユーザーズガイド

ii

ETCB Manual

102

untitled

i

Transcription:

XMOS プログラミング入門 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. http://www.morikita.co.jp/books/mid/085251 このサンプルページの内容は, 初版 1 刷発行時のものです.

i 40 LED OS OS XMOS 32 XMOS OS XMOS XMOS XMOS OS FPGA ASIC

ii XMOS Chapter 1 Chapter 2 XMOS Chapter 3 XMOS Chapter 4 XMOS C XC XMOS XMOS URL Chapter 4 XMOS Example A 1 XMOS XMOS XMOS OS XMOS 1 2 XMOS 2014 2

iii Contents Chapter 1 XMOS 1.1 xcore Tile 1 1.2 xcore 3 1.3 xconnect 5 1.4 8 1.5 10 1.6 12 1 Chapter 2 XMOS 2.1 15 2.2 CSP 16 2.3 16 2.4 18 15 Chapter 3 3.1 21 3.2 XN 23 3.3 24 3.4 XMOS 28 3.5 28 3.6 31 3.7 33 21 Chapter 4 XMOS 4.1 35 4.2 37 4.3 41 4.4 43 4.5 52 4.6 54 4.7 56 35

iv Contents 4.8 59 4.9 62 XMOS Example A A.1 PulseGen 74 A.2 PulseCounter 75 A.3 StartButton 76 A.4 77 73 Example B UART B.1 Send_UART 80 B.2 Read_UART 81 79 Example C RC C.1 RC 85 C.2 86 C.3 ServoPulseGen 87 C.4 ServoPos 88 C.5 89 C.6 90 85 Example D D.1 XMOS 91 D.2 92 D.3 RotaryInc 93 D.4 ServoPos2 94 D.5 95 91 Example E E.1 97 E.2 98 E.3 RotaryAbs 98 97

v E.4 ServoPos3 99 E.5 100 Example F AD F.1 SPI AD XMOS 103 F.2 104 F.3 104 F.4 106 103 Example G XMOS Windows PC RS232 G.1 109 G.2 RS232_ChannelEnd 111 G.3 RS232_X32 114 G.4 RS232 115 109 Example H H.1 XTAG2 122 H.2 123 H.3 123 H.4 XMOS 124 H.5 XN 125 H.6 126 H.7 128 H.8 XTAG2 129 H.9 129 121 Appendix XMOS 1. 133 2. 134 133 139 141

1 Chapter 1 XMOS XMOS 1.1 xcore Tile XMOS 5 OS XMOS xcore xconnect 1.2 1.3 1.4 L XS1-L8 1.1 8 Logical Core xconnect I/O xcore Tile XMOS

2 Chapter 1 XMOS 1.1 xcore Tile 4 6 8 10 12 16 L AD A USB2.0 PHY U 1.2 2 8 A XS1-A8 1.3 U 12 XS1-U12 3 1.2 XS1-A8

1.2 xcore 3 1.3 XS1-U12 xcore 1 XS1-L8 1.2 xcore XS1-L8 400 MHz 500 MHz 2 1.1 8 32 RISC 1 64 KB RAM I/O I/O

4 Chapter 1 XMOS 400 MHz 50 MHz 8 500 MHz 4 1 125 MIPS 125 MIPS 4 500 MIPS I/O I/O I/O 10 ns XMOS I/O IC XMOS I/O 1.1 xcore Tile I/O I/O I/O xcore I/O RTOS 10 ns IC XMOS software defined silicon XMOS FPGA ASIC

71 XMOS Chapter 4 XMOS XMOS Examples A B UART C RC D E F AD G XMOS Windows PC RS232 H

Example A I/O DFD XMOS A.1 DFD PulseGen PulseCounter StartButton XMOS PulseGen I/O PulseCounter IC A.2 PulseGen PulseCounter A.3 XMOS XMOS FPGA FPGA XMOS A.1 PulseCounter DFD

74 Example A A.2 A.3 XMOS A.1 PulseGen A.1 PulseGen 1 High 50 1 10 ns High 500 ns 500 ns 0 Low Low 500 ns while 1 MHz 1 MHz A.2 PulseCounter

A.2 PulseCounter 75 A.1 PulseGen void PulseGen(out port outp){ timer tmr; unsigned time; tmr :> time; // while(1){ outp <: 0xf; // 1 time += 50; // 50 10 ns 500 ns tmr when timerafter(time) :> void; // outp <: 0x0; // time += 50; // 50 10 ns 500 ns tmr when timerafter(time) :> void; // } } A.2 PulseCounter A.2 PulseCounter PulseCounter StartButton while old_p High Low Low High going 0 while StartButton XC A.2 PulseCounter void PulseCounter(chanend St, unsigned MTime_ms, in port inp){ timer tmr; int stcmd; unsigned going, mt, now; unsigned old_p, new_p, count; count=0; mt=mtime_ms*100000; old_p=0xf; going=1; while(1){ St :> stcmd; // count=0; going=1; tmr :> now; // while(going){ // select{ case inp when pinsneq(old_p) :> new_p: //

76 Example A } } old_p=new_p; // count=count+1; // break; case tmr when timerafter(now+mt) :> void: // going = 0; break; } } St <: count/2; // A.3 StartButton StartButton A.3 WaitForClick() 4.9 LED Pulse Counter PulseCounter 1 A.3 StartButton void StartButton(chanend St, out port LED, in port Button_A){ int CountData=0; int cmd=0; while(1){ printstrln("please click SW1 to start!!"); // WaitForClick(Button_A, 200); // flash(led, 0xf); // St <: cmd; // St :> CountData; // printstrln("finish"); printstr("count Data = "); printintln(countdata); // printstrln(""); } }

中原博史 ( なかはら ひろし ) 1974 年 北海道大学工学部精密工学科卒業 1976 年 北海道大学大学院工学研究科情報工学専攻修士課程修了 1976 年 松下電器産業 ( 株 )( 現パナソニック ( 株 )) 入社 1986 年 北海道職業訓練短期大学校 ( 現北海道職業能力開発大学校 ) 勤務 2013 年 北海道職業能力開発大学校電子情報技術科 現在に至る 藤原祐介 ( 森北出版 ) 富井 晃 ( 森北出版 ) dignet エーヴィスシステムズ 協栄製本 XMOS プログラミング入門 中原博史 2014 2014 年 4 月 10 日第 1 版第 1 刷発行 本書の無断転載を禁ず 中原博史 森北博巳 東京都千代田区富士見 1-4-11( 102-0071) 電話 03-3265-8341/FAX 03-3264-8709 http://www.morikita.co.jp/ 日本書籍出版協会 自然科学書協会会員 <( 社 ) 出版者著作権管理機構委託出版物 > 落丁 乱丁本はお取替えいたします. Printed in Japan/ISBN978-4-627-85251-8