Nios II ソフトウェア開発ハンドブック Version 1.2 第6章. 例外処理 ver.1.2

Size: px
Start display at page:

Download "Nios II ソフトウェア開発ハンドブック Version 1.2 第6章. 例外処理 ver.1.2"

Transcription

1 6. NII Nios II ISR HAL Hardware Abstraction Layer Nios II HAL ISR ISR HAL API Application Programming Interface ISR ISR C ISR ISR ISR Nios II Nios II Nios II Nios II RISC 1 1 Nios II Altera Corporation Preliminary

2 HAL status ctl0 estatus ctl1 status PIE ea r29 HAL HAL HAL ISR HAL API Application Programming Interface ISR 6 6 ISR HAL estatus EPIE ipending ipending 3 _irq_entry() alt_irq_handler() software_exception() 6 2 Altera Corporation Nios II

3 _irq_entry Nios II _irq_entry software_exception alt_irq_handler <Nios II >/components/altera_nios2/hal/inc/sys/alt_irq_entry.h objdump _irq_entry _irq_entry _irq_entry: if EPIE = 0 // goto software_exception handler assembly. else if ipending = 0 // goto software_exception handler assembly. else // store pre-exception processor state // alt_irq_handler ISR call the alt_irq_handler routine restore the pre-exception processor state // issue the exception return instruction, eret.. alt_irq_handler() alt_irq_handler() HAL IRQ IRQ0 IRQ31 Altera Corporation Nios II

4 HAL alt_irq_handler() alt_irq_handler() alt_irq_handler(void) // 0 31 IRQ // ipending 1 // for i from 0 to 31: // ipending 1 if ipending[i] == 1 : // // alt_irq_arg[i] i // // void* context id // alt_irq[] ISR alt_irq[i]( alt_irq_arg[i], i ) // // break; <Nios II > /components/altera_hal/hal/src/alt_irq_register.c software_exception software_exception software_exception Nios II software_exception _irq_entry alt_irq_handler OP OPX OP OPX Nios II 6 4 Altera Corporation Nios II

5 software_exception software_exception software_excetion: if encoding = trap instruction // // nop goto trap_handler else // case op / opx muli:goto mul_immed // mul:goto multiply // mulxss:goto mulxss // mulxsu:goto mulxsu // mulxuu:goto mulxuu // div:goto divide // divu:goto unsigned_division // <Nios II > /components/altera_nios2/hal/src/alt_exceptions.s alt_exceptions.s software_exception Nios II Nios II Nios II Nios II Nios II Altera Corporation Nios II

6 ISR Nios II OP OPX software_exception OP OPX Nios II Nios II Nios II software_exception null alt_exceptions.s OP OPX trap_handler Nios II software_exception HAL ISR IRQ ISR HAL 6 6 Altera Corporation Nios II

7 ISR HAL API HAL ISR API MicroC/OS-II HAL API API MicroC/OS-II HAL API alt_irq_register() alt_irq_disable_all() alt_irq_enable_all() alt_irq_interruptible() alt_irq_non_interruptible() alt_irq_enabled() ISR HAL API 2 alt_irq_register() ISR HAL alt_irq_enable_all() alt_irq_disable_all() alt_irq_register() ISR HAL IRQ HAL IRQ ISR alt_irq_register() int alt_irq_register (alt_u32 id, void* context, void (*isr)(void*, alt_u32)); Altera Corporation Nios II

8 ISR id system.h IRQ IRQ 0 IRQ 31 context ISR ISR context HAL ISR isr IRQ ID 2 context id isr null ISR id alt_irq_register() alt_irq_register() 10 1 HAL API ISR ISR alt_irq_register() ISR void isr (void* context, alt_u32 id) context id alt_irq_register() ISR ISR HAL API ISR HAL ISR 6 8 Altera Corporation Nios II

9 ISR ANSI C C I/O API ISR API ISR printf() stdout printf() ISR printf() ISR ISR ISR ISR ISR ISR ISR ISR ISR 70 Altera Corporation Nios II

10 ISR alt_irq_interruptible() alt_irq_non_interruptible() ISR ISR ISR MicroC/OS-II RTOS ISR MicroC/OS II HAL ISR ISR HAL alt_irq_disable_all() alt_irq_enable_all() alt_irq_enable() alt_irq_disable_all() context alt_irq_enable_all() context alt_irq_disable_all() alt_irq_enabled() 6 10 Altera Corporation Nios II

11 C C ISR HAL API 4 PIO Nios II IRQ ISR PIO context ISR PIO ISR PIO IRQ ISR #include "system.h" #include "altera_avalon_pio_regs.h" #include "alt_types.h" static void handle_button_interrupts(void* context, alt_u32 id) { /* context */ volatile int* edge_capture_ptr = (volatile int*) context; /* * PIO * */ *edge_capture_ptr = IORD_ALTERA_AVALON_PIO_EDGE_CAP(BUTTON_PIO_BASE); /* */ IOWR_ALTERA_AVALON_PIO_EDGE_CAP(BUTTON_PIO_BASE, 0); /* PIO */ IOWR_ALTERA_AVALON_PIO_IRQ_MASK(BUTTON_PIO_BASE, 0xf); } ISR HAL HAL PIO ISR #include "sys/alt_irq.h" #include "system.h"... /* */ volatile int edge_capture;... /* */ alt_irq_register(button_pio_irq, (void*) &edge_capture, handle_button_interrupts); Altera Corporation Nios II

