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

Size: px
Start display at page:

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

Transcription

1 SystemC 2.0 CPU CPU CTD&SW CT-PF 2002/1/23 1

2 CPU BCA UTF GenericCPU IO (sc_main) 2002/1/23 2

3 CPU CPU CQ Page Perl Verilog-HDL CPU / Verilog-HDL SystemC 2.0 (asm) ROM (test.hex) 2002/1/23 3

4 init GenericCPU reset Top TestBench nrst ROM ROM CLK fetch decode execute load IO store load store dump 2002/1/23 4

5 BCA UTF BCA UTF GenericCPU IO GenericCPU IO CLK Addr CLK ncs Ready noe Data Addr Data nwe Data Addr Data 7CLK /1/23 5

6 GenericCPU init GenericCPU reset 1) (init ) 2) ( reset ) 3) ( clock_posedge ) ( fetch ) ( decode ) ( execute ) ( load ( store ) 4) ( dumpreg ) ROM ROM fetch decode execute dump load store 2002/1/23 6

7 (GenericCPU GenericCPU.hpp ) #include <string> #include "systemc.h" class GenericCPU : public sc_module private : static const int MEM_SIZE = 1024; string hex_file; bool dump; int memory[mem_size]; int Reg[8]; int pc, eq, lt, gt; int code, r0, r1, imm; void clock_posedge( void ); public : SC_HAS_PROCESS(GenericCPU); GenericCPU(sc_module_name name, char *_hex_file = "test.hex", bool _dump = true) : sc_module(name), hex_file(_hex_file), dump(_dump) SC_CTHREAD(clock_posedge, CLK.pos()); watching(nrst.delayed() == false); init(); void init( void ); void reset( void ); int fetch( int p ); void decode( int decode ); void execute( void ); void dumpreg( void ); void load( int addr, int& data ); void store( int addr, int data ); int readmem( const char *file, int *mem, int size ); int analyze_buffer( char *buffer, int *val); 2002/1/23 7

8 (GenericCPU GenericCPU.hpp ) BCA UTF #include sc_mslib.h // sc_inoutmaster private : private : static const bool LOGIC_0 = false; static const bool LOGIC_1 = true; static const char *const HiZ_32 = "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"; inline void high_cs( void ) ncs = LOGIC_1; inline void low_cs( void ) ncs = LOGIC_0; inline void high_oe( void ) noe = LOGIC_1; inline void low_oe( void ) noe = LOGIC_0; inline void high_we( void ) nwe = LOGIC_1; inline void low_we( void ) nwe = LOGIC_0; inline void hiz_a( void ) A = HiZ_32; inline void set_a( const int val ) A = val; inline void hiz_d( void ) D = HiZ_32; inline void set_d( const int val ) D = val; inline int get_d( void ) sc_uint<32> sig; sig = D; return((int)sig); public : sc_out_rv<32> A; sc_inout_rv<32> D; sc_out<bool> ncs; sc_out<bool> noe; sc_out<bool> nwe; sc_in<bool> READY; public : sc_inoutmaster<int, sc_indexed<int,1024> > MP; 2002/1/23 8

9 (GenericCPU GenericCPU.cpp : ) void GenericCPU::init( void ) if( readmem( hex_file.c_str(), memory, MEM_SIZE ) ) exit(1); void GenericCPU::clock_posedge( void ) if( nrst.read() == false ) /* Reset */ reset(); while(true) wait(); decode( fetch(pc) ); execute(); void GenericCPU::decode( int decode ) code = (decode >> 24) & 0x000000ff; r0 = (decode >> 20) & 0x f; r1 = (decode >> 16) & 0x f; imm = decode & 0x0000ffff; printf("pc = %08x CODE = 0x%02x R0 = %d R1 = %d IMM = 0x%04x n", pc, code, r0, r1, imm ); void GenericCPU::dumpreg( void ) inti, tmp; printf( "Register Contents t t t trom Contents n" ); if( dump ) dumpreg(); for( i=0 ; i<8 ; i=i+1 ) tmp = i+pc-3; tmp = tmp < 0? 0 : tmp; int GenericCPU::fetch( int p ) return memory[p]; printf("reg[ %d] : %08x t trom[%08x]=%08x n", i, Reg[i], tmp, memory[tmp] ) ; 2002/1/23 9

