31
超入門 ===特定顧客向研修資料抜粋=== 今岡工学事務所 今岡 通博

Introduction of FPGA

Embed Size (px)

Citation preview

Page 1: Introduction of FPGA

超入門

===特定顧客向 研修資料 抜粋===

今岡工学事務所

今岡 通博

Page 2: Introduction of FPGA

【プロフィール】 愛媛県松山市在住。今岡工学事務所代表。主に組込系のハード及びソフトの開発。最近はFPGAを用いたカスタムチップの開発を請負う。本業のかたわら、技術評論社のソフトウエアデザイン及び電波新聞社の電子工作マガジン、日経Linux等に寄稿。その他各種オンライメディアに記事を提供。今まで日本Androidの会のイベントや雑誌を通してAndroidデバイスで動作する音声認識ロボット「ドロンくん」や放射線自動観測BOT「Imaocande」などを発表。

@[email protected]

Page 3: Introduction of FPGA

Agenda

FPGA Overview

FPGA Design Flow

HDL(Hardware Definiton Language)

IP(intelligent property)

FPGA Design environment

Demonstrations (altera CPLD MAX II)

Page 4: Introduction of FPGA

独⾃仕様の集積回路を作るには     従来はASICで対応

特定用途 独自回路

ASIC(application specific integrated circuit)特定 用途向 複数機能 回路 1 集積回路 総称

発注

Page 5: Introduction of FPGA
Page 6: Introduction of FPGA

⼩ロットまたは試作機を作るには     FPGAだと

特定用途 独自回路

FPGA(field-programmable gate array)

製造後 購入者 設計者 構成 設定 集積回路 広義 PLD 一種 現場 可能 呼

評価

Page 7: Introduction of FPGA

ASSP ASIC FPGA 比較

CPU+SW

開発 低 同一 回路 比較 低速 逐次処理

ASSP(Application Specific Standard Product)

Page 8: Introduction of FPGA
Page 9: Introduction of FPGA

FPGA design flow

Page 10: Introduction of FPGA

Schematic Entry

HDL(Hardware Definiton Language)

-VHDL -VerilogHDL

FPGA Design Entry

Page 11: Introduction of FPGA

Schematic Entry

Page 12: Introduction of FPGA

VHDL

VHDL[1] 回路設計用 記述言語 一種 EDA分野 標準 一 主 論理回路 設計 特 FPGA ASIC 設計 使 規格 存在 IEEE 1076-2008

http://ja.wikipedia.org/wiki/VHDL

Page 13: Introduction of FPGA

Verilog

http://ja.wikipedia.org/wiki/Verilog#Verilog_2005

Page 14: Introduction of FPGA

Verilog-HDL Code example

module add(input A,B,Cin,output S,Cout );assign t = A^B;assign S = t^Cin;assign Cout = (t&Cin)|(A&B);

endmodule

Page 15: Introduction of FPGA

add0A0B0

S0

add1A1B1

S1

add2A2B2

S2

add3A3B3

S3

Cout

Cout

Cout

module add4(input A0,A1,A2,A3,B0,B1,B2,B4, output S0,S1,S2,S3,C3);add add0(A0,B0,0,S0,C0);add add1(A1,B1,C0,S1,C1);add add2(A2,A2,C1,S2,C2);add add3(A3,A3,C2,S3,C3);

endmodule

4bit full adder

module add(input A,B,Cin,output S,Cout );assign t = A^B;assign S = t^Cin;assign Cout = (t&Cin)|(A&B);

endmodule

module add4(input [3:0]A,input [3:0]B,output[4:0]S);

assign S = A+B;endmodule

Page 16: Introduction of FPGA

FPGA vs CPLDFPGA CPLD

規模 中 大規模 小 中規模

記憶 揮発 不揮発

消費電力 多 少

速度 高速 中速

用途 処理系CPU Ethernet Cntroller 内包可能

小規模 制御系

Page 17: Introduction of FPGA

グレープフルーツの起電⼒でLCDを駆動!!ザイリンクス、超低消費電⼒を実現したCPLDのデモを実施

http://ascii.jp/elem/000/000/308/308293/

(株) 2000年1月24日 発表 CPLD(Complex Programmable Logic Device)“CoolRunner” XPLA3(eXtended Programmable Logic Array) 説明会 実施

Page 18: Introduction of FPGA

Ulrich Radig have developed simple CPLD VGA graphics board which is able to generate 256×256 64 color graphics on standard 640×480 with 60 Hz monitor. He used a CPLD XC9572PC84 from Xilink which is clocked with 32mHz crystal.