12 ISR 1. IRQ 2. HAL handle_button_interrupts() ISR 3. handle_button_interrupts() 4. edge_capture count_binary ISR Nios II ISR ISR SDRAM RAM Nios II CPU ISR 4 34 ISR HAL ISR ISR alt_irq_entry alt_irq_handler 6 12 Altera Corporation Nios II

13 ISR Nios II ISR 3 ISR ISR ISR Nios II Nios II ISR HAL -O3 6 1 Nios II 6 1. Nios II/f Nios II/s Nios II/e (1) CPU ISR 6 1 -O3 -O2 Altera Corporation Nios II

14 ISR Nios II Nios II/f Nios II/e HAL IRQ C IRQ CPU ISR ISR HAL ISR ISR ISR ISR Nios II IDE ISR IRQ ISR ipending ctl4 IRQ ipending _irq_entry alt_irq_handler() IRQ ipending IRQ ISR 6 14 Altera Corporation Nios II

15 ISR HAL ISR HAL API alt_irq_register() ISR ISR void isr (void* context, alt_u32 id) ISR ISR ISR ISR printf() C I/O alt_irq_interruptible() alt_irq_non_interruptible() ISR ISR ISR ISR Altera Corporation Nios II

16 ISR 6 16 Altera Corporation Nios II

Nios IIプロセッサ・リファレンス・ハンドブック、セクション I. Nios IIプロセッサ Ver. 1.2

Nios IIプロセッサ・リファレンス・ハンドブック、セクション I. Nios IIプロセッサ Ver. 1.2 I. Nios II Nios II 1 2 3 4 SOPC Builder Nios II Altera Corporation I 1 Nios II 1 4 Nios II Nios II / 1 2004 9 v1.1 Nios II 1.01 2004 5 v1.0 2 2004 12 v1.2 ctl5 2004 9 v1.1 Nios II 1.01 2004 5 v1.0 3 2004

More information

Quartus II ハンドブック Volume 5、セクションIV. マルチプロセッサの調整

Quartus II ハンドブック  Volume 5、セクションIV. マルチプロセッサの調整 IV. SOPC Builder Nios II 9 Avalon Mutex 10 Avalon Mailbox 9 10 / 9 v5.1.0 2005 5 v5.0.0 Nios II 2004 12 v1.0 10 v5.1.0 2005 5 v5.0.0 Altera Corporation IV 1 Quartus II Volume 5 IV 2 Altera Corporation

More information

Nios II - Vectored Interrupt Controller の実装

Nios II - Vectored Interrupt Controller の実装 ALTIMA Corp. Nios II Vectored Interrupt Controller の実装 ver.1.0 2010 年 7 月 ELSENA,Inc. 目次 1. はじめに... 3 2. 適用条件... 3 3. システムの構成... 4 3-1. SOPC Builder の設定... 4 3-2. ペリフェラルの設定... 4 3-2-1. VIC の設定... 4 3-2-2.

More information

プロセッサ・アーキテクチャ

プロセッサ・アーキテクチャ 2. NII51002-8.0.0 Nios II Nios II Nios II 2-3 2-4 2-4 2-6 2-7 2-9 I/O 2-18 JTAG Nios II ISA ISA Nios II Nios II Nios II 2 1 Nios II Altera Corporation 2 1 2 1. Nios II Nios II Processor Core JTAG interface

More information

Nios® II HAL API を使用したソフトウェア・サンプル集 「Modular Scatter-Gather DMA Core」

Nios® II HAL API を使用したソフトウェア・サンプル集 「Modular Scatter-Gather DMA Core」 ALTIMA Company, MACNICA, Inc Nios II HAL API Modular Scatter-Gather DMA Core Ver.17.1 2018 8 Rev.1 Nios II HAL API Modular Scatter-Gather DMA Core...3...3...4... 4... 5 3-2-1. msgdma... 6 3-2-2. On-Chip

More information

Nios II IDE によるソフトウェア開発 セクション 2

Nios II IDE によるソフトウェア開発  セクション 2 ALTIMA Corp. Nios II IDE によるソフトウェア開発セクション 2 ver.1.0 2010 年 8 月 ELSENA,Inc. Nios II IDE によるソフトウェア開発セクション 2 目次 1. はじめに... 4 2. Nios II ソフトウェア プロジェクトが必要とする重要なファイル... 4 2-1. HAL システム ヘッダファイル... 4 2-2. リンカ

More information

Nios II ハードウェア・チュートリアル

Nios II ハードウェア・チュートリアル Nios II ver. 7.1 2007 8 1. Nios II FPGA Nios II Quaruts II 7.1 Nios II 7.1 Nios II Cyclone II count_binary 2. 2-1. http://www.altera.com/literature/lit-nio2.jsp 2-2. Nios II Quartus II FEATURE Nios II

More information

Nios II ソフトウェア開発ハンドブック Version 1.2 セクション IV. 付録 