10 (GenericCPU.cpp ) void GenericCPU::execute( void ) int jmp = 1; switch(code) case CPU_ADD : Reg[r0] = Reg[r0] + Reg[r1]; break; case CPU_SUB : Reg[r0] = Reg[r0] - Reg[r1]; break; case CPU_MOV : Reg[r0] = Reg[r1]; break; case CPU_SETHI : Reg[r0] = ( MASK_HI(imm<<16) MASK_LO(Reg[r0]) ); break; case CPU_SETLO : Reg[r0] = ( MASK_HI(Reg[r0]) MASK_LO(imm) ); break; case CPU_CMP : if( Reg[r0] == Reg[r1] ) eq = 1, gt = 0, lt = 0; else if( Reg[r0] > Reg[r1] ) eq = 0, gt = 1, lt = 0; else if( Reg[r0] < Reg[r1] ) eq = 0, gt = 0, lt = 1; break; case CPU_JMP : jmp = SET_JUMP(imm); break; case CPU_JEQ : if( eq ) jmp = SET_JUMP(imm); break; case CPU_JGT : if( gt ) case CPU_JLT : if( lt ) jmp = SET_JUMP(imm); break; jmp = SET_JUMP(imm); break; case CPU_LOAD : load(reg[r0], Reg[r1]); break; case CPU_STORE : store(reg[r0], Reg[r1]); break; case CPU_HALT : printf("generic CPU Model : halt n"); sc_stop(); break; case CPU_FINISH : printf("generic CPU Model : exit at %f n", sc_simulation_time()); exit(0); break; default : printf("error : Generic CPU Model does not support Code 0x%02x n", code); break; Reg[0] = 0; pc = pc + jmp; 2002/1/23 10

11 (GenericCPU GenericCPU.cpp ) BCA void GenericCPU::reset( void ) high_cs(); high_oe(); high_we(); hiz_a(); hiz_d(); UTF void GenericCPU::reset( void ) // BCA // for(int i=0 ; i<8 ; i++) Reg[i] = 0; pc = 0; eq = 0; lt = 0; gt = 0; code = 0; r0 = 0; r1 = 0; imm = 0; // for(int i=0 ; i<8 ; i++) Reg[i] = 0; pc = 0; eq = 0; lt = 0; gt = 0; code = 0; r0 = 0; r1 = 0; imm = 0; 2002/1/23 11

12 (GenericCPU GenericCPU.cpp ) BCA void GenericCPU::load( int addr, int &data ) set_a(addr); wait(); low_cs(); wait(); low_oe(); UTF void GenericCPU::load( int addr, int &data ) data = MP[addr]; // while(true) wait(); if( READY.read() == LOGIC_1 ) data = get_d(); // break; wait(); high_oe(); high_cs(); wait(); hiz_a(); 2002/1/23 12

13 (GenericCPU GenericCPU.cpp ) BCA void GenericCPU::store( int addr, int data ) set_d(data); // set_a(addr); UTF void GenericCPU::store( int addr, int data ) MP[addr] = data; // wait(); low_cs(); wait(); low_we(); while(true) wait(); if( READY.read() == LOGIC_1 ) high_we(); break; wait(); hiz_d(); high_cs(); wait(); hiz_a(); 2002/1/23 13

14 IO GenericCPU / IO GenericCPU load store (mem) 2002/1/23 14

15 (BCA BCA IO. IO.hpp) #include "systemc.h" SC_MODULE(IO) ; private : static const int MEM_SIZE = 1024; int memory[mem_size]; void clock_posedge( void ); public : sc_in_clk CLK; sc_in<bool> nrst; sc_in_rv<32> A; sc_inout_rv<32> D; sc_in<bool> ncs; sc_in<bool> noe; sc_in<bool> nwe; sc_out<bool> READY; SC_CTOR(IO) SC_CTHREAD(clock_posedge, CLK.pos()); watching(nrst.delayed() == false); void IO::clock_posedge( void ) if( nrst.read() == false ) /* Reset */ READY = false; D = "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"; while(true) wait_until( ncs.delayed() == false); wait(); /* Clock */ if( noe.read() == false ) /* Read */ sc_uint<32> sig_a; sig_a = A.read(); D.write(memory[sig_a]); wait(); /* Clock */ if( nwe.read() == false ) /* Write */ sc_uint<32> sig_a, sig_d; sig_a = A.read(); sig_d = D.read(); memory[sig_a] = sig_d; READY.write(true); do wait(); /* Clock */ READY.write(false); while ( ncs.read() == false ); D.write("ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"); 2002/1/23 15

16 (UTF UTF IO. IO.hpp) #include "systemc.h" #include sc_mslib.h // sc_inoutslave void IO::io_access( void ) int addr = SP.get_address(); SC_MODULE(IO) private: static const int MEM_SIZE = 1024; int memory[mem_size]; void io_access( void ); if( SP.input() ) memory[addr] = SP; else SP = memory[addr]; // Write // Read public: // sc_inoutslave<int, sc_indexed<int,1024> > SP; ; SC_CTOR(IO) SC_SLAVE(io_access, SP); 2002/1/23 16

17 (sc_main sc_main) sc_main GenericCPU cpu("genericcpu", file, dump); IO IO io("io"); GenericCPU IO sc_signal<bool> nrst; nrst CLK sc_clock CLK("CLK", 20, SC_NS, 0.5, 0.0, SC_NS, true); 2002/1/23 17

