Sie sind auf Seite 1von 13

  

       


)(Programmable Logic Devices
234 :+,/019 :34  561 234/01>6 2005,2002 :6;< = 0

      
www.kutub.info
 !"#$  *) ( ' &
$./ 1+2 "#- +

E -1
- '  % $ !         


) 
 0 +  *
2) 01 + . 
0 .,-* +
$3   
 - 6  .7$ % $
% $  *-9+$ .   !+ $3    %
? ! * $3 %.9 
+- < = ,<!
B  -* !
)$ - -E * 6 C 6 +) D % $
 ) D - -    - -  $3  C 6
6 % $
6 J -2   F3G-E   F3G-  LE
-2 !-G) (IJK
2 !-G  01 J  * )    .3 I-K*
=  9  = 2 .3
1 D - %  J! -:
1 (1 !-G '3
S$$3 (2 R7
-,- !-G
,7 !-G * )         
) (Amplifiers 01 G+BE -!$ )$ !  %.9_ ^
 * .
, I% 
1_ ^ !-G !  * S
$    .$)C$) (Switch

C3 0 != C  * +
 C$ !-G .$ ) %.9 *  - (Switch   Cf
 (Alarms) S 9  (Control) h 2 f ) 0
 $
 C3 != C  (ON OFF Technique) * +
B $3 -  ) C $ 0
 *- - C3. !=C
) (ON - OFF (0) .= 6 C3.
G 6  C=!
G(1) 1
% G )  .3 ! (1 $ -E *  
$ ) Boolean
(Arithmetic
$ $3  ) 0
 $-:  C

(Boolean Arithmetic)
 $ (1
(And,Or,Not) *( Boolean Arithmetic)  * 7
 $)
7
 $) I%
  $) * 6 ! $ x1
(2 Bit Half Adder) f
Sum = (x AND NOT y) OR (NOT x AND y)
Carry =(x AND y)

G, (  2
( Flip Flop) 
!D
.  0
    $3 $) $
   G,
 $ %.9 $7 ( * Register)
-: (G x1  ) ( !  
(Synchronous) 9G ( 1
(Clocked) G ! } B 0
 +
$ * $) *
(Asynchronous) 9G ? ( 2
(Non-Clocked) G ! } B 0
 +
$ * $)  *
   $3 G (
%.9  * 7 !  +7 ( 1
$3   )  !%.9  $3  !+7 $ x1
(Analog)   !%.9
+1=  *  < 7 !  +7 ( 2
C+7  S  C=! C3.  0
 $)    
1 .=  '* ! 9 + 2 C +1=< E
(Chips) (   Integrated Circuits )   3 E 60- -3
C ,7  *   7 ! $ ! * -G( 
* +
 C=! C3  .$< 7 * *  R7 
(LSI(Large Scale Integration))  B! !9 (   
 Cf <7 - -  ,7 $6    
(AND, OR, NOT)
Integrated ) 
 $  0$7  ='h} *  I% $ 
(Circuit
(IC) 0$7 32
h} C2  ) $ ( * !LSI) B! !9 ) $ +_ J
(Multiplier) ( Adder) ( Decoder) +
f  =' 
(Very Large Scale Integration) (VLSI) B! !9 (B
 )  $ ( !LSI) h}   )f  h} *
( CPU) ( Processor) +
f  1 h} * ! $
(Communicaton Protocol)
(PLD) (Programmable Logic Devices) B! !9 +_ (

* } h    $ + )   


 $ !=C
I%  !! <- !_ * ! +  h 0
 $)  +9
 
$  *  I%+ h
 
$     I%  1 ) !. *  R 
 
2 !B!$ * h
 
$ h I% ) C3 0 !.    !.
2  
3 } 
f ) (ROM) h} (PLD}(PAL) h
}(PLAs) h
.   *7 I%  !  !. *  +61 $
!=  f *  +61 $

_!h
  I%  ! 
3 (PLD) h} * 
2! <-  +61
 9    (PLD ) h}  $ S  1 R
 (1)C   C.- !$  D (PAL) h *
2
 ! *  C! +   ) !- <  (OR, AND
!! !$ <-

 : (1) C(PAL) h} D


(    ' )93$ h )(ASIC
* }   9 ? %.9 h 9 ! -: +9
(1 !9 E } !h  0
 +
2 )    
(2 !9 } * f !h  0
 +
2 1

I%   <? %.9 + h 9J  