Nios II ソフトウェア開発ハンドブック Version 1.2 セクション IV. 付録  IV. 10 HAL API 11 12 zip Nios II Nios II / 10 2004 12 v1.2 2004 9 v1.1 2004 5 v1.0 11 2004 12 v1.1 2004 5 v1.0 12 2004 5 v1.0 DMA open() alt_dma_txchan_open() ERRNO ALT_DMA_TX_STREAM_ON ALT_DMA_RX_STREAM_ON

More information

Nios II ソフトウェア開発ハンドブック Version 1.2 第5章. HAL用デバイス・ドライバの開発 ver.1.1

Nios II ソフトウェア開発ハンドブック Version 1.2 第5章. HAL用デバイス・ドライバの開発 ver.1.1 5. HAL NII52005-1.1 HAL Hardware Abstraction Layer HAL API Application Programming Interface Nios II 2 HAL HAL API API HAL API HAL API DMA HAL HAL API HAL API ASCII LCD printf() LCD Altera Corporation

More information

‚æ4›ñ

‚æ4›ñ ( ) ( ) ( ) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 (OUS) 9 26 1 / 28 ( ) ( ) ( ) A B C D Z a b c d z 0 1 2 9 (OUS) 9

More information

I. Backus-Naur BNF : N N 0 N N N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) (2) (3) (4) II. 0(0 101)* (

I. Backus-Naur BNF : N N 0 N N N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) (2) (3) (4) II. 0(0 101)* ( 2016 2016 07 28 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF : 11011 N N 0 N N 11 1001 N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) 1100100 (2) 1111011 (3) 1110010 (4) 1001011

More information

Nios II IDE によるソフトウェア開発 - セクション 1

Nios II IDE によるソフトウェア開発 - セクション 1 ALTIMA Corp. Nios II IDE によるソフトウェア 開 発 セクション 1 ver.1.0 2010 年 8 月 ELSENA,Inc. 目 次 1. はじめに... 3 2. HAL を 用 いたプログラミング... 3 2-1. HAL (Hardware Abstraction Layer)... 3 2-2. Nios II IDE プロジェクトの 構 造... 4 2-3.

More information

I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) + x * x + x x (4) * *

I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) + x * x + x x (4) * * 2015 2015 07 30 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) +

More information

Nios II 簡易チュートリアル

Nios II 簡易チュートリアル Nios II Ver. 7.1 2007 10 1. Nios II Nios II JTAG UART LED 8 PIO LED < > Quartus II SOPC Builder Nios II Quartus II.sof Nios II IDE Stratix II 2S60 RoHS Nios II Quartus II http://www.altera.com/literature/lit-nio2.jsp

More information

:30 12:00 I. I VI II. III. IV. a d V. VI

:30 12:00 I. I VI II. III. IV. a d V. VI 2018 2018 08 02 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF N N y N x N xy yx : yxxyxy N N x, y N (parse tree) (1) yxyyx (2) xyxyxy (3) yxxyxyy (4) yxxxyxxy N y N x N yx

More information

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF pref : 2004/6/5 (11:8) pref : 2004/6/5 (11:8) pref : 2004/6/5 (11:8) 3 5 14 18 21 23 23 24 28 29 29 31 32 34 35 35 36 38 40 44 44 45 46 49 49 50 pref : 2004/6/5 (11:8) 50 51 52 54 55 56 57 58 59 60 61

More information

:30 12:00 I. I VI II. III. IV. a d V. VI

:30 12:00 I. I VI II. III. IV. a d V. VI 2017 2017 08 03 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF X [ S ] a S S ; X X X, S [, a, ], ; BNF X (parse tree) (1) [a;a] (2) [[a]] (3) [a;[a]] (4) [[a];a] : [a] X 2 222222

More information

Taro-リストⅢ(公開版).jtd

Taro-リストⅢ(公開版).jtd リスト Ⅲ 0. 目次 2. 基本的な操作 2. 1 リストから要素の削除 2. 2 リストの複写 2. 3 リストの連結 2. 4 問題 問題 1 問題 2-1 - 2. 基本的な操作 2. 1 リストから要素の削除 まず 一般的な処理を書き つぎに 特別な処理を書く 一般的な処理は 処理 1 : リスト中に 削除するデータを見つけ 削除する場合への対応 特別な処理は 処理 2 : 先頭のデータを削除する場合への対応

More information

tuat1.dvi

tuat1.dvi ( 1 ) http://ist.ksc.kwansei.ac.jp/ tutimura/ 2012 6 23 ( 1 ) 1 / 58 C ( 1 ) 2 / 58 2008 9 2002 2005 T E X ptetex3, ptexlive pt E X UTF-8 xdvi-jp 3 ( 1 ) 3 / 58 ( 1 ) 4 / 58 C,... ( 1 ) 5 / 58 6/23( )

More information

para02-2.dvi

para02-2.dvi 2002 2 2002 4 23 : MPI MPI 1 MPI MPI(Message Passing Interface) MPI UNIX Windows Machintosh OS, MPI 2 1 1 2 2.1 1 1 1 1 1 1 Fig. 1 A B C F Fig. 2 A B F Fig. 1 1 1 Fig. 2 2.2 Fig. 3 1 . Fig. 4 Fig. 3 Fig.

More information

untitled