18 (BCA BCA main. main.cpp) #include "systemc.h" #include "GenericCPU.hpp" #include "IO.hpp" int sc_main(int argc, char *argv[]) sc_signal<bool> nrst; sc_signal<bool> READY; sc_signal_rv<32> A; sc_signal_rv<32> D; sc_signal<bool> ncs; sc_signal<bool> noe; sc_signal<bool> nwe; // sc_clock CLK("CLK", 20, SC_NS, 0.5, 0.0, SC_NS, true); // GenericCPU GenericCPU cpu.clk(clk); cpu.nrst(nrst); cpu.a(a); cpu.d(d); cpu.ncs(ncs); cpu.noe(noe); cpu.nwe(nwe); cpu.ready(ready); cpu("genericcpu", file, dump); // IO IO io("io"); io.clk(clk); io.nrst(nrst); io.a(a); io.d(d); io.ncs(ncs); io.noe(noe); io.nwe(nwe); io.ready(ready); // nrst = false; sc_start(40, SC_NS); nrst = true; sc_start(-1); return 0; /* this is necessary */ 2002/1/23 18

19 (UTF UTF main. main.cpp) #include "systemc.h" // IO #include "GenericCPU.hpp" #include "IO.hpp" int sc_main(int argc, char *argv[]) sc_signal<bool> nrst; sc_link_mp<int> PORT; IO io("io"); // io.sp(port); // sc_clock CLK("CLK", 20, SC_NS, 0.5, 0.0, SC_NS, true); // GenericCPU GenericCPU cpu.clk(clk); cpu.nrst(nrst); cpu.mp(port); cpu("genericcpu", file, dump); // nrst = false; sc_start(40, SC_NS); nrst = true; sc_start(-1); return 0; /* this is necessary */ 2002/1/23 19

20 (VCD ) WaveViewer GtkWave(Unix) GtkWave(Win32) Dinotrace Campus/3216/GTKWave/gtkwave-win32.html Viewer sc_trace_file *trace_file = sc_create_vcd_trace_file("genericcpu"); sc_trace(trace_file, CLK, "CLK"); sc_trace(trace_file, nrst, "nrst"); 2002/1/23 20

21 Behavior/Interface/Channel GenericCPU IO Core (Behavior) I/F Channel I/F Core (Function) Inheritance( ) GenericCPU Core Interface 2002/1/23 21

22 SystemC 2.0 (PC/Linux Sun/Solaris PC/Windows ) C++ ( ) Behavior/Interface/Channel SystemC 2.0 (Bug ) ( ) ( ) ( )! PC/Windows C /1/23 22

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

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

EDSF2006_ PDF

EDSF2006_ PDF /SystemC SystemC FPFA 1 Techno Repo LSI / 2 Techno Repo 3 Techno Repo 4 Techno Repo DesignPrototyper 5 Techno Repo 6 Techno Repo 7 Techno Repo 8 Techno Repo 9 Techno Repo C/C++ C/C++/SystemC IP (Verilog-HDL/

More information

SCV in User Forum Japan 2003

SCV in User Forum Japan 2003 Open SystemC Initiative (OSCI) SystemC - The SystemC Verification Standard (SCV) - Stuart Swan & Cadence Design Systems, Inc. Q0 Q1 Q2 Q3 Q4 Q5 2 SystemC Q0 Q1 Q2 Q3 Q4 Q5 3 Verification Working Group

More information

untitled

untitled 13 Verilog HDL 16 CPU CPU IP 16 1023 2 reg[ msb: lsb] [ ]; reg [15:0] MEM [0:1023]; //16 1024 16 1 16 2 FF 1 address 8 64 `resetall `timescale 1ns/10ps module mem8(address, readdata,writedata, write, read);

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

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

- - http://168iroha.net 018 10 14 i 1 1 1.1.................................................... 1 1.................................................... 7.1................................................

More information

K227 Java 2

K227 Java 2 1 K227 Java 2 3 4 5 6 Java 7 class Sample1 { public static void main (String args[]) { System.out.println( Java! ); } } 8 > javac Sample1.java 9 10 > java Sample1 Java 11 12 13 http://java.sun.com/j2se/1.5.0/ja/download.html

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

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

Condition DAQ condition condition 2 3 XML key value

Condition DAQ condition condition 2 3 XML key value Condition DAQ condition 2009 6 10 2009 7 2 2009 7 3 2010 8 3 1 2 2 condition 2 3 XML key value 3 4 4 4.1............................. 5 4.2...................... 5 5 6 6 Makefile 7 7 9 7.1 Condition.h.............................

More information

programmingII2019-v01

programmingII2019-v01 II 2019 2Q A 6/11 6/18 6/25 7/2 7/9 7/16 7/23 B 6/12 6/19 6/24 7/3 7/10 7/17 7/24 x = 0 dv(t) dt = g Z t2 t 1 dv(t) dt dt = Z t2 t 1 gdt g v(t 2 ) = v(t 1 ) + g(t 2 t 1 ) v v(t) x g(t 2 t 1 ) t 1 t 2

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

新版明解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

解きながら学ぶC++入門編

解きながら学ぶC++入門編 !... 38!=... 35 "... 112 " "... 311 " "... 4, 264 #... 371 #define... 126, 371 #endif... 369 #if... 369 #ifndef... 369 #include... 3, 311 #undef... 371 %... 17, 18 %=... 85 &... 222 &... 203 &&... 40 &=...

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

thesis.dvi

thesis.dvi H8 e041220 2009 2 Copyright c 2009 by Kentarou Nagashima c 2009 Kentarou Nagashima All rights reserved , H8.,,,..,.,., AKI-H8/3052LAN. OS. OS H8 Write Turbo. H8 C, Cygwin.,., windows. UDP., (TA7279P).,.

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

fp.gby

fp.gby 1 1 2 2 3 2 4 5 6 7 8 9 10 11 Haskell 12 13 Haskell 14 15 ( ) 16 ) 30 17 static 18 (IORef) 19 20 OK NG 21 Haskell (+) :: Num a => a -> a -> a sort :: Ord a => [a] -> [a] delete :: Eq a => a -> [a] -> [a]