$ 93
(    )$ 

)(CPLD
* }  ) f  }) (PLD !h 0
 +
2

!  } ) (PLD*  S 1 0  * ) } )(PAL
* +1} -  } ) (CPLD  +f
(    (FPGA) Field Programmable Gate Arrays
* }   + )  )- $7   B  
  * 1 }) + (CPLD  ! B  
     +
2 } )) $7 (FPGA h 
  +
2 ! +9  +    !
 D
.
)  7 (Flip-Flop  0  !$7$ } * + )(CPLD

 : (2) C(FPGA) h} D

(2) C B( FPGA)  5 XE / -4


! !    
& 
# ! 
#$( FPGA)(

(
LOGIC CELLS)#&'(*
) ! +! , .) ) !
12 
;EF G ( A  $  CD( Flip-Flop)
: ;: ! #) $
 T& #U A* H A ( Family)( Vendor)DHI* J !
(FPGA)

V
T!
#U#H Z #&'( G2
 #$ WX ( E FPGAJ DHI!  
(Logic Element)( Logic Block)#*X]! !` _^
A LUT (Look up Tables)( Logic Cells)#&'( $ f &
#*(
`! $   #U f &
FPGA 
CD (ROMs) mlJ
 J #U! (X W &  A(CAM)( Dual Port Memory)SRAM
 WX )* A: 2#$  ( X# ( HDL)1 A: #! #$
schematic entry 2#( v!l#
(FPGA)T& (  Routing Resources)2
 w #X( f
2

Hx A( FPGA)T& A: 2
 w #X
 !` $   w  #Z!' X( Routing Channels)
Memory, LUT & Logic Cells
B , C=!  pins (
f#( 2
 } T&J A: $   w &* #X
_^ U
(FPGA) J (PINs)
& #Ul  &
W & J CDl: #Ul  #UD&
Z A: G (
 #: _ .$( }& AGP) ( PCI)( CMOS)(TTL)
 #f

H ! Z (! #f

H  w (E (&* FPGA)
(PLL) ( Clock) B , C=!  pins (
(Clock)   
- C=! 3, (FPGA)  ) }
 * h

! +  !$ (FPGA) ( ) }Reset)
(Divider) ( ClockMultiplier) Cf (PLL) ( Clock)
(; 1 () _FPGA)  ]   _-5

(Xilinx Spartan and Virtex Families)


(Altera Apex and Acex Families)
(Actel)
(Lucent Orca Devices)

Xilinx's Virtex Slice(3)C

.
.
.
.

Altera's Apex Logic Element (4) C

(FPGA)  GG13>   6  -6


+9( FPGA)  33,$   1!
)  9
(
Demo) 1! .
(Applications ) 9)  <  2 1! .
-:  1!
I%
G  !$ '3 ( FPGA)  33, 1! .
! !=$( External Headers)
(Interface Chips) 2 R  G  )1! 01 .
(FPGA)  %
(FPGA) 33,$   1!
3 ) *
 $
Xess boards (some of them are suitable for beginners) .
Altera SOPC boards .
http://www.burched.com.au/B5Spartan2.html .

(FPGA) <L_ b F3G- /c -7


!+  <
 33,$  -9+$ C 1      $3
 $ *  $3$ +,7 *   3  !  ) 1!  .
+

h  3 )  $ C   + !
-:* C1$ $3
 $ $

h - '  h


h 
$ $ +
1 '   h  h  I%.9 * ) !<2
 C 6 $+  $3
- $3
I% !<, *    S
). ! <- ! 6 
   %.9 < 9
 0
 $) $9   ! $* f !<,  %9 $  $3 9
 !  $3-: $
 (1  $3E ) 0 - C+ 
* 9 (schematic (+
)Entry
)   - J $ C+  * 9   * !<2 
 + - !$   
 1! 0 !  } 
h.= 0
)   (Sheet !- h  !=
. !- + I% < ? 

 $$3  h * !h 
0 )  !$ 
 (2  $3 )  f   ,- 1 ' (HDL
! !
-E %  ^3 D    ,-  
 ! $1 ' ) VHDL & Verilog Cf (HDL* '
' Cf  ! $ ) (C ) (C++ ) (Pascal ) (Basic G$
 !
)$  I%
'  9$ )B G ,  I%
'
2 ,
$

