p r o j e c t
DESCRIPTION
P R O J E C T. VLSI 설계 자동화 담당교수님 : 조 준동 교수님. 1. PROJECT : < 4 bit carry lookahead adder 를 이용한 16 bit group ripple carry adder 설계 > < 8 bit braun array multiplier 설계 > - PowerPoint PPT PresentationTRANSCRIPT
1
P R O J E C TP R O J E C T
VLSI 설계 자동화
담당교수님 : 조 준동 교수님
2
1. PROJECT : < 4 bit carry lookahead adder 를 이용한
16 bit group ripple carry adder 설계 >
< 8 bit braun array multiplier 설계 >
2. NAME : SKKU 전자공학과 4 학년 9251081 박 성민
3. PROJECT GOAL
SCHEMETIC 방식의 설계와 VHDL 방식의 설계 방법을 통해 전반적인 설계 기법을 익히고자 한다 .
위 주제의 ADDER 를 설계하고 일반적인 RIPPLE ADDER 와 비교 분석을 하고 여러종류의 ADDER 알고리즘을 이해한다 .
ADDER 설계가 끝나면 8 BIT BRAUN ARRY MULTIPLIER 를 설계해보고자 한다 .
3
4. REARCH BACKGROUND
효율적인 회로는 아니지만 위 주제의 설계를 통해서 설계 기법을 기초부터 익히는데 가장 접근하기 쉬운 주제라고 생각해서 선택하였다 .
5. Theory 및 design 과정
기본적인 이론과 설계 알고리즘을 세운다 .
< SCHEMETIC 설계 방식 , VHDL 설계 방식 >
* 4 bit carry lookahead adder >> * 16 bit group ripple carry adder
>> * SIMULATION 검증 및 TIME ANALIZING
>> * 16 bit ripple carry adder 와 비교 , 분석
8 bit braun array multiplier 설계
4
ADDER 설계ADDER 설계
SCHEMATICSCHEMATIC V H D LV H D L
4bit carry lookahead
adder
4bit carry lookahead
adder
symbolizesymbolize
16bit group ripple carry
adder
16bit group ripple carry
adder
Simulationtime analyzeSimulation
time analyze
16bit ripple carry
adder
16bit ripple carry
adder
Simulationtime analyzeSimulation
time analyze
비교 , 분석비교 , 분석
4bit CLA 구성4bit CLA 구성
StructuremodelingStructuremodeling
Simulationtime analyzeSimulation
time analyze
Behaviormodeling Behaviormodeling
Simulationtime analyzeSimulation
time analyze
비교 , 분석비교 , 분석
16bit ripple carry
adder
16bit ripple carry
adder
Behaviormodeling Behaviormodeling
4bit CLA >> 16bit GRCA
4bit CLA >> 16bit GRCA
5
< Theory >
우선 adder 설계를 위한 이론적인 진리표와 논리식을 세운다 .
* full adder 진리표A B C CARRY SUM0 0 0 0 00 0 1 0 10 1 0 0 10 1 1 1 01 0 0 0 11 0 1 1 01 1 0 1 01 1 1 1 1
* CARRY karnaugh map * SUM karnaugh map
CARRYC
AB 0 1
00 0 001 0 111 1 110 0 1
SUMC
AB 0 1
00 0 101 1 011 0 110 1 0
6
* 논 리 식CARRY = AB + BC + CA = AB + C ( A + B)SUM = ABC + AB’C’ + A’B’C + A’BC’ = (AB + A’B’) C + (AB’ + A’B) C’
위 가산기의 논리식으로부터 4 bit 캐리 예측 의 개념을 세우고 논리식을유도한다.
캐리 발생의 개념입력 Ai 및 Bi의 특정 조합에 대해서 A0 -Ai - 1,B0 -Bi - 1 및 C0의 입력과 무관한 캐리아웃 1(Ci - 1 =1)이 얻어진다면 ,가산기 단계 i 는 캐리를 발생 (generate)시킨다고말한다.
논리식은 Gi =Ai Bi
캐리 전달의 개념입력 Ai 및 Bi의 특정 조합에 대해서, 만일 1 의 캐리인(Ci + 1 =1)을 야기시키는A0 -Ai - 1, B0 -Bi - 1 및 C0의 입력으로써 1의 캐리아웃(Ci - 1 =1)이 얻어진다면 가산기단계 i는 전달 (propagate)된다고 말한다.
논리식은 Pi = Ai + Bi = Ai xor Bi(propagation 의미상 )
7
위 두 식으로부터 만일 가수비트가 둘 다 1 이 된다면 2 단계에서는 무조건 캐리가 발생하며, 가수 중에서 적어도 한 비트가 1 이 된다면 캐리가 전달된다. 한 단계의 캐리 출력은 발생 및 전달신호에 의해 작성될 수가 있다.
즉 위 CARRY 식과 SUM 식의 i 번째 논리식을 다음과 같이 나타낼 수가 있다.
CARRY(Ci + 1 ) = AB + BC + CA = AB + C ( A + B) = Gi +Pi Ci - 1
SUM (Si ) = ABC + AB’C’ + A’B’C + A’BC’ = (AB + A’B’) C + (AB’ + A’B) C’ = (Ai xorBi )’ Ci + (Ai xorBi ) Ci ’ = Ai xorBi xor Ci
HSi C3 C2 C1 C0
A= A3 A2 A1 A0
B= B3 B2 B1 B0
S3 S2 S1 S0
C4 C3 C2 C1
8
XORXORXORXOR
캐리
예측
논리
캐리
예측
논리
AiAi
BiBi
HSiHSi
Ai-1Ai-1
Bi-1Bi-1
CoCo
CiCi
SiSi
CARRY LOOKAHEAD ADDER 회로도 CARRY LOOKAHEAD ADDER 회로도
9
캐리 리플을 제거하기 위해서, 각각의 단계에 대한 항 Ci 를 순환적으로 전개하며,2 단 AND – OR 표현식을 얻을 수 있도록 곱전개를 한다. 이러한 기법을 이용하여, 처음 4 개의 가산기 단계에 대한 캐리 식을 다음과 같이 얻을 수 있다.
C1 = G0 +P0 C0
C2 = G1 +P1 C1
= G1 +P1 ( G0 +P0
C0 ) = G1 +P1
G0 + P1 P0
C0
C3 = G2 +P2 C2
= G2 +P2 (G 1 +P1
G0 + P1P0
C0 ) =G2 +P2
G 1 + P2 P1
G0 + P2 P1
P0 C0
C4 = G3 +P3 C3
= G3 +P3 ( G2 +P2
G 1 + P2 P1
G0 + P2 P1
P0 C0 )
=G3 +P3 G2 + P3
P2 G 1 + P3
P2 P1
G0 + P3 P2
P1P0
C0
여기서 반전 게이트가 비반전 게이트보다 빠르기 때문에 캐리발생 (Gi )과캐리 전달(Pi ) 신호의 active-low 버전을 만든다. 따라서 다음과 같은 반합식을대수적으로 조작할 수 있다.
10
HSi = Ai xor Bi
= Ai Bi +Ai Bi
= Ai Bi + Ai Ai +Ai Bi +Bi Bi
= (Ai +Bi ) (Ai +Bi ) = (Ai +Bi ) (Ai
Bi) = Pi Gi
따라서 반전된 입력을 갖는 AND 게이트가 각 반합 비트를 만들기 위해 XOR 게이트 대신 이용될 수가 있다.
또한, CMOS 나 TTL 반전 게이트와 대략 같은 지연을 갖도록 캐리식들이 약간수정된 형태로 사용된다. 특히 Ci + 1 식은 Gi 대신에 Pi
Gi 항을 이용한다. 이것은Gi 가 1이 될 때 Pi 가 항상 1이 되기 때문에 출력상에는 아무런 영향이 없다.그러나 이 식들이 다음과 같이 인수분해가 되도록 한다.
Ci + 1 = Pi Gi + Pi
Ci
= Pi ( Gi + Ci )
11
여기서 위 캐리식을 다시 전개 하면 다음과 같다. C 1 = P0
( G0 +C0 ) C 2 = P1
( G1 +C1 ) = P1
( G1 + P0 ( G0 +C0 ))
= P1 ( G1 + P0 )
( G1 + G0 +C0 )C 3 = P2
( G2 +C2 ) = P2
( G2 + P1 ( G1 + P0 )
( G1 + G0 +C0 )) = P2
( G2 + P1 ) ( G2 + G1 + P0 ) ( G2 + G1 + G0 +C0 )
C 4 = P3 ( G3 +C3 )
= P3 ( G3 + P2
( G2 + P1 ) ( G2 + G1 +P0 ) ( G2 + G1 + G0 +C0 ))
= P3 ( G3 + P2 ) ( G3 + G2 + P1 ) ( G3 + G2 + G1 +P0 ) (G3 +G2 + G1 + G0 +C0 )
이상으로 기본적인 carry lookahead 이론을 살표보았다 .
이 후로 이론을 바탕으로 실제 설계를 시작한다 .
12
SCHEMETIC 설계 SCHEMETIC 설계
4 bit carry lookahead adder >> symbolize
>> 16 bit group ripple carry adder
>> simulation , time analize
4 bit carry lookahead adder >> symbolize
>> 16 bit group ripple carry adder
>> simulation , time analize
16 bit ripple carry adder
>> simulation, time analize
16 bit ripple carry adder
>> simulation, time analize 비교 , 분석
비교 , 분석
13
4 bit carry
lookahead
adder
4 bit carry
lookahead
adder
14
15
16
16 bit group
ripple carry
adder
16 bit group
ripple carry
adder
17
18비교비교 graphgraph
19
16 bit
ripple carry
adder
16 bit
ripple carry
adder
20
21비교비교 graphgraph
22
05
101520253035404550
16 GRA 16 RCA
CinB0
16 GRA 16 RCACin 27.5 49.5B0 27.5 49.5
16 group RCA 16 RCA
Cin 27.5ns 49.5ns
B0 27.5ns 49.5ns
비교 및 분석 비교 및 분석
Simulation 검증과
time 분석결과
group RCA 가 RCA
보다 speed 가 두배정도
빨라지고 waveform에서
보면 glitch 가 줄어듬을
볼수 있다 .
Simulation 검증과
time 분석결과
group RCA 가 RCA
보다 speed 가 두배정도
빨라지고 waveform에서
보면 glitch 가 줄어듬을
볼수 있다 .
23
V H D L 설계 V H D L 설계
4 bit carry lookahead adder
( behavior modeling ) >> component
>> 16 bit group ripple carry adder
( structure modeling )
>> simulation , time analize
4 bit carry lookahead adder
( behavior modeling ) >> component
>> 16 bit group ripple carry adder
( structure modeling )
>> simulation , time analize
16 bit ripple carry adder
( behavior modeling )
>> simulation, time analize
16 bit ripple carry adder
( behavior modeling )
>> simulation, time analize 비교 , 분석
비교 , 분석
24
-- 4 bit carry lookahead adderlibrary ieee;use ieee.std_logic_1164.all;
entity cl_4ad isport ( a,b : in std_logic_vector(3 downto 0);
c_in : in std_logic; sum : out std_logic_vector(3 downto 0);
c_out : out std_logic);end cl_4ad;
architecture behavior_description of cl_4ad is signal Ci : std_logic_vector (4 downto 0);begin process (a,b,c_in) variable Gi,Pi : std_logic_vector (3 downto 0); begin Gi := a(3 downto 0) and b(3 downto 0); Pi := a(3 downto 0) or b(3 downto 0); Ci(0) <= c_in; Ci(1) <= Gi(0) or (Pi(0) and Ci(0)); Ci(2) <= Gi(1) or (Pi(1) and Ci(1)); Ci(3) <= Gi(2) or (Pi(2) and Ci(2)); Ci(4) <= Gi(3) or (Pi(3) and Ci(3)); sum(3 downto 0) <= a(3 downto 0) xor b(3 downto 0) xor Ci(3 downto 0); c_out <= Ci(4); end process;end behavior_description;
configuration cfg_cl_4ad of cl_4ad is for behavior_description end for;end cfg_cl_4ad;
-- 4 bit carry lookahead adderlibrary ieee;use ieee.std_logic_1164.all;
entity cl_4ad isport ( a,b : in std_logic_vector(3 downto 0);
c_in : in std_logic; sum : out std_logic_vector(3 downto 0);
c_out : out std_logic);end cl_4ad;
architecture behavior_description of cl_4ad is signal Ci : std_logic_vector (4 downto 0);begin process (a,b,c_in) variable Gi,Pi : std_logic_vector (3 downto 0); begin Gi := a(3 downto 0) and b(3 downto 0); Pi := a(3 downto 0) or b(3 downto 0); Ci(0) <= c_in; Ci(1) <= Gi(0) or (Pi(0) and Ci(0)); Ci(2) <= Gi(1) or (Pi(1) and Ci(1)); Ci(3) <= Gi(2) or (Pi(2) and Ci(2)); Ci(4) <= Gi(3) or (Pi(3) and Ci(3)); sum(3 downto 0) <= a(3 downto 0) xor b(3 downto 0) xor Ci(3 downto 0); c_out <= Ci(4); end process;end behavior_description;
configuration cfg_cl_4ad of cl_4ad is for behavior_description end for;end cfg_cl_4ad;
4 bit carry
lookahead
adder
25
26
27
-- 16 bit group ripple carry adderlibrary ieee;use ieee.std_logic_1164.all;
entity rcl_16ad is port ( a,b : in std_logic_vector(15 downto 0); c_in : in std_logic; sum : out std_logic_vector(15 downto 0); c_out : out std_logic);end rcl_16ad;
architecture structure of rcl_16ad is signal C_1,C_2,C_3 : std_logic; component cl_4ad port ( a,b : in std_logic_vector(3 downto 0); c_in : in std_logic; sum : out std_logic_vector(3 downto 0); c_out : out std_logic); end component;
begin cl_0:cl_4ad port map (a(3 downto 0),b(3 downto 0),c_in,sum(3 downto 0),C_1); cl_1:cl_4ad port map (a(7 downto 4),b(7 downto 4),C_1,sum(7 downto 4),C_2); cl_2:cl_4ad port map (a(11 downto 8),b(11 downto 8),C_2,sum(11 downto 8),C_3); cl_3:cl_4ad port map (a(15 downto 12),b(15 downto 12),C_3,sum(15 downto 12),c_out);end structure;
-- 16 bit group ripple carry adderlibrary ieee;use ieee.std_logic_1164.all;
entity rcl_16ad is port ( a,b : in std_logic_vector(15 downto 0); c_in : in std_logic; sum : out std_logic_vector(15 downto 0); c_out : out std_logic);end rcl_16ad;
architecture structure of rcl_16ad is signal C_1,C_2,C_3 : std_logic; component cl_4ad port ( a,b : in std_logic_vector(3 downto 0); c_in : in std_logic; sum : out std_logic_vector(3 downto 0); c_out : out std_logic); end component;
begin cl_0:cl_4ad port map (a(3 downto 0),b(3 downto 0),c_in,sum(3 downto 0),C_1); cl_1:cl_4ad port map (a(7 downto 4),b(7 downto 4),C_1,sum(7 downto 4),C_2); cl_2:cl_4ad port map (a(11 downto 8),b(11 downto 8),C_2,sum(11 downto 8),C_3); cl_3:cl_4ad port map (a(15 downto 12),b(15 downto 12),C_3,sum(15 downto 12),c_out);end structure;
16 bit group
ripple carry
adder
28
29비교 graph
30
-- 2 bit full adder
library ieee;use ieee.std_logic_1164.all;
entity fuad is port ( x,y : in std_logic; c_in : in std_logic; s_out,c_out : out std_logic);end fuad;
architecture structure of fuad is begin process begin c_out <= (x and y) or (c_in and (x or y)); s_out <= x xor y xor c_in; end process; end structure;
configuration cfg_fuad of fuad is for structure end for;end cfg_fuad;
-- 2 bit full adder
library ieee;use ieee.std_logic_1164.all;
entity fuad is port ( x,y : in std_logic; c_in : in std_logic; s_out,c_out : out std_logic);end fuad;
architecture structure of fuad is begin process begin c_out <= (x and y) or (c_in and (x or y)); s_out <= x xor y xor c_in; end process; end structure;
configuration cfg_fuad of fuad is for structure end for;end cfg_fuad;
-- 16 bit ripple carry adder
library ieee;use ieee.std_logic_1164.all;
entity rcad is port ( a,b : in std_logic_vector(15 downto 0); c_in : in std_logic; sum : out std_logic_vector(15 downto 0); c_out : out std_logic);end rcad;
architecture structure of rcad is
signal C_1,C_2,C_3,C_4,C_5,C_6,C_7,C_8,C_9,C_10,C_11,C_12,C_13,C_14,C_15 : std_logic; component fuad port ( x,y : in std_logic; c_in : in std_logic; s_out : out std_logic; c_out : out std_logic);end component;
뒷면 계속
-- 16 bit ripple carry adder
library ieee;use ieee.std_logic_1164.all;
entity rcad is port ( a,b : in std_logic_vector(15 downto 0); c_in : in std_logic; sum : out std_logic_vector(15 downto 0); c_out : out std_logic);end rcad;
architecture structure of rcad is
signal C_1,C_2,C_3,C_4,C_5,C_6,C_7,C_8,C_9,C_10,C_11,C_12,C_13,C_14,C_15 : std_logic; component fuad port ( x,y : in std_logic; c_in : in std_logic; s_out : out std_logic; c_out : out std_logic);end component;
뒷면 계속
16 bit ripple carry adder
31
begin cl_0:fuad port map (a(0),b(0),c_in,sum(0),C_1); cl_1:fuad port map (a(1),b(1),C_1,sum(1),C_2); cl_2:fuad port map (a(2),b(2),C_2,sum(2),C_3); cl_3:fuad port map (a(3),b(3),C_3,sum(3),C_4); cl_4:fuad port map (a(4),b(4),C_4,sum(4),C_5); cl_5:fuad port map (a(5),b(5),C_5,sum(5),C_6); cl_6:fuad port map (a(6),b(6),C_6,sum(6),C_7); cl_7:fuad port map (a(7),b(7),C_7,sum(7),C_8); cl_8:fuad port map (a(8),b(8),C_8,sum(8),C_9); cl_9:fuad port map (a(9),b(9),C_9,sum(9),C_10); cl_10:fuad port map (a(10),b(10),C_10,sum(10),C_11); cl_11:fuad port map (a(11),b(11),C_11,sum(11),C_12); cl_12:fuad port map (a(12),b(12),C_12,sum(12),C_13); cl_13:fuad port map (a(13),b(13),C_13,sum(13),C_14); cl_14:fuad port map (a(14),b(14),C_14,sum(14),C_15); cl_15:fuad port map (a(15),b(15),C_15,sum(15),c_out); end structure;
begin cl_0:fuad port map (a(0),b(0),c_in,sum(0),C_1); cl_1:fuad port map (a(1),b(1),C_1,sum(1),C_2); cl_2:fuad port map (a(2),b(2),C_2,sum(2),C_3); cl_3:fuad port map (a(3),b(3),C_3,sum(3),C_4); cl_4:fuad port map (a(4),b(4),C_4,sum(4),C_5); cl_5:fuad port map (a(5),b(5),C_5,sum(5),C_6); cl_6:fuad port map (a(6),b(6),C_6,sum(6),C_7); cl_7:fuad port map (a(7),b(7),C_7,sum(7),C_8); cl_8:fuad port map (a(8),b(8),C_8,sum(8),C_9); cl_9:fuad port map (a(9),b(9),C_9,sum(9),C_10); cl_10:fuad port map (a(10),b(10),C_10,sum(10),C_11); cl_11:fuad port map (a(11),b(11),C_11,sum(11),C_12); cl_12:fuad port map (a(12),b(12),C_12,sum(12),C_13); cl_13:fuad port map (a(13),b(13),C_13,sum(13),C_14); cl_14:fuad port map (a(14),b(14),C_14,sum(14),C_15); cl_15:fuad port map (a(15),b(15),C_15,sum(15),c_out); end structure;
32
33비교 graph
34
0
5
10
15
20
25
30
35
40
45
16 GRA 16 RCA
CinB0
16 GRA 16 RCACin 27.5 49.5B0 27.5 49.5
16 group RCA 16 RCA
Cin 42.5ns 42.5ns
B0 42.5ns 42.5ns
비교 및 분석 비교 및 분석
VHDL 설계에서는
Simulation 검증과
time 분석결과
group RCA 와 RCA
가 speed 가 거의 똑같았고
waveform 에서
보면 glitch 가 줄어듬을
볼수 있다 .
VHDL 설계에서는
Simulation 검증과
time 분석결과
group RCA 와 RCA
가 speed 가 거의 똑같았고
waveform 에서
보면 glitch 가 줄어듬을
볼수 있다 .
35
05
101520253035404550
16
GR
A(V
)
16
RC
A(V
)
16
GR
A(S
)
16
RC
A(S
)
CinB0
16 GRA 16 RCACin 27.5 49.5B0 27.5 49.5
16 GRCA(V) 16 RCA(V) 16 GRCA(S) 16 RCA(S)
Cin 42.5ns 42.5ns 27.5ns 49.5ns
B0 42.5ns 42.5ns 27.5ns 49.5ns
전체 비교 및 분석
전체 비교 및 분석 V(Vhdl), S(Schemetic)