untitled II yacc 005 : 1, 1 1 1 %{ int lineno=0; 3 int wordno=0; 4 int charno=0; 5 6 %} 7 8 %% 9 [ \t]+ { charno+=strlen(yytext); } 10 "\n" { lineno++; charno++; } 11 [^ \t\n]+ { wordno++; charno+=strlen(yytext);}

More information

Java演習(4) -- 変数と型 --

Java演習(4)   -- 変数と型 -- 50 20 20 5 (20, 20) O 50 100 150 200 250 300 350 x (reserved 50 100 y 50 20 20 5 (20, 20) (1)(Blocks1.java) import javax.swing.japplet; import java.awt.graphics; (reserved public class Blocks1 extends

More information

SystemC 2.0を用いた簡易CPUバスモデルの設計

SystemC 2.0を用いた簡易CPUバスモデルの設計 SystemC 2.0 CPU CPU CTD&SW CT-PF 2002/1/23 1 CPU BCA UTF GenericCPU IO (sc_main) 2002/1/23 2 CPU CPU CQ 1997 11 Page 207 4 Perl Verilog-HDL CPU / Verilog-HDL SystemC 2.0 (asm) ROM (test.hex) 2002/1/23

More information

PowerPoint Presentation

PowerPoint Presentation p.130 p.198 p.208 2 double weight[num]; double min, max; min = max = weight[0]; for( i= 1; i i < NUM; i++ ) ) if if ( weight[i] > max ) max = weight[i]: if if ( weight[i] < min ) min = weight[i]: weight

More information

main

main 14 1. 12 5 main 1.23 3 1.230000 3 1.860867 1 2. 1988 1925 1911 1867 void JPcalendar(int x) 1987 1 64 1 1 1 while(1) Ctrl C void JPcalendar(int x){ if (x > 1988) printf(" %d %d \n", x, x-1988); else if(x

More information

新・明解Java入門

新・明解Java入門 537,... 224,... 224,... 32, 35,... 188, 216, 312 -... 38 -... 38 --... 102 --... 103 -=... 111 -classpath... 379 '... 106, 474!... 57, 97!=... 56 "... 14, 476 %... 38 %=... 111 &... 240, 247 &&... 66,

More information

1 1 2 2 2.1 Java......... 2 2.2................................. 3 2.3.................................. 3 3 4 3.1....................................

1 1 2 2 2.1 Java......... 2 2.2................................. 3 2.3.................................. 3 3 4 3.1.................................... 06H082 1 1 2 2 2.1 Java......... 2 2.2................................. 3 2.3.................................. 3 3 4 3.1..................................... 4 3.2 GP.....................................

More information

DA100データアクイジションユニット通信インタフェースユーザーズマニュアル

DA100データアクイジションユニット通信インタフェースユーザーズマニュアル Instruction Manual Disk No. RE01 6th Edition: November 1999 (YK) All Rights Reserved, Copyright 1996 Yokogawa Electric Corporation 801234567 9 ABCDEF 1 2 3 4 1 2 3 4 1 2 3 4 1 2

More information

102

102 5 102 5 103 q w 104 e r t y 5 u 105 q w e r t y u i 106 o!0 io!1 io q w e r t y 5 u 107 i o 108 q w e q w e r 5 109 q w 110 e r t 5 y 111 q w e r t y u 112 i q w e r 5 113 q w e 114 r t 5 115 q w e 116

More information

01_OpenMP_osx.indd

01_OpenMP_osx.indd OpenMP* / 1 1... 2 2... 3 3... 5 4... 7 5... 9 5.1... 9 5.2 OpenMP* API... 13 6... 17 7... 19 / 4 1 2 C/C++ OpenMP* 3 Fortran OpenMP* 4 PC 1 1 9.0 Linux* Windows* Xeon Itanium OS 1 2 2 WEB OS OS OS 1 OS

More information

void hash1_init(int *array) int i; for (i = 0; i < HASHSIZE; i++) array[i] = EMPTY; /* i EMPTY */ void hash1_insert(int *array, int n) if (n < 0 n >=

void hash1_init(int *array) int i; for (i = 0; i < HASHSIZE; i++) array[i] = EMPTY; /* i EMPTY */ void hash1_insert(int *array, int n) if (n < 0 n >= II 14 2018 7 26 : : proen@mm.ics.saitama-u.ac.jp 14,, 8 2 12:00 1 O(1) n O(n) O(log n) O(1) 32 : 1G int 4 250 M 2.5 int 21 2 0 100 0 100 #include #define HASHSIZE 100 /* */ #define NOTFOUND 0

More information

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

C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます.  このサンプルページの内容は, 新装版 1 刷発行時のものです. C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. http://www.morikita.co.jp/books/mid/009383 このサンプルページの内容は, 新装版 1 刷発行時のものです. i 2 22 2 13 ( ) 2 (1) ANSI (2) 2 (3) Web http://www.morikita.co.jp/books/mid/009383

More information

A B 1: Ex. MPICH-G2 C.f. NXProxy [Tanaka] 2:

A B 1: Ex. MPICH-G2 C.f. NXProxy [Tanaka] 2: Java Jojo ( ) ( ) A B 1: Ex. MPICH-G2 C.f. NXProxy [Tanaka] 2: Java Jojo Jojo (1) :Globus GRAM ssh rsh GRAM ssh GRAM A rsh B Jojo (2) ( ) Jojo Java VM JavaRMI (Sun) Horb(ETL) ( ) JPVM,mpiJava etc. Send,

More information

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() 2 double *a[ ]; double 1 malloc() dou

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() 2 double *a[ ]; double 1 malloc() dou 1 1.1 C 2 1 double a[ ][ ]; 1 3x3 0 1 3x3 ( ) 0.240 0.143 0.339 0.191 0.341 0.477 0.412 0.003 0.921 1.2 malloc() 2 double *a[ ]; double 1 malloc() double 1 malloc() free() 3 #include #include

More information

アルゴリズムとデータ構造1

アルゴリズムとデータ構造1 1 2005 7 22 22 (sakai.keiichi@kochi sakai.keiichi@kochi-tech.ac.jp) http://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/2005/index.html tech.ac.jp/k1sakai/lecture/alg/2005/index.html f(0) = 1, f(x) =

More information

FreeBSD 1

FreeBSD 1 FreeBSD 1 UNIX OS 1 ( ) open, close, read, write, ioctl (cdevsw) OS DMA 2 (8 ) (24 ) 256 open/close/read/write Ioctl 3 2 2 I/O I/O CPU 4 open/close/read/write open, read, write open/close read/write /dev

More information

8 / 0 1 i++ i 1 i-- i C !!! C 2

8 / 0 1 i++ i 1 i-- i C !!! C 2 C 2006 5 2 printf() 1 [1] 5 8 C 5 ( ) 6 (auto) (static) 7 (=) 1 8 / 0 1 i++ i 1 i-- i 1 2 2.1 C 4 5 3 13!!! C 2 2.2 C ( ) 4 1 HTML はじめ mkdir work 作業用ディレクトリーの作成 emacs hoge.c& エディターによりソースプログラム作成 gcc -o fuga

More information

02_C-C++_osx.indd

02_C-C++_osx.indd C/C++ OpenMP* / 2 C/C++ OpenMP* OpenMP* 9.0 1... 2 2... 3 3OpenMP*... 5 3.1... 5 3.2 OpenMP*... 6 3.3 OpenMP*... 8 4OpenMP*... 9 4.1... 9 4.2 OpenMP*... 9 4.3 OpenMP*... 10 4.4... 10 5OpenMP*... 11 5.1

More information

新版明解C言語 実践編

新版明解C言語 実践編 2 List - "max.h" a, b max List - max "max.h" #define max(a, b) ((a) > (b)? (a) : (b)) max List -2 List -2 max #include "max.h" int x, y; printf("x"); printf("y"); scanf("%d", &x); scanf("%d", &y); printf("max(x,

More information

SystemC言語概論

SystemC言語概論 SystemC CPU S/W 2004/01/29 4 SystemC 1 SystemC 2.0.1 CPU S/W 3 ISS SystemC Co-Simulation 2004/01/29 4 SystemC 2 ISS SystemC Co-Simulation GenericCPU_Base ( ) GenericCPU_ISS GenericCPU_Prog GenericCPU_CoSim

More information

untitled

untitled H8/300,H8S,H8SX [H8S,H8/300 Tool Chain Ver6.2.0.0] #define Inline static inline //************************************************** Inline char sil_and_mem(char *mem,char and) return (*((volatile

More information

8 if switch for while do while 2

8 if switch for while do while 2 (Basic Theory of Information Processing) ( ) if for while break continue 1 8 if switch for while do while 2 8.1 if (p.52) 8.1.1 if 1 if ( ) 2; 3 1 true 2 3 false 2 3 3 8.1.2 if-else (p.54) if ( ) 1; else

More information

ARM gcc Kunihiko IMAI 2009 1 11 ARM gcc 1 2 2 2 3 3 4 3 4.1................................. 3 4.2............................................ 4 4.3........................................

More information

,,,,., C Java,,.,,.,., ,,.,, i

,,,,., C Java,,.,,.,., ,,.,, i 24 Development of the programming s learning tool for children be derived from maze 1130353 2013 3 1 ,,,,., C Java,,.,,.,., 1 6 1 2.,,.,, i Abstract Development of the programming s learning tool for children

More information

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved (Version: 2013/5/16) Intel CPU (kashi@waseda.jp) 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU double 8087 FPU (floating point number processing unit)

More information

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() malloc 2 #include <stdio.h> #include

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() malloc 2 #include <stdio.h> #include 1 1.1 C 2 1 double a[ ][ ]; 1 3x3 0 1 3x3 ( ) 0.240 0.143 0.339 0.191 0.341 0.477 0.412 0.003 0.921 1.2 malloc() malloc 2 #include #include #include enum LENGTH = 10 ; int

More information

WinHPC ppt

WinHPC ppt MPI.NET C# 2 2009 1 20 MPI.NET MPI.NET C# MPI.NET C# MPI MPI.NET 1 1 MPI.NET C# Hello World MPI.NET.NET Framework.NET C# API C# Microsoft.NET java.net (Visual Basic.NET Visual C++) C# class Helloworld

More information

tutorial_lc.dvi

tutorial_lc.dvi 00 Linux v.s. RT Linux v.s. ART-Linux Linux RT-Linux ART-Linux Linux kumagai@emura.mech.tohoku.ac.jp 1 1.1 Linux Yes, No.,. OS., Yes. Linux,.,, Linux., Linux.,, Linux. Linux.,,. Linux,.,, 0..,. RT-Linux

More information

- 1 - - 0.5%5 10 10 5 10 1 5 1

- 1 - - 0.5%5 10 10 5 10 1 5 1 - - - 1 - - 0.5%5 10 10 5 10 1 5 1 - 2 - - - - A B A A A B A B B A - 3 - - 100 100 100 - A) ( ) B) A) A B A B 110 A B 13 - 4 - A) 36 - - - 5 - - 1 - 6-1 - 7 - - 8 - Q.15 0% 10% 20% 30% 40% 50% 60% 70%

More information

13 I/O

13 I/O 13 I/O 98-0997-3 14 2 7 Linux OS OS OS I/O I/O TS-I/O I/O I/O TS-I/O TS-I/O 3 1 7 2 9 2.1..................... 9 2.2.................. 10 2.3 2...................... 12 2.4 Linux................... 14

More information

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 ) i ii i ii 45 46 47 2 48 49 50 51 52 53 54 55 56 57 58