http://www.embedds.com/cpld-8-bit-vga-graphics/

CPLD Examples byEmbedded projects from around the web

Page 19: Introduction of FPGA

http://www.64hdd.com/projects/hardware/c64-cpld.html

Commodore™ C64 Projects

Page 20: Introduction of FPGA

1 MSX1chipMSX(ワンチップ エムエスエックス)とは、MSX2規格をFPGA(Field Programmable Gate Array)上で再現したハードウェアエミュレータである。出荷時の設定ではMSX2相当の回路になっており、MSXパソコンのように使える。

Page 21: Introduction of FPGA

http://www.youtube.com/watch?v=Gx-QNfjYg5Q

FPGAだからこそ実を結んだムーブメント【事例】1チップMSXは実は世界の⼼をつかんでいた

Page 22: Introduction of FPGA

Maker movement

Page 23: Introduction of FPGA

IP(intelligent property)

・開発効率化のため機能単位にライブラリー化されるようになる。1990年代以降、LSIの開発⼿法としてハードウェア記述⾔語による開発が盛んになり、開発効率の向上が求められた。 そこで、既存開発製品の回路を、機能ブロック単位で再利⽤可能な形にまとめ、他の製品でも利⽤可な部分はそれを流⽤する⽅法が⽤いられた。

・このライブラリーが再販されるビジネスモデルが構築される。この再利⽤可能な機能ブロックは、その開発者だけでなく、他の開発者や他の会社との間でもやり取りが⾏われるようになり、 新しいビジネスモデルが発達した。 IPコアベンダは、LSIを開発するためのIPコアを提供し、LSI開発側はIPコアベンダに使⽤料を⽀払う契約を結ぶのが⼀般的である。

IPコア(あいぴーコア、英: intellectual property core)とは、LSIを構成するための部分的な回路情報で、特に機能単位でまとめられているものを指す。単にIPと呼ぶ場合もある。ASIC開発やプログラマブルロジックデバイスを⽤いた開発の際に利⽤する。

Page 24: Introduction of FPGA

FPGA Venderが提供する標準IP

デジタル回路 CPU(ソフトプロセッサ)、DSP CPU周辺回路 (タイマー、DMA、割り込み制御、他) メモリ (フラッシュメモリ、SRAM、DRAM、他) 通信I/F (UART、SPI、I²C、USB、イーサネット、ATM、JTAG、他) バスI/F (PCI、PCI Express、AHB、ハードディスクドライブ I/F、メモリカードI/F、他)

基本算術演算 (浮動⼩数点演算、FFT、他)

暗号化/復号 (AES、DES、RSA、RC5、SHA1、MD5、SSL、他)

画像処理 (静⽌画CODEC(JPEG、他)、動画CODEC (MPEG)、画像認識、他)

⾳声処理 (⾳声CODEC(MP3、AAC、μ-law、A-law)、⾳声合成、他)

Page 25: Introduction of FPGA

Altera Quartus II MegaWizard Plug-In Manager

Page 26: Introduction of FPGA

http://www.altera.co.jp/products/ip/ipm-index.html

Page 27: Introduction of FPGA

1 IBM and others - PowerPC 123322 Sun Microsystems and others - OpenSPARC 44413 Xilinx 8504 ARM 7405 Rambus 4036 TSMC 3997 Altera 3898 Cadence Design Systems 3319 On2 Technologies 28610 MIPS Technologies - MIPS 220

http://top-topics.thefullwiki.org/Top_semiconductor_IP_core_vendors:_All

Top semiconductor IP core vendors: All Rank Topic Wikipedia views Oct 21 2010

Page 28: Introduction of FPGA

FPGA Design Environment

Design Tool Altera Quartus2 Web Editionhttps://www.altera.com/download/software/quartus-ii-we/ja

ProgrammerUSB Blasterhttp://www.hdl.co.jp/ACC/TB1/index.html

Page 29: Introduction of FPGA

Demonstrations (altera CPLD MAX II)

http://optimize.ath.cx/max2/index.html

module rc_counter(output OUT1,output OUT2);reg [19:0] counter;assign OUT1 = counter[19];assign OUT2 = osc;assign oscen=1;rc_osc rc_osc(oscen,osc); // use IP corealways @(posedge osc) counter[19:0] = counter[19:0]

+ 1;endmodule

Page 30: Introduction of FPGA

Supplementation

Debug or SimulationHow to use logic Analyzer

Verilog porgramming Consept of State machine

TrendXilinx Zynq

Altera Arria V SoC FPGA, Cyclone V SoC FPGA

Page 31: Introduction of FPGA

Thank you.

Do you have any questions?