B - h$ )(Simulation
?  } ) + $ (FPGA1  1 *  !+7 +h7 K<2
 *  1  $$3      S C   <
= C 6 +1   
$  I%+ <  ! $ ! 6 
) 
$) K
 % (FPGA h$  <E  J
}
= +1
C
h - (Synthesis) $3
*  
$ 9- !  *  ! +$$3C!h (HDL) ' <-
!=^ 0  I% !<,  ,7 *  1,- !
- -
C+ 
* 9 schematic Entry
- !$ *  +9  (Place and route) +9 R
I% !<, ,7 
$   $$3$ !$ 1 $FPGA
   h  - 9$ ) !$ *    + <+
!    $3  ,- !96 != C-E  .
2 I% !<, R  % != C , *6  (pins) h
BGB 
 
2 * C=! -  + h

(Bit Stream) !  -
% ( Programming File)  ( 
^ Bit Stream)
 !  $
$3   ^  
 $3  )
! $ C 0
 !h

2  .$ C3 '* 9 ^( FPGA)! B!$ !$
.h  C$)7 %
^ $ ! .(FPGA)

C + )93$   h 0


 $) (Bit Stream)  
^
+ 2   G  h   + h}

C 6  (FPGA)  33, < -  !%.9 , f <! , !_ h



h
)93$ 
;h6 i ( HDL) (Hardware Description Languages ) e9
 j
(FPGA)  }$3 ( *    HDL)   7  $
*( Hardware Design)  +  $3   !$ +  h *
 + h * 
' + } ' <  +  $3 ^=!   7
!- h   '  h S  * ( Human -Like)
 $
' I% ) ) +) R7 +) (HDL) )  ' 9
 )fE 2E(
' AND,OR,NOT) Cf - -
  $ ^3
*
  < - !+ 6   $ < $3 ^ 3  ,7$
 fE
G S
) * ( Loops,Case,If)  ,7  ,7$
$7 +  f$ C ( ) HDL)  ) ' + 0
  (   )S7. $3 0

( VHDL) ( Verilog) +
f
  2 +. _ h
, C2
(AHDL)
% ,  7 ( * VHDL) '
= ,
 fE) B 9$
(Tools) ( c6<3 b) l 9
Simulation: Modelsim, Active-HDL, NC-SIM
Synthesis: Leonardo, Synplify, Synopsys
Place and Route: Altera Quartus, Xilinx Foundation.

R  D h$
<7  9 (FPGA)  9$ ) 
$3 !+  - 9 E I% h < -!$ ' 3 $$3  * . *
 <  7  %.9 0  h *
 01   
<

. 0
  6    ! I%!
(VHDL)  F3G ]  - 10
-

Half adder

LIBRARY ieee;

USE ieee.std_logic_1164.ALL;
ENTITY Adder_ent IS
PORT (
Op1 : IN std_logic;
op2 : IN std_logic;
carry : OUT std_logic;
Result : OUT std_logic);

-- Operand 1
-- Operand 2
-- Output carry
-- Result

END Adder_ent;
ARCHITECTURE behavior OF Adder_ent IS
BEGIN -- behavior
Result <= (Op1 AND NOT Op2) OR (NOT Op1 AND Op2);
Carry <= Op1 AND Op2;
END behavior;

8 bit Adder

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_unsigned.ALL;
ENTITY Adder_ent IS
PORT (
clk : IN std_logic;
-- System clock
rst_n : IN std_logic;
-- System reset
Op1 : IN std_logic_vector(7 DOWNTO 0); -- Operand 1
op2 : IN std_logic_vector(7 DOWNTO 0); -- Operand 2
Result : OUT std_logic_vector(7 DOWNTO 0)); -- Result
END Adder_ent;
ARCHITECTURE behavior OF Adder_ent IS
BEGIN -- behavior
PROCESS (clk, rst_n)
BEGIN -- PROCESS
IF rst_n = '0' THEN
-- asynchronous reset (active low)
Result <= (OTHERS => '0');
ELSIF clk'event AND clk = '1' THEN -- rising clock edge
Result <= Op1 + op2;
END IF;
END PROCESS;
END behavior;

Counter

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_unsigned.ALL;

ENTITY Adder_ent IS
PORT (
clk : IN std_logic;
-- System clock
rst_n : IN std_logic;
-- System reset
Count : OUT std_logic_vector(7 DOWNTO 0)); -- Count
END Adder_ent;
ARCHITECTURE behavior OF Adder_ent IS
SIGNAL counter : std_logic_vector(7 DOWNTO 0); -- internal counter
BEGIN -- behavior
PROCESS (clk, rst_n)
BEGIN -- PROCESS
IF rst_n = '0' THEN
-- asynchronous reset (active low)
Counter <= (OTHERS => '0');
ELSIF clk'event AND clk = '1' THEN -- rising clock edge
Counter <= counter + 1;
END IF;
END PROCESS;
count <= counter;
END behavior;