More information

Design at a higher level

Design at a higher level Meropa FAST 97 98 10 HLS, Mapping, Timing, HDL, GUI, Chip design Cadence, Synopsys, Sente, Triquest Ericsson, LSI Logic 1980 RTL RTL gates Applicability of design methodologies given constant size of

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

ex01.dvi

ex01.dvi ,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) double

More information

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D II 8 2003 11 12 1 6 ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 Daisuke 8 =>. 73 Daisuke 35 Hiroshi 64 Ichiro 87 Junko

More information

mbed_library_study_meeting_v1.0.key

mbed_library_study_meeting_v1.0.key mbed _mbed 2014 11 7 https://atnd.org/events/57766 version 1.0, 07-Nov.-2014 Tedd OKANO mbed - - 4.0 (^^; 1 mbed TEDD OKANO https://twitter.com/tedd_okano 10 I 2 C http://developer.mbed.org/users/okano/

More information

コーディング基準.PDF

コーディング基準.PDF Java Java Java Java.java.class 1 private public package import / //////////////////////////////////////////////////////////////////////////////// // // // // ////////////////////////////////////////////////////////////////////////////////

More information

cpp1.dvi

cpp1.dvi 2017 c 1 C++ (1) C C++, C++, C 11, 12 13 (1) 14 (2) 11 1 n C++ //, [List 11] 1: #include // C 2: 3: int main(void) { 4: std::cout

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

アルゴリズムとデータ構造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

double float

double float 2015 3 13 1 2 2 3 2.1.......................... 3 2.2............................. 3 3 4 3.1............................... 4 3.2 double float......................... 5 3.3 main.......................

More information

r08.dvi

r08.dvi 19 8 ( ) 019.4.0 1 1.1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( ) 1 next 1 prev 1 head cur tail head cur prev

More information

PowerPoint Presentation

PowerPoint Presentation UML 2004 7 9 10 ... OOP UML 10 Copyright 2004 Akira HIRASAWA all rights reserved. 2 1. 2. 3. 4. UML 5. Copyright 2004 Akira HIRASAWA all rights reserved. 3 1..... Copyright 2004 Akira HIRASAWA all rights

More information

ohp03.dvi

