EDSF2006_ PDF

Similar documents
EDSF2008.ppt

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

SystemC言語概論

SCV in User Forum Japan 2003

Informatics 2014

x h = (b a)/n [x i, x i+1 ] = [a+i h, a+ (i + 1) h] A(x i ) A(x i ) = h 2 {f(x i) + f(x i+1 ) = h {f(a + i h) + f(a + (i + 1) h), (2) 2 a b n A(x i )

Informatics 2015

Verilog HDL による回路設計記述

£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² –

Informatics 2010.key

PLDとFPGA

strtok-count.eps

Unconventional HDL Programming ( version) 1

For_Beginners_CAPL.indd

d-00

VLD Kazutoshi Kobayashi

Design at a higher level

x(t) + t f(t, x) = x(t) + x (t) t x t Tayler x(t + t) = x(t) + x (t) t + 1 2! x (t) t ! x (t) t 3 + (15) Eular x t Teyler 1 Eular 2 Runge-Kutta

Microsoft Word - C.....u.K...doc

tutorial_lc.dvi

非圧縮の1080p60ビデオをサポートする3Gbps SDIコネクティビティ・ソリューション

「FPGAを用いたプロセッサ検証システムの製作」

MINI2440マニュアル

VHDL VHDL VHDL i

デザインパフォーマンス向上のためのHDLコーディング法


/* 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

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

untitled

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

スライド 1

, FPGA Verilog-HDL

2008 DS T050049

Kazutoshi Kobayashi (kobayasi kit.ac.jp)

double float

(Version: 2017/4/18) Intel CPU 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU do


VHDL

C

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

1 (bit ) ( ) PC WS CPU IEEE754 standard ( 24bit) ( 53bit)

1 1 TA, ,9 1. ( 2. TM TM GUI TM 1. P7-13 TM Notepad, Meadow, ( P109 ). 2. (shisaku01/sys test)

2 1 Web Java Android Java 1.2 6) Java Java 7) 6) Java Java (Swing, JavaFX) (JDBC) 7) OS 1.3 Java Java

新コンフィギュレータのフレームワークについて


RX600 & RX200シリーズ RX用シンプルフラッシュAPI アプリケーションノート

組込みシステムシンポジウム2011 Embedded Systems Symposium 2011 ESS /10/20 FPGA Android Android Java FPGA Java FPGA Dalvik VM Intel Atom FPGA PCI Express DM

if clear = 1 then Q <= " "; elsif we = 1 then Q <= D; end rtl; regs.vhdl clk 0 1 rst clear we Write Enable we 1 we 0 if clk 1 Q if rst =

A Responsive Processor for Parallel/Distributed Real-time Processing

ATLAS 2011/3/25-26

Smalltalk_

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

COINS 5 2.1

Linux XScreenSaver T020074

starc_verilog_hdl pptx

1, Verilog-HDL, Verilog-HDL Verilog-HDL,, FPGA,, HDL, 11, 1 (a) (b) (c) FPGA (d) 2 10,, Verilog-HDL, FPGA, 12,,,, html % netscape file://home/users11/

Makefile, TCPソケットサーバ, コマンドライン引数

Nios II 簡易チュートリアル

ex01.dvi

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

I 2 tutimura/ I 2 p.1/??

(4) P θ P 3 P O O = θ OP = a n P n OP n = a n {a n } a = θ, a n = a n (n ) {a n } θ a n = ( ) n θ P n O = a a + a 3 + ( ) n a n a a + a 3 + ( ) n a n

VM-53PA1取扱説明書

Armadillo-9 ソフトウェアマニュアル

Microsoft PowerPoint - FPGA

Linuxデバイスドライバ.PDF

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

4 4 4 a b c d a b A c d A a da ad bce O E O n A n O ad bc a d n A n O 5 {a n } S n a k n a n + k S n a a n+ S n n S n n log x x {xy } x, y x + y 7 fx

2009 T

HyRAL®FPGA設計仕様書

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

untitled

(300, 150) 120 getchar() HgBox(x, y, w, h) (x, y), w, h #include <stdio.h> #include <handy.h> int main(void) { int i; double w, h; } HgO

untitled


ex01.dvi

[ 1] 1 Hello World!! 1 #include <s t d i o. h> 2 3 int main ( ) { 4 5 p r i n t f ( H e l l o World!! \ n ) ; 6 7 return 0 ; 8 } 1:

.1 A cos 2π 3 sin 2π 3 sin 2π 3 cos 2π 3 T ra 2 deta T ra 2 deta T ra 2 deta a + d 2 ad bc a 2 + d 2 + ad + bc A 3 a b a 2 + bc ba + d c d ca + d bc +

r3.dvi

応用数学特論.dvi

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

p q p q p q p q p q p q p q p q p q x y p q t u r s p q p p q p q p q p p p q q p p p q P Q [] p, q P Q [] P Q P Q [ p q] P Q Q P [ q p] p q imply / m

HD pManual

PowerPoint プレゼンテーション

SICE東北支部研究集会資料(2009年)

Stratix IIIデバイスの外部メモリ・インタフェース

Java updated

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

OpenMP (1) 1, 12 1 UNIX (FUJITSU GP7000F model 900), 13 1 (COMPAQ GS320) FUJITSU VPP5000/64 1 (a) (b) 1: ( 1(a))

Condition DAQ condition condition 2 3 XML key value

oaks32r_m32102

橡松下発表資料.PDF

記号と準備

untitled

さくらの個別指導 ( さくら教育研究所 ) A 2 P Q 3 R S T R S T P Q ( ) ( ) m n m n m n n n

FPGA と LUPO その1

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


Taro13-第6章(まとめ).PDF

Transcription:

/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/ SystemC) DesignPrototyper IP (Verilog-HDL/ SystemC), SystemC TM 1 2 C/C++ 3 4 HDL OSCI SystemC Reference Simulator /Verilator ( Verilog SystemC ) 5 6 Xilinx ISE 10 Techno Repo

FPGA Xilinx ML403 Virtex4 11 Techno Repo

12 Techno Repo

OS / GNU Linux (Vine Linux 2.6/3.2,Redhat Linux 7.x) C++ GNU GCC (3.2.3 / 2.3.2 / 3.4.4 ) SystemC OSCI SystemC Referense Simulator Version 2.0.1 Verilog to C++ Verilator 3.470 http://www.veripool.com/verilator.html EGGX/ ProCALL version 0.80 (Easy and Gratifying Graphics library for X11) http://phe.phyas.aichi-edu.ac.jp/~cyamauch/eggx_procall/ DesignPrototyper Version 3.5.2 / Xilinx ISE WebPack 8.1i 13 Techno Repo

Verilog HDL to C++ Translator Verilator Verilog HDL Verilog HDL C++/SystemC Wilson Snyder, Paul Wasson and Duane Galbi GPL http://www.veripool.com/verilator.html 14 Techno Repo

C 15 Techno Repo

y : (x,y) (x,y ) x x = x cos( ) - y sin( ) y = x sin( ) + y cos( ) x = x cos( ) + y sin( ) y = -x sin( ) + y cos( ) C,, 166 2005 03 28 16 Techno Repo

( ) void rotate( int angle, unsigned int w, unsigned int h ) { int px[4], py[4] ; int qx[4], qy[4] ; int k ; int p_x, p_y, q_x, q_y ; // min_qx = select_min( qx ) ; max_qx = select_max( qx ) ; min_qy = select_min( qy ) ; max_qy = select_max( qy ) ; printf( "min_q=[%d,%d] max_q=[%d,%d] n", min_qx, max_qx, min_qy, max_qy ) ; int min_qx, min_qy ; int max_qx, max_qy ; unsigned short rgb_data ; px[0] = 0 ; py[0] = 0 ; px[1] = w ; py[1] = 0 ; px[2] = w ; py[2] = h ; px[3] = 0 ; py[3] = h ; // for ( k = 0 ; k <= 3 ; k++ ) { rotate_axis( angle, px[k], py[k], &qx[k], &qy[k] ) ; } // for ( q_y = min_qy ; q_y < max_qy ; q_y++ ) { for ( q_x = min_qx ; q_x < max_qx ; q_x++ ) { rotate_axis( -angle, q_x, q_y, &p_x, &p_y ) ; if ( ( p_x >= 0 ) && ( p_x < w ) && ( p_y >= 0 ) && ( p_y < h )) { rgb_data = get_rgb15( FROM, p_x, p_y ) ; put_rgb15( 0, q_x+400, q_y+300, rgb_data ) ; } } } 17 Techno Repo

( ) char gl_c ; // ida signal reg : 7 char gl_s ; // ida signal reg : 7 short int gl_x ; // ida signal reg : 10 short int gl_y ; // ida signal reg : 10 short int gl_xc ; // ida signal reg : 16 short int gl_ys ; // ida signal reg : 16 short int gl_xs ; // ida signal reg : 16 short int gl_yc ; // ida signal reg : 16 void Rotation::rotate_axis( short int angle, short int px, short int py, short int *qx, short int *qy ) { // double th ; // th = angle * M_PI / 180.0 ; // *qx = (double)px * cos(th) - (double)py * sin(th) ; // *qy = (double)px * sin(th) + (double)py * cos(th) ; gl_x = px ; gl_y = py ; gl_c = my_cos(angle) ; gl_s = my_sin(angle) ; // *qx = ( gl_x * gl_c - gl_y * gl_s ) / 64 ; // *qy = ( gl_x * gl_s + gl_y * gl_c ) / 64 ; gl_xc = gl_x * gl_c ; gl_ys = gl_y * gl_s ; gl_xs = gl_x * gl_s ; gl_yc = gl_y * gl_c ; *qx = ( gl_xc - gl_ys ) / 64 ; *qy = ( gl_xs + gl_yc ) / 64 ; } 18 Techno Repo

tiff2txt.c: tiff glib.c: % gcc rotate_main.c rotate.c tiff2txt.c glib.c -lm -L/usr/local/lib -leggx -ltiff -L/usr/X11R6/lib -lx11 -I/usr/X11R6/include %./a.out kamo.tif 30 19 Techno Repo

x y 20 Techno Repo

SystemC 21 Techno Repo

SystemC SystemC,C++ 22 Techno Repo

IO sc_channel BCA IO 23 Techno Repo

/ / C++ ANSI-C IO C/C++ (short int,char, ) SystemC (sc_int,sc_uint,...) (, ) 24 Techno Repo

25 Techno Repo SC_MODULE Rotation

IO (16bit ) void Rotation::vram_read16( unsigned int ad, unsigned short int *rdata ) { unsigned int sram_ad ; unsigned int sram_rdata ; sram_ad = ad >> 1 ; if ( ( ad & 1 ) == 0 ) *rdata = sram_rdata & 0x0000ffff ; else *rdata = sram_rdata >> 16 ; } { // ida cycle_fixed rotation_req.write( true ) ; wait_until( rotation_ack.delayed() == true ) ; rotation_req.write( false ) ; rotation_ad.write( sram_ad ) ; rotation_we.write( false ) ; rotation_cs.write( true ) ; rotation_be.write( 0 ) ; wait() ; rotation_cs.write( false ) ; wait_until( rotation_en_rdata.delayed() == true ) ; sram_rdata = rotation_rdata.read() ; } 26 Techno Repo

IO (16bit ) void Rotation::vram_write16( unsigned int ad, unsigned short int wdata ) { sc_uint<4> var_be ; unsigned int sram_ad ; unsigned int sram_wdata ; sram_ad = ad >> 1 ; if ( ( ad & 1 ) == 0 ) { var_be = 0x03 ; // 4'b0011 sram_wdata = wdata ; } else { var_be = 0x0c ; // 4'b1100 sram_wdata = wdata << 16 ; } { // ida cycle_fixed rotation_req.write( true ) ; wait_until( rotation_ack.delayed() == true ) ; rotation_req.write( false ) ; } rotation_ad.write( sram_ad ) ; rotation_we.write( true ) ; rotation_cs.write( true ) ; rotation_be.write( var_be ) ; rotation_wdata.write( sram_wdata ) ; wait() ; rotation_we.write( false ) ; rotation_cs.write( false ) ; rotation_be.write( 0 ) ; wait() ; } 27 Techno Repo

SC_THREAD rotation_process() void Rotation::rotation_process() { int angle ; unsigned int count ; rotation_req.write( false ) ; rotation_ad.write( 0 ) ; rotation_we.write( false ) ; rotation_be.write( 0 ) ; rotation_cs.write( false ) ; rotation_wdata.write( 0 ) ; rotation_pos_led.write( 0 ) ; rotation_led.write( 0 ) ; angle = 0 ; count = 0 ; image_size_x = 320 ; image_size_y = 200 ; while ( 1 ) { wait() ; wait_until( rotation_start.delayed() == true ) ; wait_until( rotation_start.delayed() == false ) ; rotate( angle, image_size_x, image_size_y ) ; angle += 10 ; if ( angle >= 360 ) { angle -= 360 ; } rotation_led.write( count ) ; count++ ; } } wait() ; 28 Techno Repo

rotate void Rotation::rotate( int angle, int w, int h ) { short int px[4], py[4] ; short int qx[4], qy[4] ; unsigned int k ; short int p_x, p_y, q_x, q_y ; int min_qx, min_qy ; int max_qx, max_qy ; unsigned short rgb_data ; px[0] = 0 ; py[0] = 0 ; px[1] = w ; py[1] = 0 ; px[2] = w ; py[2] = h ; px[3] = 0 ; py[3] = h ; // for ( k = 0 ; k <= 3 ; k++ ) { rotate_axis( angle, px[k], py[k], &qx[k], &qy[k] ) ; } // min_qx = select_min( qx ) ; max_qx = select_max( qx ) ; min_qy = select_min( qy ) ; max_qy = select_max( qy ) ; #ifndef IDA_SYNTH printf( "min_q=[%d,%d] max_q=[%d,%d] n", min_qx, max_qx, min_qy, max_qy ) ; #endif // for ( q_y = min_qy ; q_y < max_qy ; q_y++ ) { for ( q_x = min_qx ; q_x < max_qx ; q_x++ ) { rotate_axis( -angle, q_x, q_y, &p_x, &p_y ) ; if ( ( p_x >= 0 ) && ( p_x < w ) && ( p_y >= 0 ) && ( p_y < h )) { rgb_data = get_rgb15( p_x, p_y ) ; put_rgb15( q_x+400, q_y+300, rgb_data ) ; } } } } 29 Techno Repo

IO 30 Techno Repo

Rotation DesignPrototyper RTL Virtex4 10 100MHz (10ns) % cd./gousei % sc2v.csh -I../src/ROTATION -nomap -clock 10 -target virtex4-10 -o Rotation.v -in../src/rotation/rotation.cpp 31 Techno Repo

Rotation (BCA ) sc_main Rotation_top Rotation.cpp arbiter.cpp SramifMonitor.cpp 32 Techno Repo

Rotation (BCA ) Makefile./Rotation_BCA/Makefile SRC =../src SC_SOURCE = $(SRC)/model/Rotation_main.cpp $(SRC)/model/Rotation_top.cpp $(SRC)/ROTATION/Rotation.cpp $(SRC)/DUT/arbiter.v $(SRC)/model/SramifMonitor.cpp $(SRC)/ROTATION/tiff2txt.c $(SRC)/ROTATION/glib.c run.x:: Makefile.sc make -f Make file.sc Makefile.sc: $(SC_SOURCE) gen_sc_make.awk $(SC_SOURCE) > Makefile.sc list: echo $(Main_SOURCE) include../common/makefile.defs 33 Techno Repo

Rotation (BCA ) SystemC Makefile, % cd Rotation_BCA % make Make file.sc % make run.x %./run.x 34 Techno Repo

RTL sc_main Rotation_top Rotation.cpp vrotation.cpp arbiter.cpp varbiter.cpp SramifMonitor.cpp 35 Techno Repo

Rotation (RTL ) Makefile./Rotation_RTL/Makefile SRC =../src SC_SOURCE = $(SRC)/model/Rotation_main.cpp $(SRC)/model/Rotation_top.cpp../gousei/Rotation.v $(SRC)/DUT/arbiter.v $(SRC)/model/SramifMonitor.cpp $(SRC)/ROTATION/tiff2txt.c $(SRC)/ROTATION/glib.c run.x: Makefile.sc make -f Makefile.sc Makefile.sc: $(SC_SOURCE) gen_sc_make.awk $(SC_SOURCE) > Makefile.sc list: echo $(SC_SOURCE) include../common/makefile.defs 36 Techno Repo

Rotation (RTL ) SystemC Makefile, % cd CG3d_RTL % make Make file.sc % make run.x %./run.x 37 Techno Repo

Verilator Verilog HDL SystemC Verilator Verilog HDL SystemC % verilator.csh --sc Rotation.v a[15:0] b[15:0] to_uint32t<16> to_uint32t<16> Rotation vrotation from_uint32t<18> Verirator SystemC RTL rotation_cs start start rotation_we clk clk reset a b reset rotation_ad rotation_ad[17:0] rotation_we./obj_dir/vrotation.h./obj_dir/vrotation.cpp./obj_dir/rotation.h./obj_dir/rotation.cpp Velirator SystemC 2bit 32bit uint32_t bit Rotation,SystemC 38 Techno Repo

Verilator SystemC Verilog HDL Verilog HDL SystemC Verilog HDL RTL Task Verilog HDL 39 Techno Repo

ISE / 40 Techno Repo

rotate_axis (sc_module) rotate CPU : px[0] = 0 ; py[0] = 0 ; px[1] = w ; py[1] = 0 ; px[2] = w ; py[2] = h ; px[3] = 0 ; py[3] = h ; for ( k = 0 ; k <= 3 ; k++ ) { rotate_axis( angle, px[k], py[k], &qx[k], &qy[k] ) ; } min_qx = select_min( qx ) ; max_qx = select_max( qx ) ; min_qy = select_min( qy ) ; max_qy = select_max( qy ) ; 41 Techno Repo

: CRT Transaction Level SRAM SRAM CRT FPGA 42 Techno Repo

SystemC/Verilator SystemC/Verilator PLI BCA RTL Verilog HDL 43 Techno Repo

C /SystemC FPGA,MPU,... (SystemC BCA ) 44 Techno Repo

45 Techno Repo

FPGA Xilinx Spartan3 Starter kit. http://www.xilinx.com/ products/spartan3/s3boards.htm 46 Techno Repo

FPGA Spartan-3 Platform FPGA XC3S200-4FT256C 200,000 gate Platform Flash Configuration PROM XCF02S 2Mbit 3-bit, 8-color VGA display port Fast Asynchronous SRAM (512Kx16 or 256Kx32) Spartan-3 Starter Kit Board User Guide Page12. http://www.xilinx.com/bvdocs/userguides/ug130.pdf 50 MHz crystal clock oscillator 47 Techno Repo

48 Techno Repo

CQ Interface C 49 Techno Repo

50 Techno Repo

51 Techno Repo

52 Techno Repo