You are on page 1of 51

FPGA

2014 John Wiley & Sons, Inc. , , .

FPGA For Dummies,

John Wiley & Sons, Inc.


111 River St.
Hoboken, NJ 07030-5774
www.wiley.com
Copyright 2014 by John Wiley & Sons, Inc., Hoboken, New Jersey
1976 107 108
, , , , ,
. John Wiley & Sons, Inc., 111 River Street, Hoboken,
NJ 07030, (201) 748-6011, (201) 748-6008 ( http://www.wiley.com/go/permissions)
.
: Wiley, For Dummies, Dummies Man , The Dummies Way, Dummies.com, Making Everything
Easier John Wiley & Sons, Inc. /
. Altera Altera Altera
Corporation . . John Wiley &
Sons, Inc. .
/ :

. .
. ,
.
. .
/
.

.
For Dummies
(877-409-4177) info@dummies.biz
www.wiley.com/go/custompub . For Dummies
BrandedRights&Licenses@Wiley.com .
ISBN 978-1-119-06594-4 (pbk); ISBN 978-1-119-06582-1 (ebk)

10 9 8 7 6 5 4 3 2 1


.
: (Jennifer Bingham)
: (Katie Mohr)
: (Rev Mengle)
: (Karen Hattan)
: (Melissa Cossell)
: Altera Corporation

2014 John Wiley & Sons, Inc. , , .


. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
........................................................................ 1
............................................................ 1
..................................................................................... 2

1: FPGA . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
FPGA ? .............................................................. 4
FPGA ............................................................................ 6
FPGA ............................................................. 6
FPGA ............................................ 8
FPGA ASIC ..................................................................... 10
................................................................ 10
.......................................... 10
FPGA ........................................ 11
IP ............................................................................. 11
................................................... 12

2: FPGA ? . . . . . . . . . . . . . . . . .13
I/O ................................. 13
............................................................................ 16
IP CPU .................................................................. 17
FPGA ............................................................ 17
........................................ 18
IP ................................................ 20
............................................................ 21
............................................................. 22
FPGA ................................... 23
.................................................. 23

3: FPGA . . . . . . . . . . . . . . . . . . . .25
FPGA ............................................................. 25
FPGA ........................................ 27
......................................................................... 28
.................................................................. 28
..................................................................... 29
FPGA ................................................................ 29

2014 John Wiley & Sons, Inc. , , .

iv

FPGA For Dummies,

4: : OpenCL . . . . . . . . . . . . . . . . .31
................................................................................ 31
FPGA OpenCL ? ..................................... 32

5: FPGA . . . . . . . . . . . . . . . . .35
.................................................................. 35
TV ...................................................................................... 37
: 3G GPP LTE ....................................... 37
...................................................... 39
............................................................................ 40

2014 John Wiley & Sons, Inc. , , .

PGA (Field Programmable Gate Array)



. FPGA 1980

. FPGA
FPGA
, . FPGA
FPGA .
FPGA
,
(IC) .
, ,
. FPGA
.


,
FPGA .
Altera Corporation .


,
.

! .

2014 John Wiley & Sons, Inc. , , .

FPGA For Dummies,


,
.

?
.
, !

.


48
. FPGA
www.altera.com . Altera FPGA
.
, , ,
!

2014 John Wiley & Sons, Inc. , , .

FPGA

FPGA
FPGA
FPGA ASIC

! FPGA (Field
Programmable Gate Array)
.

. FPGA
.
FPGA .
FPGA
. , ASSP
(Application Specific Standard Product) ASIC
(Application Specific Integrated Circuit) ,
,
.
, FPGA
ASSP
FPGA , ,
.

2014 John Wiley & Sons, Inc. , , .

FPGA For Dummies,

FPGA ?
! FPGA
. FPGA
, ,
.
.
2 .

.
, FPGA
,
.
.

250 ,
100
, FPGA

.
.
FPGA
.
FPGA
. FPGA
,
( ,

). , FPGA
,
ASIC
.

,
.

2014 John Wiley & Sons, Inc. , , .

1: FPGA

FPGA SRAM (Static Random Access Memory


), (I/O),
. FPGA LE
, LE
.
AND OR LE
. FPGA .
( FPGA
.)
IP
FPGA .
FPGA IP , ,

ASIC ASSP
ASIC (Application Specific Integrated
Circuit) ,

,


. ASIC

.
IC

.

.
ASIC


.
ASSP(Application Specific Standard
Product)
ASIC
,


( ) IC.
ASSP


.
ASIC ASSP
.
ASIC ASSP
,
.

.


.

,
.

,
.

2014 John Wiley & Sons, Inc. , , .

FPGA For Dummies,


, (CPU)
. IP
FPGA ! ,
DSP(Digital Signal Processor) IP

.
,
, FPGA
IP FPGA .

FPGA
FPGA
FPGA
FPGA .

FPGA
,
( 1-1 ).

.
.

Altera Corporation

1-1: .


. ,
0 1
.

2014 John Wiley & Sons, Inc. , , .

1: FPGA


. CPU

.

. 1854 (George Boole)
. ,
,
AND, OR NOT.
.
.
And () x AND y , x y
.
Or () x OR y , x y
, x y .
Not () NOT x , x ,
x .

. 0 1
. 0 1

. ,
,
(GPS) ,
(bad piggies) (birds) !


.
.
.
,
.
.

2014 John Wiley & Sons, Inc. , , .

FPGA For Dummies,


. 1 + 2 ,
LED TV

, .

.

FPGA
! ,

. FPGA
? ! FPGA
.
. .

?

.




. .
.

.
ASIC ASSP
.

.
,

.

, .
2014 John Wiley & Sons, Inc. , , .

1: FPGA


.
AND, OR NOT
,

,
.
,

?
!
, .

.
. ,
?

.
.

.
.

,
. FPGA.
, ,
. ,
, ,
,
.

.
,
.

.

2014 John Wiley & Sons, Inc. , , .

10

FPGA For Dummies,

FPGA ASIC
FPGA ASIC .
.


FPGA ASIC
,
, . FPGA
ASIC
, FPGA
ASIC .



FPGA ASIC
.
.
, . ASSP
.
1, 2 3 .
FPGA ASIC
. FPGA .
,
65nm() ASIC ,
20nm FPGA
?
FPGA ,
, ASIC (TCO) .
FPGA
. TCO FPGA
.
(nm) .
. 2
.

2014 John Wiley & Sons, Inc. , , .

1: FPGA

11

, FPGA
FPGA
,
.


FPGA
FPGA

.
FPGA .
FPGA .
FPGA , DRAM(Dynamic Random
Access Memory) , PCI Express(Peripheral Component
Interconnect)

,
.

IP
IP DRAM , PCI ,
FPGA
. FPGA SoC(System on
a Chip) IP .
FPGA IP
,
DSP(Digital Signal Processor)
.
ARM(ARM ) CPU
. FPGA
IP
. IP FPGA
, FPGA
.

2014 John Wiley & Sons, Inc. , , .

12

FPGA For Dummies,



( ),
,
.
?

. ,
, , ,
, .
. 2
?
,
. FPGA

, ,
.
FPGA .
.

. FPGA
( )
,
() FPGA
. 128 128
,
.
ASIC ASSP !

2014 John Wiley & Sons, Inc. , , .

FPGA
?

I/O

IP CPU

FPGA
. FPGA ,

.
.
FPGA ,
, .

-
I/O
FPGA(Field Programmable Gate Array)
, FPGA I/O()
. I/O

.
1 ,
.
2014 John Wiley & Sons, Inc. , , .

14

FPGA For Dummies,



. (IC) .
.
(GaN) (GaAS)
. /
, ( )
3 . 2
()
. 2
.
.

.
.
( ).
.
. ()

.
.


1947

(John Bardeen),
(Walter Brattain)
(William Shockley)
.


.


.
,
-


YouTube

.
,


(John R. Pierce)


.


!

2014 John Wiley & Sons, Inc. , , .

2: FPGA ?

15

1 0
. 0 1
.

, AND, OR NOT

( 1 ).
FPGA
.
1 FPGA
.
FPGA ( FPGA
)
.


1965 4 19
Electronics Magazine

(Cramming More Components onto
Integrated Circuits)
.
2
(
)

. 1970



.
50
!

,

18-24 30%

.

. ,





.



.

2014 John Wiley & Sons, Inc. , , .

16

FPGA For Dummies,



FPGA .

.




.

,
( )
. 30%
,
. ,
.

.
?

! (FinFET)

.
(nonplanar) FET(Field-Effect Transistor).

(fin) .
?
20 .
.


.
, .

!

2014 John Wiley & Sons, Inc. , , .

2: FPGA ?

17

.

, , 3D

.
FPGA .

IP CPU
FPGA
ASIC
. FPGA
,
FPGA
.
FPGA
ASIC
. ASIC ,

.
ASIC FPGA . FPGA
, FPGA
.

FPGA
FPGA
(reference design)
. .

, .

!

2014 John Wiley & Sons, Inc. , , .

18

FPGA For Dummies,


? 2-1
.

Altera Corporation

2-1: .

.
, .
.
.
.
2-1 (flow) .

. ,

.
. 2-2
2-1
.

Altera Corporation

2-2:
.


.
,
.

2014 John Wiley & Sons, Inc. , , .

2: FPGA ?

19

,
.

.
( , , )
.


.
, .

,
.

. ,

. (
, iOS)
.
.

.
2-3
.

Altera Corporation

2-3: .

2014 John Wiley & Sons, Inc. , , .

20

FPGA For Dummies,

IP

.
FPGA
.
I/O,
,
.
.
FPGA (IP)
. IP
, ,
(FPGA )
.
IP . 2-4 IP
.

Altera Corporation

2-4: IP

IP
.
. 2-4
IP .

.

2014 John Wiley & Sons, Inc. , , .

2: FPGA ?

21

()



(Grace Hopper)
. 1947,


IP (
, GPS ). FPGA

.
. ?
FPGA . FPGA

, (HDL) ,
, ( ),
, FPGA . FPGA

.

.
.

.

.
Verilog FPGA HDL. Verilog
C
. Verilog, VHDL

, FPGA (,
) .

2014 John Wiley & Sons, Inc. , , .

22

FPGA For Dummies,


Verilog
.
HDL HDL
. FPGA HDL
HDL ,
. , FPGA
, , FPGA
.
HDL FPGA
.

. ,
.
IP(FPGA
) .
IP
. IP
HDL .


FPGA .

.
FPGA
.
FPGA
.
. FPGA

.
HDL
. FPGA

. FPGA
( )

2014 John Wiley & Sons, Inc. , , .

2: FPGA ?

23

. FPGA

.
.

.


.

FPGA . .

FPGA
,
FPGA .

. HDL
,
, FPGA
.



. FPGA ?
.
.
. ,
.
.
.
.
. ( )
. FPGA
.

2014 John Wiley & Sons, Inc. , , .

24

FPGA For Dummies,


FPGA , IP
, FPGA
.
. , ,
,
.
.
FPGA , ,
.
. ASIC
!

2014 John Wiley & Sons, Inc. , , .

FPGA

FPGA
SoC FPGA

FPGA
. FPGA ,
FPGA FPGA
SoC(System on a Chip) .
.
SoC .

FPGA
FPGA
. (2
.)
3-1 .

.

Altera Corporation

3-1: .

2014 John Wiley & Sons, Inc. , , .

26

FPGA For Dummies,



.
?
.

.
?

.
?
.

.
FPGA .
?

() . ,
IP

.
? ,
.
,
.
3-2 ,
.

.
.
.

2014 John Wiley & Sons, Inc. , , .

3: FPGA

27

Altera Corporation

3-2: .

FPGA .

. ,
. ,

.
.
,
.
, IP
,
.

FPGA

.
.
SoC( FPGA )
.

2014 John Wiley & Sons, Inc. , , .

28

FPGA For Dummies,


, ,

.
: , , ,
, .
: , (RPM)
,
.
: -
.
: ,
.
:
-
-
.


.
.
:
.
: AM/FM ,
, CD
.

!
:
,
.

2014 John Wiley & Sons, Inc. , , .

3: FPGA

29

: , ,
.

.
:
,
.



.
! .
, , :

,
.
, :

.

FPGA

.
.

. .


, streoscopic vision (
2
)
. (
)
,
. ,
.

2014 John Wiley & Sons, Inc. , , .

30

FPGA For Dummies,


Soc
.
Soc /DSP
. , ,

SoC FPGA ,
.

,
SoC
.
,
.
.

2014 John Wiley & Sons, Inc. , , .

:
OpenCL


OpenCL

FPGA
. OpenCL(Open
Computing Language) FPGA
.

.


CPU
.

. CPU
(GPU) 3D
. GPU 3D
.
CPU
.

.

2014 John Wiley & Sons, Inc. , , .

32

FPGA For Dummies,



()
. , ,
.
IBM (Big Blue)
.
,

.

.


.

.

FPGA OpenCL
?

.
OpenCL. OpenCL CPU, GPU, DSP, FPGA

. OpenCL (
)
(API)
. OpenCL
.
10
(power wall)
. CPU

? CPU
CPU ,

2014 John Wiley & Sons, Inc. , , .

4: : OpenCL

33

,
.

.

(pseudoparallelism) .
FPGA OpenCL
. FPGA

-(push-pull) (spawn)

. C
OpenCL
. FPGA HDL
FPGA .
OpenCL
FPGA .
: C
, HDL
. OpenCL

.
: OpenCL
FPGA
.
: .
FPGA
.
: FPGA ,
OpenCL 1/5
.
: OpenCL FPGA, CPU, GPU DSP

.

2014 John Wiley & Sons, Inc. , , .

34

FPGA For Dummies,


:
.
. OpenCL
,
FPGA
.
OpenCL (Khronos Group)
.
FPGA FPGA OpenCL
(SDK) .

2014 John Wiley & Sons, Inc. , , .

FPGA


FPGA

PGA FPGA

. FPGA ,
ARM .

ARM SOC FPGA .
.
FPGA
.


.

.
.
, (DTC)
(SFOC)
. DSP
,
FPGA . SoC FPGA
( 5-1 ).

2014 John Wiley & Sons, Inc. , , .

36

FPGA For Dummies,


QMD0EDT

JHCUJ0G

J0G

JQ

Altera Corporation .

5-1: .

SoC FPGA 2
DC
. SoC FPGA 2

.

. SoC FPGA
IP
. SoC FPGA
.
: , ,
DSP
,
.
:
. SoC FPGA

.
:
,
. SoC
FPGA
.

2014 John Wiley & Sons, Inc. , , .

5: FPGA

37

TV
TV (SDI) 75
(/
TV ).
.
3 Gbps(3G)-SDI , 4K
ultraHD .
FPGA
! FPGA SDI (SD
SDI, HD SDI 3G-SDI)
.
.
,
,
. H.265 HEVC(HighEfficiency Video CoDec) , TV
.
.
SoC - -
FPGA . 5-2
.

Altera Corporation

5-2: .

: 3G GPP LTE

3G
.

2014 John Wiley & Sons, Inc. , , .

38

FPGA For Dummies,


! 3G
(HSPA) 3 (3GPP)
(LTE) 3.5G .
3GPP LTE 3G

. LTE

, ,
, .

(time-to-differentiate) .
FPGA LTE (IP)
, FPGA , ,
LTE

. 5-3 .

Altera Corporation

5-3: LTE.

2014 John Wiley & Sons, Inc. , , .

5: FPGA

39



. ,
.

.

.

,
,
.
.
,
.
DSP
.

HDR(High Dynamic Range)
. HDR HDR 3
, DSP
. DSP
SoC FPGA .
FPGA SoC
FPGA
.
5-4 SoC FPGA
.

2014 John Wiley & Sons, Inc. , , .

40

FPGA For Dummies,

Altera Corporation

5-4: FPGA.


(HPC)
. FPGA
,
, , .
, ,
.

.
HPC
.
. 1
,
.
.

2014 John Wiley & Sons, Inc. , , .

5: FPGA

41

(FFT)


(FIR)

(3D )

(CPU)
.
, , ,
I/O . CPU

.
HPC ,
, FPGA 100
.
FPGA DSP
, FPGA

.
.
: .
: ,
FFT.
: SRC CARTE, AutoESL
.

2014 John Wiley & Sons, Inc. , , .

42

FPGA For Dummies,

:




.


(
) .



.

.

.

(
)
.
(
)

.


.
FPGA CPU
GPU 300

Altera Corporation






.



.

,

OpenCL
. FPGA
,
CPU GPU
.
FPGA ,


CPU GPU
. FPGA
. ,

2014 John Wiley & Sons, Inc. , , .

5: FPGA

43

Altera Corporation

. FPGA
CPU GPU
,

2014 John Wiley & Sons, Inc. , , .

44

FPGA For Dummies,

2014 John Wiley & Sons, Inc. , , .