More information

untitled

untitled i ii (1) (1) (2) (1) (3) (1) (1) (2) (1) (3) (1) (1) (2) (1) (3) (2) (3) (1) (2) (3) (1) (1) (1) (1) (2) (1) (3) (1) (2) (1) (3) (1) (1) (1) (2) (1) (3) (1) (1) (2) (1) (3)

More information

23 15961615 1659 1657 14 1701 1711 1715 11 15 22 15 35 18 22 35 23 17 17 106 1.25 21 27 12 17 420,845 23 32 58.7 32 17 11.4 71.3 17.3 32 13.3 66.4 20.3 17 10,657 k 23 20 12 17 23 17 490,708 420,845 23

More information

平成18年度「商品先物取引に関する実態調査」報告書

平成18年度「商品先物取引に関する実態調査」報告書 ... 1.... 5-1.... 6-2.... 9-3.... 10-4.... 12-5.... 13-6.... 15-7.... 16-8.... 17-9.... 20-10.... 22-11.... 24-12.... 27-13... 29-14.... 32-15... 37-16.... 39-17.... 41-18... 43-19... 45.... 49-1... 50-2...

More information

MPI MPI MPI.NET C# MPI Version2

MPI MPI MPI.NET C# MPI Version2 MPI.NET C# 2 2009 2 27 MPI MPI MPI.NET C# MPI Version2 MPI (Message Passing Interface) MPI MPI Version 1 1994 1 1 1 1 ID MPI MPI_Send MPI_Recv if(rank == 0){ // 0 MPI_Send(); } else if(rank == 1){ // 1