ohp03.dvi 19 3 ( ) 2019.4.20 CS 1 (comand line arguments) Unix./a.out aa bbb ccc ( ) C main void int main(int argc, char *argv[]) {... 2 (2) argc argv argc ( ) argv (C char ) ( 1) argc 4 argv NULL. / a. o u t \0

More information

ohp08.dvi

ohp08.dvi 19 8 ( ) 2019.4.20 1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: 2 (2) NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( 2) 3 (3) head cur tail head cur prev data

More information

untitled

untitled II 4 Yacc Lex 2005 : 0 1 Yacc 20 Lex 1 20 traverse 1 %% 2 [0-9]+ { yylval.val = atoi((char*)yytext); return NUM; 3 "+" { return + ; 4 "*" { return * ; 5 "-" { return - ; 6 "/" { return / ; 7 [ \t] { /*

More information

ALG ppt

ALG ppt 2012614 (sakai.keiichi@kochi-tech.ac.jp) http://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/2012/index.html 1 2 2 3 29 20 32 14 24 30 48 7 19 21 31 4 N O(log N) 29 O(N) 20 32 14 24 30 48 7 19 21 31 5

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

r03.dvi

r03.dvi 19 ( ) 019.4.0 CS 1 (comand line arguments) Unix./a.out aa bbb ccc ( ) C main void... argc argv argc ( ) argv (C char ) ( 1) argc 4 argv NULL. / a. o u t \0 a a \0 b b b \0 c c c \0 1: // argdemo1.c ---

More information

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value = Part2-1-3 Java (*) (*).class Java public static final 1 class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value

More information

Java Java Java Java Java 4 p * *** ***** *** * Unix p a,b,c,d 100,200,250,500 a*b = a*b+c = a*b+c*d = (a+b)*(c+d) = 225

Java Java Java Java Java 4 p * *** ***** *** * Unix p a,b,c,d 100,200,250,500 a*b = a*b+c = a*b+c*d = (a+b)*(c+d) = 225 Java Java Java Java Java 4 p35 4-2 * *** ***** *** * Unix p36 4-3 a,b,c,d 100,200,250,500 a*b = 20000 a*b+c = 20250 a*b+c*d = 145000 (a+b)*(c+d) = 225000 a+b*c+d = 50600 b/a+d/c = 4 p38 4-4 (1) mul = 1

More information

SystemC 2.1 新機能と TLM 動向 2006 年 1 月 27 日 JEITA EDA 技術専門委員会標準化小委員会 SystemC タスクグループ Copyright JEITA, All rights reserved 1

SystemC 2.1 新機能と TLM 動向 2006 年 1 月 27 日 JEITA EDA 技術専門委員会標準化小委員会 SystemC タスクグループ Copyright JEITA, All rights reserved 1 SystemC 2.1 新機能と TLM 動向 2006 年 1 月 27 日 JEITA EDA 技術専門委員会標準化小委員会 SystemC タスクグループ Copyright 2005-2006 JEITA, All rights reserved 1 目次 はじめに SystemC タスクグループとは SystemC 2.1 SystemC 2.1 の新機能 将来サポートされない SystemC

More information

Copyright c 2008 Zhenjiang Hu, All Right Reserved.

Copyright c 2008 Zhenjiang Hu, All Right Reserved. 2008 10 27 Copyright c 2008 Zhenjiang Hu, All Right Reserved. (Bool) True False data Bool = False True Remark: not :: Bool Bool not False = True not True = False (Pattern matching) (Rewriting rules) not

More information

Verilog HDL による回路設計記述

Verilog HDL による回路設計記述 Verilog HDL 3 2019 4 1 / 24 ( ) (RTL) (HDL) RTL HDL アルゴリズム 動作合成 論理合成 論理回路 配置 配線 ハードウェア記述言語 シミュレーション レイアウト 2 / 24 HDL VHDL: IEEE Std 1076-1987 Ada IEEE Std 1164-1991 Verilog HDL: 1984 IEEE Std 1364-1995

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

226

226 226 227 Main ClientThread Request Channel WorkerThread Channel startworkers takerequest requestqueue threadpool WorkerThread channel run Request tostring execute name number ClientThread channel random

More information

Java updated

Java updated Java 2003.07.14 updated 3 1 Java 5 1.1 Java................................. 5 1.2 Java..................................... 5 1.3 Java................................ 6 1.3.1 Java.......................

More information

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV tutimura@mist.i.u-tokyo.ac.jp kaneko@ipl.t.u-tokyo.ac.jp http://www.misojiro.t.u-tokyo.ac.jp/ tutimura/sem3/ 2002 12 11 p.1/33 10/16 1. 10/23 2. 10/30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20

More information

ex01.dvi

ex01.dvi ,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) { double

More information

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value = Part2-1-3 Java (*) (*).class Java public static final 1 class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value

More information

joho07-1.ppt

joho07-1.ppt 0xbffffc5c 0xbffffc60 xxxxxxxx xxxxxxxx 00001010 00000000 00000000 00000000 01100011 00000000 00000000 00000000 xxxxxxxx x y 2 func1 func2 double func1(double y) { y = y + 5.0; return y; } double func2(double*

More information

卒 業 研 究 報 告.PDF

卒 業 研 究 報 告.PDF C 13 2 9 1 1-1. 1-2. 2 2-1. 2-2. 2-3. 2-4. 3 3-1. 3-2. 3-3. 3-4. 3-5. 3-5-1. 3-5-2. 3-6. 3-6-1. 3-6-2. 4 5 6 7-1 - 1 1 1-1. 1-2. ++ Lisp Pascal Java Purl HTML Windows - 2-2 2 2-1. 1972 D.M. (Dennis M Ritchie)

More information

OpenCV IS Report No Report Medical Information System Labratry

OpenCV IS Report No Report Medical Information System Labratry OpenCV 2014 8 25 IS Report No. 2014090201 Report Medical Information System Labratry Abstract OpenCV OpenCV 1............................ 2 1.1 OpenCV.......................... 2 1.2......................

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó  ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡ (2018) 2018 5 17 0 0 if switch if if ( ) if ( 0) if ( ) if ( 0) if ( ) (0) if ( 0) if ( ) (0) ( ) ; if else if ( ) 1 else 2 if else ( 0) 1 if ( ) 1 else 2 if else ( 0) 1 if ( ) 1 else 2 (0) 2 if else

More information

ALG ppt

ALG ppt 2012 6 21 (sakai.keiichi@kochi-tech.ac.jp) http://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/2012/index.html 1 l l O(1) l l l 2 (123 ) l l l l () l H(k) = k mod n (k:, n: ) l l 3 4 public class MyHashtable

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 2 2 2-1 2 2-2 4 2-3 11 2-4 12 2-5 14 3 16 3-1 16 3-2 18 3-3 22 4 35 4-1 VHDL 35 4-2 VHDL 37 4-3 VHDL 37 4-3-1 37 4-3-2 42 i

1 1 2 2 2-1 2 2-2 4 2-3 11 2-4 12 2-5 14 3 16 3-1 16 3-2 18 3-3 22 4 35 4-1 VHDL 35 4-2 VHDL 37 4-3 VHDL 37 4-3-1 37 4-3-2 42 i 1030195 15 2 10 1 1 2 2 2-1 2 2-2 4 2-3 11 2-4 12 2-5 14 3 16 3-1 16 3-2 18 3-3 22 4 35 4-1 VHDL 35 4-2 VHDL 37 4-3 VHDL 37 4-3-1 37 4-3-2 42 i 4-3-3 47 5 52 53 54 55 ii 1 VHDL IC VHDL 5 2 3 IC 4 5 1 2

More information

XMPによる並列化実装2

XMPによる並列化実装2 2 3 C Fortran Exercise 1 Exercise 2 Serial init.c init.f90 XMP xmp_init.c xmp_init.f90 Serial laplace.c laplace.f90 XMP xmp_laplace.c xmp_laplace.f90 #include int a[10]; program init integer

More information

untitled

untitled 2011 6 20 (sakai.keiichi@kochi-tech.ac.jp) http://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/2011/index.html tech.ac.jp/k1sakai/lecture/alg/2011/index.html html 1 O(1) O(1) 2 (123) () H(k) = k mod n

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

スライド 1

スライド 1 1 1. 2 2. 3 isplever 4 5 6 7 8 9 VHDL 10 VHDL 4 Decode cnt = "1010" High Low DOUT CLK 25MHz 50MHz clk_inst Cnt[3:0] RST 2 4 1010 11 library ieee; library xp; use xp.components.all; use ieee.std_logic_1164.all;

More information

double 2 std::cin, std::cout 1.2 C fopen() fclose() C++ std::fstream 1-3 #include <fstream> std::fstream fout; int a = 123; fout.open( "data.t

double 2 std::cin, std::cout 1.2 C fopen() fclose() C++ std::fstream 1-3 #include <fstream> std::fstream fout; int a = 123; fout.open( data.t C++ 1 C C++ C++ C C C++ 1.1 C printf() scanf() C++ C 1-1 #include int a; scanf( "%d", &a ); printf( "a = %d\n", a ); C++ 1-2 int a; std::cin >> a; std::cout

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

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

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

untitled

untitled Verilog HDL Verilog HDL VerilogHDL veriloghdl / CPLD , 1bit 2 MUX 5 D,E) always) module MUX(out, a, b, sel); output out; input a, b, sel; A) IF module MUX(out, a, b, sel); output out; input a, b, sel;

More information

untitled

untitled ET2008 CQ DSP Blackfin CPU Blackfin 2 E!Kit-BF533 \ \ 3 4 5 CPU 1 PinNo. E!Kit-BF533 BLANCA CQBB100B PinNo. E!Kit-BF533 BLANCA CQBB100B 1 GND GND GND 61 GND GND GND 2 CPU_SOUT CPU_SOUT TXD2 62 CPU_SIN

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学習教材

Java学習教材 Java 2016/4/17 Java 1 Java1 : 280 : (2010/1/29) ISBN-10: 4798120987 ISBN-13: 978-4798120980 2010/1/29 1 Java 1 Java Java Java class FirstExample { public static void main(string[] args) { System.out.println("

More information

For_Beginners_CAPL.indd

For_Beginners_CAPL.indd CAPL Vector Japan Co., Ltd. 目次 1 CAPL 03 2 CAPL 03 3 CAPL 03 4 CAPL 04 4.1 CAPL 4.2 CAPL 4.3 07 5 CAPL 08 5.1 CANoe 5.2 CANalyzer 6 CAPL 10 7 CAPL 11 7.1 CAPL 7.2 CAPL 7.3 CAPL 7.4 CAPL 16 7.5 18 8 CAPL

More information

基礎計算機演習 実習課題No6

基礎計算機演習 実習課題No6 実習課題 No.6 課題は 3 題ある. 課題 6-1 時間内提出 次の実行例のように, 名簿を出力するプログラムをつくりたい. このプログラムでは, まず人数をたずね, 次にその人数分の名前を入力し, それを再びコンソールに出力する. なお, 空の名前が入力されても終了せずにその欄は空欄で出力するものとする. 注意とヒント この課題では,string 型の配列をまず宣言する. このとき, 配列の要素はちょうど名簿に入力する人数分だけを宣言すること

More information

とても使いやすい Boost の serialization

とても使いやすい Boost の serialization とても使いやすい Boost の serialization Zegrahm シリアライズ ( 直列化 ) シリアライズ ( 直列化 ) とは何か? オブジェクトデータをバイト列や XML フォーマットに変換すること もう少しわかりやすく表現すると オブジェクトの状態を表す変数 ( フィールド ) とオブジェクトの種類を表す何らかの識別子をファイル化出来るようなバイト列 XML フォーマット形式で書き出す事を言う

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

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

1-4 int a; std::cin >> a; std::cout << "a = " << a << std::endl; C++( 1-4 ) stdio.h iostream iostream.h C++ include.h 1-4 scanf() std::cin >>

1-4 int a; std::cin >> a; std::cout << a =  << a << std::endl; C++( 1-4 ) stdio.h iostream iostream.h C++ include.h 1-4 scanf() std::cin >> 1 C++ 1.1 C C++ C++ C C C++ 1.1.1 C printf() scanf() C++ C hello world printf() 1-1 #include printf( "hello world\n" ); C++ 1-2 std::cout

More information

.,. 0. (MSB). =2, =1/2.,. MSB LSB, LSB MSB. MSB 0 LSB 0 0 P

.,. 0. (MSB). =2, =1/2.,. MSB LSB, LSB MSB. MSB 0 LSB 0 0 P , 0 (MSB) =2, =1/2, MSB LSB, LSB MSB MSB 0 LSB 0 0 P61 231 1 (100, 100 3 ) 2 10 0 1 1 0 0 1 0 0 100 (64+32+4) 2 10 100 2 5, ( ), & 3 (hardware), (software) (firmware), hardware, software 4 wired logic

More information

CM-3G 周辺モジュール拡張技術文書 MS5607センサ(温度、気圧)

CM-3G 周辺モジュール拡張技術文書 MS5607センサ(温度、気圧) CM-3G 周辺モジュール拡張技術文書 MS5607 センサ ( 温度 気圧 ) ( 第 1 版 ) Copyright (C)2016 株式会社コンピューテックス 目次 1. はじめに... 1 2. MS5607 について... 1 3. 接続図... 1 4. アプリケーション ソース... 2 5. アプリケーションのコンパイル方法... 7 6. アプリケーションの実行... 8 1. はじめに

More information

slide5.pptx

slide5.pptx ソフトウェア工学入門 第 5 回コマンド作成 1 head コマンド作成 1 早速ですが 次のプログラムを head.c という名前で作成してください #include #include static void do_head(file *f, long nlines); int main(int argc, char *argv[]) { if (argc!=

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

解きながら学ぶJava入門編

解きながら学ぶJava入門編 44 // class Negative { System.out.print(""); int n = stdin.nextint(); if (n < 0) System.out.println(""); -10 Ÿ 35 Ÿ 0 n if statement if ( ) if i f ( ) if n < 0 < true false true false boolean literalboolean

More information

untitled

untitled JCSP CSP HPC H.Nakahara 1 2 CSP A B HPC H.Nakahara 3 CSP HPC H.Nakahara 4 CSP Process A chan Process B ( DFD) HPC H.Nakahara 5 DFD HPC H.Nakahara 6 DFD FAX OK? HPC H.Nakahara 7 HPC H.Nakahara 8 HPC H.Nakahara

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

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

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

Java プログラミング Ⅰ 3 回目変 数 今日の講義講義で学ぶ内容 変数とは 変数の使い方 キーボード入力の仕方 変 数 変 数 一時的に値を記憶させておく機能 変数は 型 ( データ型 ) と識別子をもちます 2 型 ( データ型 ) 変数に記憶する値の種類変数の型は 記憶できる値の種類と範囲

Java プログラミング Ⅰ 3 回目変 数 今日の講義講義で学ぶ内容 変数とは 変数の使い方 キーボード入力の仕方 変 数 変 数 一時的に値を記憶させておく機能 変数は 型 ( データ型 ) と識別子をもちます 2 型 ( データ型 ) 変数に記憶する値の種類変数の型は 記憶できる値の種類と範囲 Java プログラミング Ⅰ 3 回目変 数 今日の講義講義で学ぶ内容 変数とは 変数の使い方 キーボード入力の仕方 変 数 変 数 一時的に値を記憶させておく機能 変数は 型 ( データ型 ) と識別子をもちます 2 型 ( データ型 ) 変数に記憶する値の種類変数の型は 記憶できる値の種類と範囲を決定します 次の型が利用でき これらの型は特に基本型とよばれます 基本型 値の種類 値の範囲 boolean

More information

(Eclipse\202\305\212w\202\324Java2\215\374.pdf)

(Eclipse\202\305\212w\202\324Java2\215\374.pdf) C H A P T E R 11 11-1 1 Sample9_4 package sample.sample11; public class Sample9_4 { 2 public static void main(string[] args) { int[] points = new int[30]; initializearray(points); double averagepoint =

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

10/8 Finder,, 1 1. Finder MAC OS X 2. ( ) MAC OS X Java ( ) 3. MAC OS X Java ( ) / 10

10/8 Finder,, 1 1. Finder MAC OS X 2. ( ) MAC OS X Java ( ) 3. MAC OS X Java ( ) / 10 10/8 2015-10-08 URL : http://webct.kyushu-u.ac.jp, 10/8 1 / 10 10/8 Finder,, 1 1. Finder MAC OS X 2. ( ) MAC OS X Java ( ) 3. MAC OS X Java ( ) 1. 30 2 / 10 10/8 Finder 1 Figure : : Apple.com 2, 3 / 10

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

haskell.gby

haskell.gby Haskell 1 2 3 Haskell ( ) 4 Haskell Lisper 5 Haskell = Haskell 6 Haskell Haskell... 7 qsort [8,2,5,1] [1,2,5,8] "Hello, " ++ "world!" "Hello, world!" 1 + 2 div 8 2 (+) 1 2 8 div 2 3 4 map even [1,2,3,4]

More information

6 p.1 6 Java GUI GUI paintcomponent GUI mouseclicked, keypressed, actionperformed mouseclicked paintcomponent thread, 1 GUI 6.0.2, mutlithread C

6 p.1 6 Java GUI GUI paintcomponent GUI mouseclicked, keypressed, actionperformed mouseclicked paintcomponent thread, 1 GUI 6.0.2, mutlithread C 6 p.1 6 Java GUI GUI paintcomponent GUI mouseclicked, keypressed, actionperformed mouseclicked paintcomponent 6.0.1 thread, 1 GUI 6.0.2, mutlithread CPU 1 CPU CPU +----+ +----+ +----+ Java 1 CPU 6 p.2

More information

55 7 Java C Java TCP/IP TCP/IP TCP TCP_RO.java import java.net.*; import java.io.*; public class TCP_RO { public static void main(string[] a

55 7 Java C Java TCP/IP TCP/IP TCP TCP_RO.java import java.net.*; import java.io.*; public class TCP_RO { public static void main(string[] a 55 7 Java C Java TCP/IP TCP/IP 7.1 7.1.1 TCP TCP_RO.java import java.net.*; import java.io.*; public class TCP_RO { public static void main(string[] argv) { Socket readsocket = new Socket(argv[0], Integer.parseInt(argv[1]));

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

II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y

II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C 1 6 9 1 main main 1 NULL NULL 1 15 23 25 48 26 30 32 36 38 43 45 47 50 52 for 2 (a) 2 2 1 Yacc 2 (b) 2 3 yytext tmp2 ("") tmp2->next->word tmp2 yytext tmp2->next->word

More information

ohp11.dvi

ohp11.dvi 19 11 ( ) 2019.4.20 1 / ( ) n O(n 2 ) O(n 2 ) ( ) 1 d n 1 n logn O(nlogn) n ( n logn C ) 2 ( ) ( merge) 2 1 1 3 1 4 5 4 2 3 7 9 7 1 2 3 4 5 7 9 1: 2 ivec merge 3 ( ) (2) int *ivec_new(int size) { int *a

More information

r11.dvi

r11.dvi 19 11 ( ) 2019.4.20 1 / 1.1 ( n n O(n 2 O(n 2 ) ( 1 d n 1 n logn O(nlogn n ( n logn C 1.2 ( ( merge 2 1 1 3 1 4 5 4 2 3 7 9 7 1 2 3 4 5 7 9 1: 2 ivec merge int *ivec_new(int size) { int *a = (int*)malloc((size+1)

More information

Microsoft Word - keisankigairon.ch doc

Microsoft Word - keisankigairon.ch doc 1000000100001010 1000001000001011 0100001100010010 1010001100001100 load %r1,10 load %r2,11 add %r3,%r1,%r2 store %r3,12 k = i + j ; = > (* 1 2 3 4 5 6 7 8 9 10) 3628800 DO 3 I=1,3 DO3I=1.3 DO3I 1.3

More information

lexex.dvi

lexex.dvi (2018, c ) http://istksckwanseiacjp/ ishiura/cpl/ 4 41 1 mini-c lexc,, 2 testlexc, lexc mini-c 1 ( ) mini-c ( ) (int, char, if, else, while, return 6 ) ( ) (+, -, *, /, %, &, =, ==,!=, >, >=,

More information

Java プログラミング Ⅰ 7 回目 switch 文と論理演算子 今日の講義講義で学ぶ内容 switch 文 論理演算子 条件演算子 条件判断文 3 switch 文 switch 文 式が case のラベルと一致する場所から直後の break; まで処理しますどれにも一致致しない場合 def

Java プログラミング Ⅰ 7 回目 switch 文と論理演算子 今日の講義講義で学ぶ内容 switch 文 論理演算子 条件演算子 条件判断文 3 switch 文 switch 文 式が case のラベルと一致する場所から直後の break; まで処理しますどれにも一致致しない場合 def Java プログラミング Ⅰ 7 回目 switch 文と論理演算子 今日の講義講義で学ぶ内容 switch 文 論理演算子 条件演算子 条件判断文 3 switch 文 switch 文 式が case のラベルと一致する場所から直後の まで処理しますどれにも一致致しない場合 default: から直後の まで処理します 式の結果 ラベル 定数 整数または文字 (byte, short, int,

More information

1.3 ( ) ( ) C

1.3 ( ) ( ) C 1 1.1 (Data Base) (Container) C++ Java 1.2 1 1.3 ( ) ( ) 1. 2. 3. C++ 2 2.1 2.2 2.3 2 C Fortran C++ Java 3 3.1 (Vector) 1. 2. ( ) 3.2 3 3.3 C++ C++ STL C++ (Template) vector vector< > ; int arrayint vector

More information

Java (9) 1 Lesson Java System.out.println() 1 Java API 1 Java Java 1

Java (9) 1 Lesson Java System.out.println() 1 Java API 1 Java Java 1 Java (9) 1 Lesson 7 2008-05-20 Java System.out.println() 1 Java API 1 Java Java 1 GUI 2 Java 3 1.1 5 3 1.0 10.0, 1.0, 0.5 5.0, 3.0, 0.3 4.0, 1.0, 0.6 1 2 4 3, ( 2 3 2 1.2 Java (stream) 4 1 a 5 (End of

More information