7-Segment decoder

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY Decoder IS
PORT (
InBin : IN std_logic_vector (3 DOWNTO 0);
Display : OUT std_logic_vector (6 DOWNTO 0));
END Decoder;
ARCHITECTURE rtl OF decoder IS
SIGNAL t : std_logic_vector (6 DOWNTO 0);
BEGIN
seg_process : PROCESS (InBin)
BEGIN
CASE InBin IS
WHEN "0000" => t <= "1111110";
WHEN "0001" => t <= "0110000";
WHEN "0010" => t <= "1101101";
WHEN "0011" => t <= "1111001";
WHEN "0100" => t <= "0110011";
WHEN "0101" => t <= "1011011";
WHEN "0110" => t <= "0011111";
WHEN "0111" => t <= "1110000";
WHEN "1000" => t <= "1111111";
WHEN "1001" => t <= "1110011";
WHEN "1010" => t <= "1110111";
WHEN "1011" => t <= "0011111";
WHEN "1100" => t <= "1001110";
WHEN "1101" => t <= "0111101";

;"WHEN "1110" => t <= "1001111


;"WHEN OTHERS => t <= "1000111
;END CASE
Display
;<= NOT t
;END PROCESS seg_process
;END rtl

3 -11 E1w        


 . 9 ) 93 
$) B 1  %.9    , }
) (FPGA     !!B = ! $ }(FPGA) h

^ )  (Bit Stream 1  (FPGA) h}  9 S ' !_.
+ = ,
.  S $3 C+- )! )
} * + ) 79 (FPGA
 )(ASIC
e - 12 >E   Ji Ly X
  } ) + C+7 (FPGA  +$$3   9 +9$ %.9
1 )   = 2 G %+  D 7 9 )  1  )$ $G
h.= 0
  $  www.opencores.org Cf
- 13E      i };:~e } i-
G 1    

  $ + ' _ +. 9J  +
$
% ) *9 _ .  h  ) $ (FPGA  ' 2 '
+
G I% = ,*   , $ S )   $$3 h} C2
) (FPGA I%  $$3  ) . * (FPGA) h} * C$ ! 6   'C
)  9 R + B h  +* I% 99$  h )   $$3 *
} (FPGA) h1  f f h + *h

C - 0 f$ 9 )  $$3 h  %.9  9 R ' C 9
 *  J,- ) +  *6  $$3  +9$ ) 9 R C$
 h ,7$  +9 ) % C$ ! 9$6 C I%  $$3 ) 
h} 0
) h9- 9  (FPGA } (FPGA) h  B  = 2 C.  '
_ .  h 9J '
99$ 9  + )   $$3 
h} 0
) (FPGA1 ! J ' C  $3 % ? D ) C$ ! S   h
! J %.9 C3.%  $3 ' 9 B 1  2 $3 C C
 % h
% (FPGA) h} SB h
33G- - 14    J3  5  2
$!  *  $$3    ! $ )$   *  C $$3
+  ),- *  C +  (FPGA}  * +
) (FPGA ' ) (HDL !$$3$ !+  +9$  ! )   J (HDL%
! 
} 0 )  J (FPGA % !   $$3$ )  $

 $$3$ )B ) C% !

 ! $  $$3 ! !+  (FPGA) ( }HDL)  !32


$$3 9 !-  ( * !Linux) 9
!B! !  Cf   )$
D- 1 G$ )  $  1!   )
=43 -15
-

Digital design by Morris Mano.


Field Programmable Gates Array by Oldfield and Dorf.
http://klabs.org/richcontent/Tutorial/fpga/Toronto_tutorial.pdf
Architecture of FPGAs and CPLDs: A Tutorial (The best document)
http://klabs.org/richcontent/Tutorial/PLD_Definitions.htm
http://hobbes.inesc.pt/~hcn/cid/xprojecto2.pdf
www.optimagic.com
www.xilinx.com
www.altera.com
www.xess.com
http://www.eecg.toronto.edu/~lewis/ece451/vhdl_examples.html
http://www.mcmanis.com/chuck/robotics/fpga/

0   $ % 0
 )
 - B
jamilkhatib75@yahoo.com

Tarek_ah@yahoo.com

Das könnte Ihnen auch gefallen