More information

目 目 用方 用 用 方

目 目 用方 用 用 方 大 生 大 工 目 目 用方 用 用 方 用 方 MS-MPI MPI.NET MPICH MPICH2 LAM/MPI Ver. 2 2 1 2 1 C C++ Fortan.NET C# C C++ Fortan 用 行 用 用 用 行 用 言 言 言 行 生 方 方 一 行 高 行 行 文 用 行 If ( rank == 0 ) { // 0 } else if (rank == 1) {

More information

ACE Associated Computer Experts bv

ACE Associated Computer Experts bv CoSy Application CoSy Marcel Beemster/Yoichi Sugiyama ACE Associated Compiler Experts & Japan Novel Corporation contact: yo_sugi@jnovel.co.jp Parallel Architecture 2 VLIW SIMD MIMD 3 MIMD HW DSP VLIW/ILP

More information

P03.ppt

P03.ppt (2) Switch case 5 1 1 2 1 list0317.c if /*/ intnum; printf(""); scanf("%d", &num); 2 if (num % 3 == 0) puts( 0"); else if (num % 3 == 1) puts(" 1"); else puts( 32"); 3 if list0318.c /*/ intnum; printf("");

More information

A/B (2010/10/08) Ver kurino/2010/soft/soft.html A/B

A/B (2010/10/08) Ver kurino/2010/soft/soft.html A/B A/B (2010/10/08) Ver. 1.0 kurino@math.cst.nihon-u.ac.jp http://edu-gw2.math.cst.nihon-u.ac.jp/ kurino/2010/soft/soft.html 2010 10 8 A/B 1 2010 10 8 2 1 1 1.1 OHP.................................... 1 1.2.......................................

More information

C¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç

C¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç C (3) if else switch AND && OR (NOT)! 1 BMI BMI BMI = 10 4 [kg]) ( [cm]) 2 bmi1.c Input your height[cm]: 173.2 Enter Input your weight[kg]: 60.3 Enter Your BMI is 20.1. 10 4 = 10000.0 1 BMI BMI BMI = 10

More information

ROMの入手1 - インターネットからの入手 違法にアップロードされたROMをダウンロードする方法 当然ながらダウンロードも違法行為(2010年1月1日より施行) ^ÇÇêÉëë=éáå a~í~=éáå 吸い出し機の仕組み - PRG-ROM, CHR-ROM ファミコンのカートリッジにはゲームプログラム本体(PRG-ROM)と グラフィックデータ(CHR-ROM)が存在する ines Header

More information

サービス付き高齢者向け住宅賠償責任保険.indd

サービス付き高齢者向け住宅賠償責任保険.indd 1 2 1 CASE 1 1 2 CASE 2 CASE 3 CASE 4 3 CASE 5 4 3 4 5 6 2 CASE 1 CASE 2 CASE 3 7 8 3 9 10 CASE 1 CASE 2 CASE 3 CASE 4 11 12 13 14 1 1 2 FAX:03-3375-8470 2 3 3 4 4 3 15 16 FAX:03-3375-8470 1 2 0570-022808

More information

/* do-while */ #include <stdio.h> #include <math.h> int main(void) double val1, val2, arith_mean, geo_mean; printf( \n ); do printf( ); scanf( %lf, &v

/* do-while */ #include <stdio.h> #include <math.h> int main(void) double val1, val2, arith_mean, geo_mean; printf( \n ); do printf( ); scanf( %lf, &v 1 http://www7.bpe.es.osaka-u.ac.jp/~kota/classes/jse.html kota@fbs.osaka-u.ac.jp /* do-while */ #include #include int main(void) double val1, val2, arith_mean, geo_mean; printf( \n );

More information

プログラミング基礎

プログラミング基礎 C プログラミング Ⅰ 条件分岐 if~else if~else 文,switch 文 条件分岐 if~else if~else 文 if~else if~else 文 複数の条件で処理を分ける if~else if~else 文の書式 if( 条件式 1){ 文 1-1; 文 1-2; else if( 条件式 2){ 文 2-1; 文 2-2; else { 文 3-1; 文 3-2; 真条件式

More information

#include #include #include int gcd( int a, int b) { if ( b == 0 ) return a; else { int c = a % b; return gcd( b, c); } /* if */ } int main() { int a = 60; int b = 45; int

More information

2

2 Haskell ( ) kazu@iij.ad.jp 1 2 Blub Paul Graham http://practical-scheme.net/trans/beating-the-averages-j.html Blub Blub Blub Blub 3 Haskell Sebastian Sylvan http://www.haskell.org/haskellwiki/why_haskell_matters...

More information

C言語によるアルゴリズムとデータ構造

C言語によるアルゴリズムとデータ構造 Algorithms and Data Structures in C 4 algorithm List - /* */ #include List - int main(void) { int a, b, c; int max; /* */ Ÿ 3Ÿ 2Ÿ 3 printf(""); printf(""); printf(""); scanf("%d", &a); scanf("%d",

More information

r02.dvi

r02.dvi 172 2017.7.16 1 1.1? X A B A X B ( )? IBMPL/I FACOM PL1 ( ) X ( ) 1.2 1 2-0 ( ) ( ) ( ) (12) ( ) (112) (131) 281 26 1 (syntax) (semantics) ( ) 2 2.1 BNF BNF(Backus Normal Form) Joun Backus (grammer) English

More information

ohp02.dvi

ohp02.dvi 172 2017.7.16 1 ? X A B A X B ( )? IBMPL/I FACOM PL1 ( ) X 2 ( ) 3 2-0 ( ) ( ) ( ) (12) ( ) (112) 31) 281 26 1 4 (syntax) (semantics) ( ) 5 BNF BNF(Backus Normal Form) Joun Backus (grammer) English grammer

More information

r1.dvi

r1.dvi 2014 1 2014.4.10 0 / 1 / 2 / 3 Lisp 4 5 ( ) 1 (5 1 ) 5 1 1.1? 0 1 (bit sequence) 5 101 3 11 2 (binary system) 2 1000 8 1 ( ) ( )? ( 1) r1 1000 1001 r2 1002... r3 1: (memory) (address) CPU (instruction)

More information

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved (Version: 2013/7/10) Intel CPU (kashi@waseda.jp) 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU double 8087 FPU (floating point number processing unit)

More information

: : : TSTank 2

: : : TSTank 2 Java (8) 2008-05-20 Lesson6 Lesson5 Java 1 Lesson 6: TSTank1, TSTank2, TSTank3 java 2 car1 car2 Car car1 = new Car(); Car car2 = new Car(); car1.setcolor(red); car2.setcolor(blue); car2.changeengine(jet);

More information

r07.dvi

r07.dvi 19 7 ( ) 2019.4.20 1 1.1 (data structure ( (dynamic data structure 1 malloc C free C (garbage collection GC C GC(conservative GC 2 1.2 data next p 3 5 7 9 p 3 5 7 9 p 3 5 7 9 1 1: (single linked list 1

More information

IO-PCIソフト仕様書3版.PDF

IO-PCIソフト仕様書3版.PDF DLL iopcisb.dll95/98/me iopcisbnt.dllnt/2000/xp WindowsSystem iopcisb.lib(95/98/me) iopcisbnt.lib(nt/2000/xp) VisualC/C++ IOPCIapi.h HANDLEhVxD // hvxd=iopciopen(1); // (1) ID // // intret; ret=iopciclose(

More information

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 1. 1.1. 1.2. 1 PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 2. 2.1. 2 1 2 C a b N: PC BC c 3C ac b 3 4 a F7 b Y c 6 5 a ctrl+f5) 4 2.2. main 2.3. main 2.4. 3 4 5 6 7 printf printf

More information

ohp07.dvi

ohp07.dvi 19 7 ( ) 2019.4.20 1 (data structure) ( ) (dynamic data structure) 1 malloc C free 1 (static data structure) 2 (2) C (garbage collection GC) C GC(conservative GC) 2 2 conservative GC 3 data next p 3 5

More information

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2 " 2 B R b

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2  2 B R b I 4 003 4 30 1 ASCII ( ) 0 17 0 NUL 16 DLE SP 0 @ P 3 48 64 80 96 11 p 1 SOH 17 DC1! 1 A Q a 33 49 65 81 97 113 q STX 18 DC " B R b 34 50 66 8 98 114 r 3 ETX 19 DC3 # 3 C S c 35 51 67 83 99 115 s 4 EOT

More information

Nios II カスタム・インストラクションによるキャスト(型変換)の高速化

Nios II カスタム・インストラクションによるキャスト(型変換)の高速化 ver. 9.1 2009 年 12 月 1. はじめに Nios II にオプションで実装できる浮動小数演算カスタム インストラクションは 浮動小数四則演算はサポートしているものの 整数から浮動小数にキャスト ( 型変換 ) する機能やその逆の機能は備えていません この資料では 単精度浮動小数型と整数型の変換を簡単に Nios II のカスタム インストラクションに実装する方法を紹介しています なお

More information

untitled

untitled Linux Core0 RedHat Enterprise Linux 5 2.6.26 RedHawk Linux Linux 1/1 RedHat Shared Memory Core1. Core31 2.6.21 Linux + PREEMPT_RT Shared Memory Core0 1/2 FIFO 2.6.14 Linux RealTime Scheduler Core1 POSIX(RedHat)

More information

複数の Nios II を構成する際の注意事項

複数の Nios II を構成する際の注意事項 ver. 1.0 2009 年 4 月 1. はじめに Nios II IDE で ソフトウェアをビルドすると SOPC Builder の GUI 上で Nios II と接続されているペリフェラル用の初期化コードを自動で生成します この各ペリフェラルに対応した初期化コードで ペリフェラルを制御するためにアルテラ社から提供された HAL を利用するための準備や 各ペリフェラルの一般的な理想と考えられる初期状態のレジスタ設定等を行います

More information

第3章 OpenGL の基礎

第3章 OpenGL の基礎 3 OpenGL April 11, 2017 1 / 28 3.1 ( ) OpenGL OpenGL 2 / 28 3.2 OpenGL OpenGL OpenGL (Open Graphics Library) Silicon Graphics, Inc. 2 3 API (Application Program Interface) [4] UNIX OS Windows Macintosh

More information

アルゴリズムとデータ構造1

アルゴリズムとデータ構造1 1 200972 (sakai.keiichi@kochi sakai.keiichi@kochi-tech.ac.jp) http://www.info.kochi ://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/2009/index.html 29 20 32 14 24 30 48 7 19 21 31 Object public class

More information

Taro-2分探索木Ⅱ(公開版).jtd

Taro-2分探索木Ⅱ(公開版).jtd 2 分探索木 Ⅱ 0. 目次 5. 2 分探索木の操作 5. 1 要素の探索 5. 2 直前の要素の探索 5. 3 直後の要素の探索 5. 4 要素の削除 5. 5 問題 問題 1-1 - 5. 2 分探索木の操作 5. 1 要素の探索 要素 44 の探索 (1) 要素 と 44 を比較して 左部分木をたどる (2) 要素 33 と 44 を比較して 右部分木をたどる (3) 要素 44 を見つけた

More information

1.ppt

1.ppt /* * Program name: hello.c */ #include int main() { printf( hello, world\n ); return 0; /* * Program name: Hello.java */ import java.io.*; class Hello { public static void main(string[] arg)

More information

IPSJ SIG Technical Report Vol.2017-ARC-225 No.12 Vol.2017-SLDM-179 No.12 Vol.2017-EMB-44 No /3/9 1 1 RTOS DefensiveZone DefensiveZone MPU RTOS

IPSJ SIG Technical Report Vol.2017-ARC-225 No.12 Vol.2017-SLDM-179 No.12 Vol.2017-EMB-44 No /3/9 1 1 RTOS DefensiveZone DefensiveZone MPU RTOS 1 1 RTOS DefensiveZone DefensiveZone MPU RTOS RTOS OS Lightweight partitioning architecture for automotive systems Suzuki Takehito 1 Honda Shinya 1 Abstract: Partitioning using protection RTOS has high

More information

【注意事項】RXファミリ 組み込み用TCP/IP M3S-T4-Tiny

【注意事項】RXファミリ 組み込み用TCP/IP M3S-T4-Tiny 注意事項 RX ファミリ組み込み用 TCP/IP M3S-T4-Tiny R20TS0227JJ0100 Rev.1.00 号 概要 RX ファミリ組み込み用 TCP/IP M3S-T4-Tiny ( 注 ) の使用上の注意事項を連絡します 1. Ping Reply パケットに関する注意事項 2. LAN ネットワーク環境に関する注意事項 3. select() 関数のタイムアウト設定値に関する注意事項

More information

橡Pro PDF

橡Pro PDF 1 void main( ) char c; /* int c; */ int sum=0; while ((c = getchar())!= EOF) if(isdigit(c) ) sum += (c-'0'); printf("%d\n", sum); main()int i,sum=0; for(i=0;i

More information