Upload
jacob-mccormick
View
133
Download
2
Embed Size (px)
DESCRIPTION
VHDL 을 이용한 통신 칩 설계 -DS/SS MODEM 설계를 중심으로 -. 인천대학교 공과대학 전자공학과 System ASIC Design Lab. 지도교수 : 조 중 휘 [email protected] ㈜ 본 강의 교재에 대한 복제 및 사용을 위하여는 저자의 허락을 받아 주십시오. 단계별 구성 시스템 이해 알고리즘 설계 RTL 블록 설계 VHDL 표현 검증 및 합성 FPGA Emulation Physical 설계 ASIC 으로의 제작 System Board 구성 - PowerPoint PPT Presentation
Citation preview
VHDL 을 이용한 통신 칩 설계 -DS/SS MODEM 설계를 중심으로 -
인천대학교 공과대학 전자공학과System ASIC Design Lab.
지도교수 : 조 중 휘[email protected]
㈜ 본 강의 교재에 대한 복제 및 사용을 위하여는 저자의 허락을 받아 주십시오 .
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-2
ASIC 제품의 기획 , 설계 및 구현 과정에 대한 기본 이해
단계별 구성 시스템 이해 알고리즘 설계 RTL 블록 설계 VHDL 표현 검증 및 합성 FPGA Emulation Physical 설계 ASIC 으로의 제작 System Board 구성 ASIC 의 검증
ASIC 선택 FPGA SOG Cell-Based Full Custom
x
y dyexQ 2/2
2
1)(
? ? ? ...
!!
............a rch ite c ture rtl o f........s igna l s 0 , s 1 , s 2 : s td_ lo g ip ro ce s s (c lo ck,re s e t)be g in.......
D
D
D
D
FAFA
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-3
설계 대상체의 동작 및 구조 특성에 대한 표현의 다양성
설계 사양의 표현 수준 System Level Behavioral Level RTL Level Logic Level Circuit Level Layout Level
설계 사양의 표현 Graphic Diagram HDL 표현
설계 단계에 대한 이해
Port1 Port2 Port3
R1 R2 R3
ALU ADDER
Output
Mux2Mux1
Port1 Port2 Port3
+ +
+-
<
Output
Level Graphical Representation
System
Partioning,Pipelining
Behavioral
Scheduling,Allocation
RTL
State Machines,Logicand RTL
Multi-level, 2-levelOptimization
Logic
Technology mapping/translation
Implementation
Place and Route
HDL,Graphical
specifications
HDL,Bubble
diagrams
Logicequations,
HDL, Gates
LayoutCIF/GDSII
a
b
c
de
f
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-4
Synthesis 가능한 VHDL 표현을 위한 Hardware 추출
Target Architecture Register-Transfer Level 의 블록 구성도
RTL 회로도의 주요 구성 요소 조합 논리 회로 블록 : Basic Gates, Modular Units (mux, decoder, arithmetic units) 동기 신호 요구 블록 : F/Fs, Registers 기억 소자 블록 : ROM, RAM Bus 연결 요구 블록 : 3-Buffer
L o g ic
S ta te
E xt
S tatus C ontro l
m
R
C lk
m
E nable
O utput
Input
OData
Datapath
0000 01101100101101011000 01111000010101010100 00111110101010111100 00101010111110010010 11010101110101011010 00000000110101010110 0111111110010111
M emory
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-5
VHDL 표현과 Design Compiler 에 의한 설계
Design Flow 의 3 단계 구성과 의미 RTL 회로 설계
회로도 추출 및 효율적 VHDL 표현 기능 Simulation 에 의한 회로 검증
Gate Level 회로 설계 면적 , 속도 ,Power 를 고려한 조건
설정 Design Library 의 설정 : FPGA, ASIC Component Delay 를 고려한 기능 및
Timing Simulation 에 의한 회로 검증 Physical Design 을 위한 EDIF 생성
FPGA 를 이용한 Physical Design FPGA Tool 에 의한 Compile 수행 사용할 Device 및 Option 의 설정 Layout Data 를 이용한 Simulation Target Board 의 구성과 Emulation 을
통한 검증 ASIC 으로의 변환 여부에 따른 대응
ASIC 설계를 위한 Physical Design Design House 와의 연계 및 EDIF
전달 Wire Delay 를 함께 고려한 Simulation Sign-off 와 ASIC 에 대한 기다림 Test Board 구성 , 검증 및 평가
VHDL M odeling
Validation us ing S imulation
Synthesis C onstraints(speed, area, . . . )
S ynthes is P rocess :- R eso urce allo catio n- techno lo gy mapping
VHDL netlis t
Validation us ing S imulation
EDIF Netlist orSpecific Format
layout fo rmat
R outing
Validation us ing S imulation
B ack- annotation
F inalValidation
S ynthes isP rocess
M odelingfor
S ynthes is
Design Flow 의 모형
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-6
다양한 Digital ASIC 구현 방법
Digital ASIC 구현의 종류
H ierarch ical cel ls G enerato rs : M em o ry P L A Sparse lo gic G ate m atrix
G ate arrays Sea o f gates C o m pacted arrays
A n ti -fuse based M em ory-based
STANDARD C ELLS MAC RO C ELLS PREWIREDPREDIFFUSED
Semicustom
Digital C ircuit Implementation Approaches
C ustom
Array- BasedC ell- Based
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-7
Digital ASIC 구현 방법에 대한 선택
응용과 시장성을 고려한 ASIC 제품의 특성 비교
D ensity
P erfo rm ance
F lex ibi l i ty
D esign tim e
M anu factu ring tim e
C o st - lo w vo lum e
C o st - h igh vo lum e
C ustomC ustom
V ery H igh
V ery H igh
V ery H igh
V ery L ong
V ery H igh
L o w
M edium
C ell-based
H igh
H igh
H igh
H igh
L o w
Sho rt
M edium
P red iffused
L o w
H igh
H igh
H igh
Sho rt
Sho rt
M edium
P rew ired
L o w
H igh
L o w
V ery Sho rt
V ery Sho rt
M edium - L o w
M edium - L o w
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-8
Standard-Cell Design 에 대한 개념
Boding Diagram 예제
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-9
Sea-of-Gate Design 에 대한 개념
Boding Diagram 예제 : FLEX Decoder Chip
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-10
HDL 의 비교 및 VHDL 의 변화 과정
표준화를 목표로 하면서 사용되고 있는 HDL 의 비교 VHDL : 시스템에 대한 기술의 능력은 매우 높으나 , synthesis 를 위하여 sub-set V
HDL 과 modeling 에 대한 guide 가 요구 . Verilog : VHDL 보다는 기술의 능력이 높지는 않으나 널리 사용되고 있으며 , gate
레벨의 simulation 언어로는 매우 적합하여 design kit 의 golden simulator 에 사용 VHDL 의 개발과 변화
Value 체계에 대한 변화 1987 년의 STD-1076 Version
STD library 에 정의된 2-Value 체계 즉 , {‘0’, ‘1’} 를 기본으로 사용 1990 년을 전후로 하여 Value 체계에 대한 표준안에 대한 요구
IEEE library 에 정의된 9-value 체계 즉 , {‘U’, ‘X’, ‘0’, ‘1’, ‘Z’, ‘W’, ‘L’, ‘H’, ‘-’} 를 사용
1983
10 11 12
V2.0V1.0
1986
2 12
1987
1 56PreliminaryStandard
10Draft
StandardIEEEBallot
12Final IEEEStandard
1984
2 12
V3.5V3.0
1985
1 8
V7.0V6.0
4 5 6 7 8CriticalDesignReview V4.0
V5.0
OronoWorkshop
V7.2
1992
VHDL '92
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-11
VHDL 의 다양한 사용 목적
사용 관점에 따른 목적의 다양성 System 설계자의 관점 : Simulation 과 Documentation Chip 설계자의 관점 : Simulation, Synthesis 및 Documentation
Chip 설계자에의 유용성 및 제약성 IP(Intellectual Property) Model 에 대한 개발과 Re-Use 의 개념이 가능 Synthesis 가 가능한 VHDL 표현과 효율적인 Modeling 방법의 이해가 요구
P ROC E S SBE G IN F OR i IN 1 TO 10 LOOP. . . E ND LOOPE ND P ROC E SS ;
S im ulationO K
S ynthesis
Doc um entation
Form al P roof
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-12
H/W 및 S/W 관점에서 요구되는 Interface 와 Body 의 2 가지 개념
VHDL 을 이용한 표현의 단위를 Design Entity 라 부름 표현하고자 하는 hardware design 대상체를 의미함 예시 : NOT gate, ALU, Micro-Processor, Board, Computer System 등
VHDL 에서 Design Entity 를 표현하기 위하여 요구되는 개념
arc hitec ture 1
a = b + c d = b/ c+ a
arc hitec ture 2
S ubprogramheaders
(dec larations)
pac kage dec laration
algorithms o fthe
subprograms
pac kage body
entity dec laration
E ntity dec laration+ assoc iated arc hitec tures
Pac kage dec laration+ assoc iated pac kage
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-13
System 분할과 VHDL 표현을 위한 개념 (1)
System 에 대한 분할을 위한 개념 System 개념 또는 설계자가 이해할 수 있는 범위에 따른 분할함 IP 또는 Macro Component 로 구성되어 있는 경우의 분할함 논리 합성의 대상체는 4,000~5,000 Gate 가 Optimization 관점에서 보편적으로 적합함
분할에 대한 표현 예 -1 Design Tree 와 Fully 계층적 VHDL 표현
모든 Design Node 를 Entity Unit + Architecture Unit 으로 표현 논리 합성의 결과는 계층적으로 나타나므로 분할의 정보를 유지함
B 1
B 3B 2 B 4
B 5 B 6
Dec laration
E ntity
B ody
Arc hitec ture(S truc tural)
C onfiguration
E ntity
Arc hitec ture(B ehavioral)
Pac kageU nit
B 1
B 4
E ntityE ntity
Arc hitec ture(B ehavioral)
Arc hitec ture(S truc tural)
E ntity
Arc hitec ture(B ehavioral)
E ntity
Arc hitec ture(B ehavioral)
B 2 B 3 B 6
B 5
C onfiguration
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-14
System 분할과 VHDL 표현을 위한 개념 (2)
분할에 대한 표현 예 -2 Design Tree 와 Fully Flatten VHDL 표현
Root Design Node 에 대하여 만 Entity Unit + Architecture Unit 으로 표현 Root 이외의 Design Node 는 Concurrent VHDL 구문을 사용하여 표현 논리합성의 결과는 하나의 도면으로 나타나므로 분할의 정보가 유지되지 않음
분할에 대한 표현의 다양성 위의 2 가지 표현 사이에 여러 가지 다양한 표현이 가능함 -> 설계자의 선택 사항
B 1
B 3B 2 B 4
B 5 B 6
Dec laration
E ntity
B ody
Arc hitec ture(B ehavioral)
Proc ess 구 문
Pac kageU nit
B 1
B 4
Proc ess 구 문 Proc ess 구 문 Sequential 구 문
Sequential 구 문
B 2 B 3 B 6
B 5
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-15
Entity Declaration Unit 의 정의
Entity Unit 에 대한 기본 개념의 표현
Entity Unit 표현에 대한 Syntax 정의 entity ENTITY_NAME is
[ generic ( LIST_OF_GENERICS_AND_THEIR_TYPES ) ; ]
[ port ( LIST_OF_PORTS_AND_THEIR_MODE ) ; ]
[ DECLARATIONS ]
[ begin
{ ENTITY_STATEMENT } ]
end [ entity ] [ ENTITY_NAME ] ;
G eneric (static information: parameters)
Port
(dynam
ic
inform
ation:sig
nals
)
G eneric
Port
Subtype c onstraint c hec ks on generic s (values must belong to range) us ing passive process such as assertions Dynamic c hec ks on ports (sequence of values must match arbitrary constraints- - set- up, ho ld)
inout
inoutbuff er
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-16
Entity Declaration Unit 의 예제
D Flip-Flop 의 Symbol
Entity Unit 의 설계 -- 9-value Package 공유를 위한 Visibility
library IEEE; use IEEE.std_logic_1164.ALL;
-- Pin Name, Mode, Data Type 의 표현 entity DFF is
port (D : in std_logic;
CLK : in std_logic;
CLR : in std_logic;
-- D, CLK, CLR : in std_logic;
Q, QBAR : out std_logic);
end DFF;
Generic Decoder 의 Symbol
Entity Unit 의 설계 library IEEE; use IEEE.std_logic_1164.ALL;
entity GENERIC_DECODER is
-- Static Information 에 대한 표현 generic (SIZEIN, SIZEOUT : integer);
-- Dynamic Pin Data 에 대한 표현 port (EN: in std_logic;
A : in std_logic_vector
(SIZEIN-1 downto 0);
B : out std_logic_vector
(SIZEOUT-1 downto 0));
end GENERIC_DECODER;
D
CLK
Q
QCLR
G ENERIC_DECO DER
A B
EN
SIZEIN SIZEO UT
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-17
Architecture Unit 에 대한 개념과 표현 형태
예제 회로에 대한 이해의 관점에 대한 분류
behavioral view Q=‘1’ 이기 위한 조건은 x=‘1’ 이거나 , Y 와 Z 가 동시에 ‘ 1’ 인 경우라 분석하여
순서적으로 수행되는 구문을 사용하여 동작적 특성을 기술하는 관점이다 .
data-flow view Boolean 또는 state equation 의 형태로 분석하여 동시적으로 수행되는 구문을
사용하여 동작적 특성을 기술하는 관점이다 .
structural view and gate 와 or gate 의 연결에 의한 구성으로 분석하여 구조적 특성을 기술하는
관점이다 . 이때 and 및 or gate 는 위의 2 가지 중 하나로 표현되어야 한다 .
mixed view 위의 3 가지가 혼합되어 사용되는 표현
Data-Flow View
Behavioral View
Structual View
X
Y
Z
QU1
U2
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-18
Architecture Body Unit 에 대한 다양한 표현 형태
Entity design unit library IEEE; use IEEE.std_logic_1164.all; entity EXAMPLE is port (X, Y, Z: in std_logic; Q: out std_logic); end EXAMPLE;
Behavioral architecture body unit architecture RTL1 of EXAMPLE is begin process (X, Y, Z) begin if X=‘1’ then Q <= ‘1’; elsif (Y=‘1’ and Z=‘1’) then Q <= ‘1’; else Q <= ‘0’; end if; end process; end RTL1;
Data-flow architecture body unit architecture RTL2 of EXAMPLE is begin Q <= X or (Y AND Z); end RTL2; Structural architecture body unit architecture RTL3 of EXAMPLE is
component OR2 port (I1, I2: in std_logic; O1: out std_logic); end component; component AND2 port (I1, I2: in std_logic; O1: out std_logic); end component; for U0: OR2 use entity work.OR2(RTL); for U1: AND2 use entity work.AND2(RTL); signal S1: std_logic; begin U0: OR2 port map (X, S1, Q); U1: AND2 port map (Y, Z, S1); end RTL3;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-19
Source file 과 Compiled file 의 관계
VDHL source file 을 compile 하는 경우 library 의 지정이 요구되며 , compiled file (intermediate format) 은 지정된 library 에
저장 WORK library 에 대한 개념 정의
VHDL 사용자가 사용하고 있는 현재의 library 를 편의상 WORK 로 부르기로 약속함 IEEE VHDL 표준화 위원회 (VASG) 에서 지정한 library
2-value 를 위한 STD 와 9-value 를 위한 IEEE
VHDL Analyzer 에 의한 처리 과정
VHDLAnalyzer
Intermediateformat
LIB1 LIB2
STDIEEE
Design libraries
Working library,WORK
Design units
VHDL Design file
A design unit is:- entity declaration- architecture body- configuration declaration- package declaration- package body
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-20
Library 의 종류와 Visibility 의 범위
Library 의 종류
VHDL Code 에서 Package Unit 을 사용하기 위한 Visibility 의 부여 방법 공유하는 package 가 WORK library 에 있는 경우 design unit 의 기술 앞에 다음을
기술 use WORK.package_name.item_name;
공유하는 package 가 예를 들어 LIB1 인 경우 design unit 의 기술 앞에 다음을 기술 library LIB1; use LIB1.package_name.item_name;
package, entity,architecture ¹®
user Á¤ÀÇ library
VHDL Ç¥ÁØ librarytextio
STD library
ÇöÀç ½ÇÇàÁßÀÎÀÛ¾÷ directory
WORK library
logic gateÀÇentity,architecture ¹®
ASIC vendor library
std_logic_1164std_logic_arith
std_logic_unsigned
IEEE library
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-21
Library Visibility 의 표현과 영향의 범위
Entity Unit 의 표현 앞에 기술하는 경우 해당되는 architecture 와 configuration unit 까지만 영향을 받음
--library visibility 의 부여 library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.std_logic_unsigned.all;
--entity unit 에 대한 표현 시작 entity ADD_SUB is
port ( A, B : in std_logic_vector(3 downto 0);
SEL : in std_logic;
S : out std_logic_vector(3 downto 0);
CF, ZF : out std_logic);
end ADD_SUB;
Package Declaration Unit 의 표현 앞에 기술하는 경우 해당되는 package body unit 까지만 영향을 받음
library IEEE;use IEEE.std_logic_1164.ALL;
use IEEE.std_logic_arith.all; use IEEE.std_logic_signed.all;
package PACK_MATCH is
function COMP2C ( A: std_logic_vector) return std_logic_vector;
function TWO_MUL ( A: std_logic_vector; B: std_logic) return std_logic_vector;
end PACK_MATCH;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-22
Structural View 의 표현을 위한 기본 개념의 정의
Schematic Capture System 과 VHDL 표현과의 비교 Capture System 에서 사용하는 Component 에 대한 선택
Architecture Unit 에 Component 로 선언하며 , 특정 Component 로 지정 Symbol Edit 또는 Copy 기능에 의하여 회로 구성
Component Instantiation 구문에 의하여 회로 구성 회로 구성 시에 요구되는 Wire 의 사용
Wire 는 Signal Object 로 선언하고 사용 Formal Name 과 Actual Name 에 대한 정의
Formal Name : 선언된 Component 의 Generic 및 Port Name 으로 Pin Name 을 의미함
Actual Name : Hardware 구현 시의 Generic 및 Port Name 으로 Wire Name 을 의미함
표현을 위한 3 가지 형태의 구문 Component Instantiation 구문 , For..Generate 구문 , IF.. Generate 구문
예제 회로 : 1-Bit Half-Adder 와 등가 회로
NANDA
NANDB
NANDC
NANDD
S
C
X
Y
A
BY
A
B
A
B
Y
Y
A
BY
S1
S2
S3
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-23
Component Instantiation 구문에 의한 표현
Formal Name 과 Actual Name 을 연결하는 2 가지 방법 Positional Association Mapping Named Association Mapping
앞의 회로에 대한 VHDL 표현 library IEEE; use IEEE.std_logic_1164.all; entity HA is port (X, Y : in std_logic; S, C : out std_logic); end HA; architecture RTL of HA is --Component 의 Formal Name 선언 component NAND2 port ( A, B : in std_logic; Y : out std_logic); end component; component INV port ( X : in std_logic; Y : out std_logic); end component;
-- 2 종류의 Component 의 Link 정보 표현
for U4 : INV use entity work.INV(RTL); for others: NAND2 use entity work.NAND2(RTL); -- 연결 Wire 에 대한 Data Object 선언 signal S1, S2, S3 : std_logic; begin -- Positional Association Mapping 예제 U0 : NAND2 port map (X, Y, S3); U1 : NAND2 port map (X, S3, S1); U4 : INV port map (S3, C); -- Named Association Mapping 예제 U2 : NAND2 port map (A => S3, Y => S2, B => Y); U3 : NAND2 port map (A => S1, B => S2, C => S); end RTL;
사용되는 Component 에 대한 VHDL Modeling 은 미리 Compile 되어 지정 Library 에 저장하여야 한다 .
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-24
Unconnected Port 에 대한 처리 방법
Unconnected Port 에 대한 정의 Actual Name 이 존재하지 않는 경우 Unconnected Output Port Unconnected Input Port
Unconnected Port 에 대한 회로 예제
Unconnected Input Port VCC 를 ‘ 1’ 로 정의하고 연결함
Unconnected Output Port Reserved Identifier 인 OPEN 을
연결함
Unconnected Port 에 대한 처리 예제
architecture RTL of EX1 is
component EX2
port (CLK, PRESET, RESET, D : in
std_logic;
Q, QBAR : out std_logic);
end component;
for U1: EX2 use entity work.DFFSR(RTL);
signal VCC : std_logic;
begin
-- VHDL-87 에서의 처리 방법 VCC <= ‘1’;
U1 : EX2 port map (D => D, CLK =>CLK,
PRESET =>VCC, RESET=>CLR,
Q=>Q,BAR=>open);
-- VHDL-93 에서의 처리 방법 U1 : EX2 port map (D => D, CLK=>CLK,
PRESET =>’1’, RESET=>CLR,
Q=>Q, QBAR=>open);
end RTL;
DD
CLK
Qbar
PRSET
RESET
/ CLR
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-25
Generic Map Command 의 사용
Generic 구문의 Behavioral 표현 entity AND_GATE is
generic (Tdelay : time := 10 ns;
N : positive := 2);
port (A : in std_logic_vector(N-1 downto 0);
C : out std_logic);
end AND_GATE;
architecture RTL of AND_GATE is
begin
P0 : process (A)
variable INT : std_logic;
begin
INT := ‘1;
for I in (A’length-1) downto 0 loop
if (A(I)=‘0’) then
INT := ‘0’;
end if;
end loop;
C <= INT after Tdelay;
end process;
end RTL;
Generic Map 을 갖는 Structural 표현
entity EX is
port (D1, D2, D3, D4, D5 : in std_logic;
Q1, Q2 : out std_logic);
end EX;
architecture RTL of EX is
component AND_COMP
generic (TDELAY : time; N : positive);
port (A : in std_logic_vector(N-1 downto 0);
C : out std_logic);
end component;
for all : AND_COMP use entity
work.AND_GATE(RTL);
begin
U1: AND_COMP
generic map (n=>2, TDELAY=>8 ns)
port map (A(0)=>D1, A(1)=>D2, C=>Q1);
U2: AND_COMP
generic map (n=>3, TDELAY=>12 ns)
port map (A(0)=>D3, A(1)=>D4,
A(2)=>D5, C=>Q2);
end RTL;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-26
Behavioral View 의 표현을 위한 구문
병렬적인 수행을 행하도록 정의된 구문 basic signal assignment statement conditional signal assignment statement selected signal assignment statement process statement with many sequential statements concurrent subprogram call statement block statement with guarded signal assignment statement concurrent assert statement
순서적인 수행을 행하도록 정의되 구문 process 구문 , function 또는 procedure 와 같은 subprogram 내에서만 사용
basic signal assignment statement variable assignment statement if statement case statement loop statements : for..loop statement, while loop statement, infinite loop statement next statement, exit statement null statement sequential subprogram call statement wait statement sequential assert statement
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-27
Basic Signal Assignment 구문 예제
Full-Adder 회로와 각 Gate 에 대한 Sensitivity Signal 에 대한 개념 정의
Basic Signal Assignment 구 문 에 의한 Architecture Unit 의 설계
architecture RTL of ADDER is
signal S0, S1 : std_logic;
begin
-- 각 gate 를 signal assignment 구문으로 표현
S0 <= A xor B;
S1 <= A and B;
SUM <= S0 xor CIN;
COUT <= S1 or (S0 and CIN);
end RTL;
AB
CINSUM
COUT
S0
S1
다양한 형태의 Signal Assignment 구문 Aggregate : 하나의 Target Signal
에 여러 개로부터의 Source 값을 Assign 하는 경우
architecture RTL of EX is
signal A : std_logic_vector( 4 downto 0);
signal B : std_logic_vector( 4 downto 0);
begin
A <= (others => ‘0’);
-- A <= “00000”;
-- A <= (‘0’, ‘0’, ‘0’, ‘0’, ‘0’);
B <= (1=>C(2), 3=>C(1), others => D(0));
-- B <= D(0)&C(1)&D(0)&C(2)&D(0);
end RTL;
하나의 Source 값을 여러 개의 Target Signal 에 나누는 경우의 표현 방법에 대하여도 생각하여 보자 .
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-28
Conditional Signal Assignment 구문의 정의와 예제
Syntax 정의와 동작 개념 signal_identifier <= waveform_1 when condition_1 else
waveform_2 when condition_2 else
………………
waveform_(N-1) when condition_(N-1) else
waveform_N ;
D Type Flip-Flop 의 VHDL 표현과 Symbol architecture A2 of DFF is
begin
Q <= ‘0’ when CLR=‘0’ else
D when (CLK=‘0’ and CLK’EVENT) else
Q;
QBAR <= not Q;
end A2;
Data Selector 에 대하여 Conditional Signal Assignment 구문에 의한 표현 MUXOUT <= I0 when (SEL=‘0’) else
I1;
D
CLK
Q
QCLR
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-29
Selected Signal Assignment 구문의 정의와 예제
Syntax 정의와 동작 개념 with expression select
signal_identifier <=
waveform1 when expression_1,
………………...
waveform(n-1) when expression(n-1),
waveform(n) when others ;
1-Bit Half-Adder 에 대한 표현 library IEEE; use IEEE.std_logic_1164.ALL;
entity HA is
port (A, B : in std_logic;
SUM, COUT : out std_logic);
end HA;
architecture RTL of HA is
signal TMP1, TMP2 :
std_logic_vector(1 downto 0);
begin
TMP1 <= A & B;
with TMP1 select
TMP2 <= “00” when “00”,
“01” when “01”,
“01” when “10”,
“10” when others;
(COUT, SUM) <= TMP2;
end RTL;
2*1 MUX 에 대한 표현 library IEEE; use IEEE.std_logic_1164.ALL;
entity MUX21 is
port (SEL, A, B : in std_logic;
C : out std_logic);
end MUX21;
architecture RTL of MUX21 is
begin
with SEL select
C <= A after 10 ns when ‘0’,
B after 10 ns when others;
end RTL;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-30
Process 구문에 대한 정의와 예제
Syntax 정의 [ Label : ] process [ ( Sensitivity_Signals ) ]
-- declaration statements
begin
-- sequential activity statements
end process [ Label ] ;
동작 개념 Sensitivity Signal List 가 있는 경우
Wait 구문을 포함할 수 없다 . Simulation 에 대한 수행 명령과
함께 각 Signal 의 초기값을 갖고 내부 구문에 대한 1 회의 수행을 수행한다 .
수행 완료와 함께 Process 문에 표현된 Sensitivity Signal List 에 포 함 된 Signal 중 어 느 하나라도 Event 가 생기는 가를 검사하여 Event 가 발생하면 Process 문에 대한 Simulation을 다시 수행한다 .
합성 H/W 표현에 이용 권장
Sensitivity Signal List 가 없는 경우 적어도 1 개 이상의 Wait
구문을 포함해야 한다 . Simulation 의 시작과 함께 W
ait 구문을 만날 때까지의 구문을 수행한다 .
Wait 구문을 만나면 해당 조건을 만족할 때까지는 Simulation 을 중지한다 .
Stimulus Vector 표현의 이용 권장
AND Gate 에 대한 표현 process (A, B)
begin
C <= A and B; end process; Sensitivity Signal 이 차이에 따른
문제점 이해 A, B 를 모두 기술한 경우 A 만 기술한 경우
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-31
If 구문에 대한 정의와 사용 예제
Syntax 정의와 동작 개념 if ... then … end if; ( 주의 사항 : Latch 생성 요인이 있음 ) if ... then ... else … end if; Nested if Statements
다음의 Architecture Unit 으로부터 생성되는 파형을 예측하여 보자 .architecture RTL of OSC is
signal CLK : std_logic := ‘0;
begin
process
variable SWITCH : std_logic := ‘0’;
begin
if SWITCH=‘0’ then
CLK <= ‘0’;
else
CLK <= ‘1’;
end if;
SWITCH := NOT SWITCH;
wait for 25 ns;
end process;
end RTL;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-32
Case 구문에 대한 정의와 사용 예제
Syntax 정의와 동작 개념 case EXPRESSION is when EXPRESSION_VALUE_1 => (sequential_statements;) ….. when EXPRESSION_VALUE_(N-1) => (sequential_statements;) when others => (sequential_statements;) end case ;
Truth Table 에 대한 표현에 적합함 1-Bit Half-Adder 에 대한 표현 -1 architecture RTL1 of EX is begin process (A, B) variable TMP1, TMP2 : std_logic_vector(1 downto 0); begin TMP1 := A & B; case TMP1 is when “00” => TMP2 := “00”;
when “01” | “10” => TMP2 := “01”; when others => TMP2 := “10”; end case; (COUT, SUM) <= TMP2; end process; end RTL;
1-Bit Half-Adder 에 대한 표현 -2 Signal 에 Over-Writing 하는 경우
의미 architecture RTL2 of EX is begin p1: process (A, B) variable TMP: std_logic_vector(1 downto 0); begin TMP := A & B; (COUT, SUM) <= “00”; case TMP is when “00” => null; when “01”|”10” => SUM<= ‘1’; when others => COUT <= ‘1’; end case; end process; end RTL2;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-33
For..Loop 구문에 대한 정의와 사용 예제
For..Loop 구문의 Syntax [Label:]
for loop_parameter in discrete_range loop
--sequential statements
end loop [Label] ;
VHDL 표현 예제 -1 process (A) variable sum : signed(7 downto 0); begin sum := (others => ‘0’); for I in 7 downto 0 loop sum := sum + A(I); end loop; sum_out <= sum;end process;
예제 -1 에 대응하는 Flow-Graph을 생각하여 보자 .
동작 속도의 관점에서 효율적인 VHDL 표현을 생각하여 보자 .
VHDL 표현 예제 -2 process (A) variable count : integer; begin count := 8; for LEVEL in 0 to 2 loop count := count / 2; for I in 0 to (count-1) loop A(I) := A(I*2) + A(I*2+1); end loop; end loop; sum_out <= A(0); end process;
discrete_range 표현 방법 integer_expression TO integer_expr
ession integer_expression DOWNTO
integer_expression array_attribute’RANGE array_attribute’REVERSE_RANGE
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-34
Next 와 Exit 구문에 대한 정의와 사용 예제
Next 구문의 Syntax 와 개념 next; next loop_label; next when boolean_expression; next loop_label
when boolean_expression;
예제 LBL1 : process (S)
variable TMP, J : integer := 0;
begin
TMP := 0; J := 0;
A_LOOP: for I in 0 to 7 loop
J := J + 1;
if I > 5 then
next A_LOOP;
end if;
TMP := TMP + 1;
end loop;
end process LBL1;
Exit 구문의 Syntax 와 개념 exit; exit loop_label; exit when boolean_expression; exit loop_label
when boolean_expression;
예제 LBL2 : process (S)
variable SUM, CNT : integer := 0;
begin
SUM:= 0; CNT:= 0;
FIRST: loop
CNT:=CNT+1; SUM:=SUM+CNT;
exit when SUM > 100;
end loop FIRST;
SECOND: loop
CNT:=CNT+1; SUM:=SUM+CNT;
if SUM > 100 then exit;
end loop SECOND;
end process LBL2;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-35
VHDL 의 Test Bench Modeling 의 개념
Test Harness 를 위한 기본 구조
Synthesis 를 목적으로 표현된 Hardware VHDL Model Simulation 을 위한 입력 Data 를 생성하는 Vector Generation VHDL Model
Test Harness 내부에서 생성 Array 에 상수 형태로 저장된 Vector 를 읽으면서 수행 별도의 System File 에 저장된 Vector 를 읽으면서 수행
Simulation Tool 에 의한 계산 값과 설계자의 기대 값을 비교하는 VHDL Model 출력된 파형에 대하여 설계자가 추적하여 Simulation 결과를 판단하는 방식 Simulation 결과를 File 로 출력하는 방식 기대 값과 계산 값을 assert 구문을 비교하여 Pass/Fail 만을 출력하는 방식
TestVectorsFile
ResultsFile
HDL Test Harness
WAVEFORMGENERATON
(may include other partsof modeled hardwaresystem)
Stimulusvectors
MODEL UNDER TESTOne, or possibly morecomponent instantiation(s)of hardware model undertest.
Output vectors
Reference vectors
COMPONENT RESULTS
Compare and possiblygenerate pass /failindication. Pass/fail
indication
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-36
Test Vector 생성에 대한 3 가지 모형과 VHDL 표현
Case1 : 초기화 신호 및 반복적 특성의 Clock 신호 생성
case2 : Random 하게 변화하는 신호의 생성 (1 개의 구문 사용 )
case3 : Random 하게 변화하는 신호의 생성 ( 여러 개의 구문 사용 ) 0
x <= "00", "01" after 50 ns, "10" after 100 ns, "11" after 200 ns, "10" after 220 ns;
00 01 10 11 10
50ns 100ns 200ns 220nstim e
x
0
processbegin a <= '0 '; b <= '1 '; w ait for 50 ns; a <= '1 '; w ait for 70 ns; b <= '0 '; w ait for 100 ns; a <= '0 '; w ait for 50 ns;end process;
50nstim e
b
a
120ns 220ns 270ns
0
clock <= not clock after 20 ns; reset <= '1 ' after 120 ns;
20ns
120nstim eclock
beginsignal clock, reset : std_ logic: = '0 ';
reset
40ns
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-37
Test Vector 생성을 위한 Modeling 예제
--9-value visibility 부여library IEEE; use IEEE.std_logic_1164.ALL;
--entity unit 에 대한 표현entity TB is
port (CLOCK1 : buffer std_logic := ‘0’;
CLOCK2, RESET1, RESET2 : out std_logic ;
ENABLE : out std_logic;
A_DATA, B_DATA : out
std_logic_vector(7 downto 0));
end TB;
--architecture unit 에 대한 표현architecture TB_A of TB is
begin
CLOCK1 <= not CLOCK1 after 20 ns;
RESET1 <= ‘0’, '1' after 100 ns;
process begin
if now = 0 ns then
CLOCK2 <= '0'; wait for 250 ns;
else
CLOCK2 <= '1'; wait for 20 ns;
CLOCK2 <= '0'; wait for 20 ns;
end if;
end process;
process begin
A_DATA <= "00101101";
B_DATA <= "10110110";
wait for 120 ns;
A_DATA <= "11011011"; wait for 30 ns;
B_DATA <= "00001010"; wait for 90 ns;
A_DATA <= "00011011"; wait for 150 ns;
end process;
process begin
if now = 0 ns then
RESET2 <= '0'; ENABLE <= '0';
wait for 50 ns;
else
RESET2 <= '1'; ENABLE <= '1';
wait for 300 ns;
ENABLE <= '0' after 200 ns, '1' after 400 ns;
wait for 800 ns;
RESET2 <= '0', '1' after 150 ns; ENABLE <= '0' after 50 ns;
wait for 200 ns;
end if;
end process;
end TB_A;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-38
Test Vector 생성 Waveform 과 의미 분석
Test Vector 생성을 표현하는 Waveform
생성 신호에 대한 의미 분석 CLOCK1, CLOCK2 와 같이 주기성을 갖는 신호 RESET1, RESET2 와 같이 변화의 빈도가 매우 적은 특징을 갖는 신호 A_DATA, B_DATA 와 같이 변화의 빈도가 많은 특징을 갖는 신호
보편적인 제어 신호와 Data 신호가 해당 Process 구문을 사용한 표현이 적합함
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-39
Spread Spectrum 통신 시스템에 대한 개념도
주요 구성부 Source CODEC Channel CODEC Modulator-Demodulator
Digital lineinterface
amp.
Datacompress ion
E rro rco rrec tion
coding
M odulato r(B P S K ,Q P S K)
P owerAmplifier
C arriersource
S preadingP seudo no ise
sequence source
Analog lineinterface
amp.
A/ Dconvers ion
Lossy R FTransmiss ion
channel
Interference
No ise
Dig ital lineinterface
amp.
Datadecompress ion
E rro rco rrec tiondecoding
Demodulato rP ower
Amplifier
C arriersource
DespreadingP seudo no ise
sequence
Analog lineinterface
amp.
D/ Aconvers ion
P N sequencesynchronizer
uplink
downlink
spec trumspreadin
g
spec trumdespreading
TRANS M ITTE R
RE C E IVE R
digitalinput
analoginput
dig italoutput
analogoutput
optional func tions
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-40
Rectangular Pulse 에 대한 Bandwidth 분석
t
x 1(t)
A 1
Tf0
(A 1T )2
|X 1(f)|2
t
f0+ 1 /Tf0-1 /T
x 2(t)A 2
t
(A 2)2
|X 2(f)|2
tf0-1 / f0+ 1 /f0
Bandwidth for x 2(t) is expanded N tim es that of x 1(t)
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-41
대역 확산의 개념과 Power Density 에 대한 이해
0 Tt
T=N A
- A
High-speed pulses transm itted for a singleinform ation bit tim e duration of T seconds
Before spreading
After spreading
NB- NB - B B
2NB
A2
ff0
2B
A2
Pow er Density of Spectrum Before and After Spreading
DS/ SS : PG=N
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-42
대역 확산과 Frequency Domain 의 관계
SSSSdata N
SPG
N
S
B
W
BN
BA
N
S))(()()(
0
0 J
SSS P
P
WN
WA
N
S
0
1)(
f0
f fB- B 0
A0
2BA1
W
0
PS=A1W =A0B
Channel
f0
f
N 0
W
0
J am m ing S pectrumN 0 W atts/ Hz
P J =N 0W
f0
f
N 0
W
0
Received S pectrum
A1
fB- B 0
A0
2B
Dem odulated S pectrum
Baseband Message S pectrum
RF Message S pectrumS pread S pectrum Modulation
N 0
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-43
Direct-Sequence Spread-Spectrum 시스템
DS/SS System 에 대한 블록 구성도
PN Sequence 에 대한 이해 주기가 15 인 PN Sequence 에 대한 예
PN 신호의 자기 상관 함수 성질에 대한 이해
b(t) c(t) s(t) r(t) c '(t) b '(t)
Up- Conversion Down- Conversion
TX RX
M- ary PS KMapping
M- ary PS KDem apping
spreading code(PN sequence)
C arrier
b(t) c(t) s(t) r(t) c '(t) b '(t)
Up- Conversion Down- Conversion
TX RX
M- ary PS KMapping
M- ary PS KDem apping
spreading code(PN sequence)
despreading code(PN sequence)
C arrier C arrier
주 기1
c (t)
- 1
0
Tc . . . NTc . . .
N = 15 ; {C i, i= 0, . . . , 14}= {1,1,1, - 1,1,1, - 1, - 1,1, - 1,1, - 1, - 1, - 1, - 1}
t
1/ N
NTc
Rc ( )1
0- NTc
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-44
Frequency-Hopping Spread-Spectrum 시스템
FH/SS System 에 대한 블록 구성도
P N sequencegenerator
frequencysynthesizer
F S Kmodulator
frequencymultip lier
widebandB P F
symbol timingrecovery
b(t)
x(t)1
s(t)
(a) transmitterNoncoherent
F S Kdemodulator
local P Nsequencegenerator
frequencysynthesizer
widebandB P F
narrowbandB P F
(f', f ' + )s(t) + no ise
g(t)
j b its
j bits
P N sequencesynchronization
binary output)(tb
(b) receiver
y(t)
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-45
DS/SS-BPSK 송신부 구조와 동작에 대한 이해
기본 블록 구성과 신호 예제
Binary messageb(t)
Binary PN signal c(t)
b(t)c(t)
Modulator (BPSK)
1b(t) -1
0 T 2T 3T
1c(t) -1
0 Tc NTc 2NTc 3NTc
1b(t)c(t) -1
0 Tc NTc 2NTc 3NTc
1s(t) -1
0 Tc NTc 2NTc 3NTc
one period
Assume N=7; T=NTc
DS/SS-BPSK signal
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-46
DS/SS-BPSK 수신부 구조와 동작에 대한 이해
기본 블록 구성과 신호 예제
Local PN signalgenerator
PN signal synchronization
w(t)
carrierrecovery
symbol timing recovery
BPSK demodulator
1
-1
A
-A
NTc NTcNTc
A
-A
+-
w(t)
)'2sin(
)()()(
tf
tctAbts
c
)'2sin( tfc
)( tcTt
t
i
i
dt(.)iZ
it
)( ts
)( tc
1t 2t 3t
'0'or '1'
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-47
DS/SS-QPSK 송신부와 수신부의 기본 구조
송신부에 대한 기본 블록 구성
수신부에 대한 기본 블록 구성
Binary messageb(t)
PN generator1
PN generator2
Modulator (BPSK)
Shift 90'
Modulator (BPSK)
A fc tc o s ( )2
A fc ts in ( )2
C t2 ( )
C t1 ( )
b t c t( ) ( )2
b t c t( ) ( )1
s t2 ( )
s t1 ( )
DS/SS - QPSK signalS t s t s t
A f t tc
( ) ( ) ( )
s in ( ( ) )
1 2
2 2
A f tcs in ( )'2
A f tcc o s ( )'2
s t( )
c t1
( )
c t2 ( )
w t1 ( )
w t2 ( ) u t2 ( )
u t1 ( )
+
-Tt
t
i
i
dt(.)
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-48
DS/SS-QPSK 송신부의 신호 예제를 통한 동작 이해
신호 예제 1b(t) -1
0 T 2T
one period
0 Tc NTc 2NTc
Tc NTc 2NTc 3NTc
1c1(t) -1
1c2(t) -1
1b(t)c1(t) -1
1b(t)c2(t) -1
1s1(t) -1
1s2(t) -1
1s(t) -1
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-49
Differential BPSK 송신부의 기본 구조
Differential BPSK (DBPSK) Modulator 의 기본 구조
동작에 대한 이해 현재의 심벌과 이전 심벌간의 논리 회로의 결과를 출력한다 .
이전 심벌은 지연 소자 (Register) 를 사용하여 기억한다 . 한 심볼 구간 (Tb) 을 지연 시킨 Register 의 출력은 Feedback 한다 .
논리 회로는 XOR 나 XNOR 를 사용하는데 , 현재의 심벌과 이전 심벌간의 위상의 합은 XOR 로 구현한다 .
Level shift block 은 차동 부호화된 심볼 (‘0’ or ‘1’) 을 부호 확장하여 ‘ 1’ or ‘-1’로 변환하는 블록이다 .
차동 부호화된 심벌에 반송 주파수 (carrier Frequency) 를 곱하여 BPSK(Binary Phase-Shift-Keying) 를 하고 대역 통과 필터 (band Pass Filter) 를 취한다 .
수신부에서 Non-Coherent 시스템을 사용하는 경우 수신부 구조의 간결화 가능
Logic gateLevel sh ift
orsign extend
Delayelem ent( T b)
inputstream
carrier frequency
BPF( Band Pass F ilter)
differential encoder
Passbandoutput
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-50
Differential BPSK 수신부의 2 가지 형태의 구조
Differential BPSK (DBPSK) Demodulator non-coherent detection
Differentially Encoded BPSK(DEBPSK) Demodulator coherent detection
Logic gate
Delayelem ent( T b)
BPF( Band pass F ilter)
detection
Receivedsignal
Recoveredsignal
DBPS K dem odulator
T
0
BPF( Band pass F ilter)
Receivedsignal
DEBPS K dem odulator
CarrierRecovery
detection
T
0Logic gate
Delayelem ent( T b)
Recoveredsignal
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-51
DS/SS 시스템의 송신기에 대한 기본적 Block Diagram
Base Band Modulator
U pC onverter
D / AVec tor
ModulatorSpreader
DataE nc oder
PNG enerator
PowerC ontrol
RF O utput
ModulatorData Spreader
DataInput
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-52
본 강좌에서 설계하는 Base Band Modem 의 개요
기본적인 특징 DQPSK 방식의 변조와 복조 : Non-coherent Demodulation 대역 확산을 위한 생성 다항식 : 역 확산 방식 : Matched filter 를 사용
시스템 구성과 입출력 신호
g (x )= x 3+ x+ 1
Transm itte rB lock
R ece ive rB lock
Information Data
TX Reset
TX C lock
Recovered Data
Recovered C lock
RXReset
RXC lock
TX Out
RX In
6
6
TX RequestC lock
C hannel
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-53
송신부에 대한 개념에 따른 구성 요소 추출
송신부의 구성 요소 입력 신호에 대한 I, Q Channel 분리의 기능 Differential Encoding 의 기능 PN-Code 를 이용한 대역 확산의 기능 확산된 신호에 대하여 QPSK Modulation 을 수행하여 6-Bit 의 값을 생성하는
기능 송신부에서 요구되는 내부 Clock 신호를 생성하는 기능
송신부의 VHDL 표현을 위한 Design Tree 구성 Behavioral Modeling 을 행하는 Block Name
S2P, DIFF_ENC, SPREAD, QPSK_MOD, TX_CLK
Structural Modeling Block 을 행하는 Block Name DQPSK_ENC, TX_BLK, 송신부에 대한 Test Bench Block
S eria l toP ara lle l
D iffe ren tia lE ncoder
Q P S KM odu la to r
S pread ingB lock
D Q P S K M apper
TX Inpu tD a ta
TXOut
Transm itte r C lock G enera to r
B itC lock
S ym bo lC lock
C h ipC lock
B it C lock
TX C lock
6
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-54
설계 -1 : Serial-to-Parallel 블록에 대한 개념 설계
기능의 정의 직렬 정보를 I, Q 병렬 정보로 분류
동작을 위한 Timing Diagram
S0
bclk
sclk
tmp
q_ch
info S1 S2 S3 S4 S5 S6 S7 S8 S9
S0 S2 S4 S6 S8
S1 S3 S5 S7
S0 S2 S4 S6 S8I_ch
S9
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-55
설계 -1 : Serial-to-Parallel 블록에 대한 구조 설계
RTL H/W 설계
Entity Unit 의 설계 library IEEE; use IEEE.std_logic_1164.ALL; entity S2P is port ( SCLK : in std_logic;
RESET, INFO : in std_logic; I_CH, Q_CH : out std_logic); end S2P;
Architecture Unit 의 설계 2 개의 Process 구문을 사용 signal object 의 사용과 선언
process (RESET, SCLK) begin if RESET = '0' then TMP <= '0'; elsif SCLK=’1' and SCLK'event then TMP <= INFO; end if; end process; process (RESET, SCLK) begin if RESET='0' then I_CH <= '0'; Q_CH <= '0'; elsif SCLK='0' and SCLK'event then I_CH <= TMP; Q_CH <= INFO; end if; end process;
INFO I_CH
Q_CH
SCLK
D Q
D QD Q
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-56
설계 -2 : Differential Encoding 블록에 대한 개념 설계
Gray-code Labeling (QPSK)
DQPSK 를 위한 Encoding Rule
I k Qkin in( ), ( ) I k Q kout out( ), ( ) 1 1
symbol 위상symbol 위상symbol 위상symbol 위상
symbol 위상 (00) 0 (01) 2 (11) (10) 2
(00) 0 (00) 0 (01) 2 (11) (10) 2
(01) 2 (01) 2 (11) (10) 2 (00) 0
(11) (11) (10) 2 (00) 0 (01) 2
(10) 2 (10) 2 (00) 0 (01) 2 (11)
πM
xnnn 2modulo ,2
1
00
01
11
10
I
Q
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-57
설계 -2 : Differential Encoding 블록에 대한 구조 설계
FSM 형태의 H/W 로 표현
Entity Unit 의 설계 library IEEE; use IEEE.std_logic_1164.ALL; entity DIFF_ENC is port ( RESET, SCLK : in std_logic; I_CH, Q_CH : in std_logic; D_I_CH, D_Q_CH : out std_logic); end DIFF_ENC;
Architecture Unit 의 설계 2 개의 Process 구문을 사용
을 기억하는 2-bit register 에 의하여 을
결정
case 구문에 의한 N_STATE 결정
(D_I_CH,D_Q_CH) <= N_STATE; IQ_IN <= I_CH & Q_CH; process (C_STATE, IQ_IN) begin case C_STATE is when “00” => case IQ_IN is when “00” => -- 중간 생략되었으므로 각자 표현할 것 end case; -- 중간 생략되었으므로 각자 표현할 것 when others => -- 중간 생략되었으므로 각자 표현할 것 end case; end process;
1n 1, nnx n
0111
10
00
00
000001
10
11
11
01
10
10
01
1111
01
10
00
rese t = '0 'IN P U T : I_ in & Q _ in
sta te : I_ o u t & Q _ o u t
Differential Encoding state diagram
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-58
설계 -3 : DQPSK Encoder 에 대한 Structural Modeling 설계
블록 구성에 대한 표현
Architecture Unit 의 VHDL 표현 사용할 component 선언 component 사이 연결 signal
선언 component configuration 선언
전체적인 VHDL 표현 library IEEE; use IEEE.std_logic_1164.ALL; entity DQPSK_ENC is port ( RESET, SCLK : in std_logic; INFO : in std_logic; I_CH, Q_CH : out std_logic); end DQPSK_ENC;
architecture RTL of DQPSK_ENC is component S2P port ( SCLK : in std_logic; RESET, INFO : in std_logic; I_CH, Q_CH : out std_logic); end component; component DIFF_ENC port ( RESET, SCLK : in std_logic; I_CH, Q_CH : in std_logic; D_I_CH, D_Q_CH : out std_logic); end component; signal I_CH_S, Q_CH_S: std_logic; for u0 : S2P use entity work.S2P(RTL); for u1 : DIFF_ENC use entity work.DIFF_ENC(RTL); begin u0 : S2P port map ( SCLK, RESET, INFO, I_CH_S, Q_CH_S ); u1 : DIFF_ENC port map ( RESET, SCLK, I_CH_S, Q_CH_S, I_CH, Q_CH ); end RTL;
S2P DIFF_ENCI_CH
Q_CH
INFO
SCLK
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-59
설계 -4 : PN Code 에 의한 대역 확산부의 구조 설계
대역 확산 개념 설계 PN Code 의 생성 :
RTL H/W 설계spread ing code
8-b it sh ift reg is te rch ip c lock
I
Q
È®»ê I-D ata
È®»ê Q -D ata
rese t1100 0 011
prim itive po lynom ia l o f degree m = 3g(x)= x 3+ x+ 1
P N code output sequence : 0100111
R egisters 's in itia l va lue : 111
C lock P u lse S tate
111
011
001
100
010
101
110
0
1
2
3
4
5
6
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-60
PN Code 의 Auto-correlation 특성
length=7; signal mapping =(1,-1)
length=8; signal mapping =(1,-1)
length=7; signal mapping =(3,-4)
length=8; signal mapping =(3,-4)
5 10 15 20 25 30 35-15
-10
-5
0
5
10
15
20
25
6 8 10 12 14 16 18 20 22 24 26
-4
-2
0
2
4
6
8
5 10 15 20 25-5
0
5
10
15
20
25
5 10 15 20 25
-1
0
1
2
3
4
5
6
7
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-61
설계 -4 : PN Code 에 의한 대역 확산부의 VHDL 설계
Entity Unit 의 설계 library IEEE; use IEEE.std_logic_1164.ALL; entity SPREAD is port ( RESET, CCLK : in std_logic;
I_IN, Q_IN : in std_logic; I_OUT, Q_OUT : out std_logic); end SPREAD;
Architecture Unit 의 설계 PN Code Shift-Register 의 표현
Process 구문을 사용 2 개의 XOR Gate 의 표현
Data Flow 구문을 사용
architecture RTL of SPREAD is signal PN_CODE : std_logic_vector(7 downto 0); begin-- 2 개의 XOR Gate 를 위한 표현 I_OUT <= I_IN xor PN_CODE(0); Q_OUT <= Q_IN xor PN_CODE(0); -- Shift Register 를 위한 표현 process ( RESET, CCLK ) begin if RESET = '0' then PN_CODE <= "01001110"; elsif CCLK = '0' and CCLK'event then -- Rotate Right Operation -- 출력되는 PN_Code 의 순서에 유의 PN_CODE <= PN_CODE(0) & PN_CODE(7 downto 1); end if; end process; end RTL;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-62
설계 -5 : QPSK 변조 블록에 대한 구조 설계
QPSK 변조를 위한 기본 수식과 위상 분포
QPSK 변조부 설계를 위한 Micro-Architecture 회로도 설계
s t S t t S t tI n c o Q n c o( ) ( ) c o s ( ) ( ) s i n ( )
A tc o s ( )
A S t S tI Q ( ) ( )2 2
t a n( )
( )1 S t
S tQ
I
I-channel
Q-channel
(0,0)(1,0)
(1,1) (0,1)
sin nco t
cos nco t
-cos nco t
cos sin nco ncot t
cos nco t
sin-cos nco ncot t
sin nco t sin
nco t
6
cos
-cos
sin
-sin
offset binary/2's complement
5
5
5
5
5
5
txifout6 d
ivid
er
6
MSB
LSB0
txifclk
mux0
12x1mux
2x1mux
0
1
0
1
SI(t)
SQ(t)
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-63
설계 -5 : QPSK 변조 블록에 대한 VHDL 설계
Entity Unit 의 설계 library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.std_logic_unsigned.”+”; entity QPSK_MOD is port (SI, SQ : in std_logic; SIN, COS : in std_logic_vector(4 downto 0); TX_OUT : out std_logic_vector(5 downto 0)); end QPSK_MOD; Architecture Unit 의 설계
process 구문과 concurrent 구문을 사용
concurrent 구문만을 사용 process 구문 1 개만을 사용
architecture RTL of QPSK_MOD is signal TX_I, TX_Q : std_logic_vector(4 downto 0); signal TX_TMP : std_logic_vector(5 downto 0); begin
process (SI, COS) begin if SI= '0' then TX_I <= COS; else TX_I <= not(COS) + 1; end if; end process; process (SQ, SIN ) begin if SQ = '0' then TX_Q <= SIN; else TX_Q <= not(SIN) + 1; end if; end process; TX_TMP <= (TX_I(4)&TX_I)+ (TX_Q(4)&TX_Q); TX_OUT <= TX_TMP(5 downto 0); end RTL;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-64
설계 -6 : Sine, Cosine 의 디지털 신호 생성부에 대한 개념 설계
기본 목적 의 system clock 을 사용하여 의 sine 및 cosine 신호
발생 = ( * FCW) / 샘플링 수
Sine, Cosine 신호 생성을 위한 ROM table 을 구성하기 위한 개념
Address 생성부와 Sine, Cosine 값 생성부 표현을 위한 개념 설계
NCOf ifclkfifclkf NCOf
4 bit
cos
sin
5bit
address
rom_ table
address4
sin_ table
cos_ table
sin_out
cos_ out
5
5
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-65
설계 -6 : Sine, Cosine ROM Table 구성을 위한 자료 추출
Sine Table
Sine, Cosine 값의 검증
Cosine Table
"00000", "00110", "01011", "01110", "01111", "01110", "01011", "00110","00000", "11010", "10101", "10010","10001", "10010", "10101", "11010"
"01111", "01110", "01011", "00110", "00000", "11010", "10101", "10010","10001", "10010", "10101", "11010""00000", "00110", "01011", "01110"
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-66
설계 -6 : Sine, Cosine 의 디지털 신호 생성부 구조와 VHDL 설계
개념 설계에 따른 DDFS 의 블록 구성도
VHDL 설계의 방향 Sine, Cosine 에 대한 Table 을 ROM 으로 표현하고 , System Clock 의 변화에
따라 1 회씩 Read 하여 16-Clock 에 1 주기를 Read 한다 . 생성된 Data 에 대한 변형을 행하여 QPSK Modulation 블록으로 출력한다 .
+
reg
4
4
sine, coslook up
tablecos
sin
phase accumulator
FC W
5
5
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-67
설계 -7 : Clock 분주기에 대한 구조 설계
송신부에서 요구되는 Clock 에 대한 정의 Bit Rate : 36Kbps ( 가정 ) Symbol Rate : 18Kbps (Bit Rate / 2) Chip Rate : 144Kbps (symbol Rate * PN_Code_Length) System Rate : 2304Kbps (Chip Rate * (1- 주기 Sampling 횟수 ))
Counter 에 의한 RTL H/W 설계 동기식 Counter 또는 Ripple Counter 등의 Counter 종류 결정 동기식 Counter : State Machine 형태 또는 + ‘1’ 연산을 이용 Ripple Counter : 하나의 Flip-Flop 을 설계하고 , Generate 구문을 이용 Ring 또는 Johnson 형태의 Counter : & Operator 를 이용
본 강좌에서 사용하는 Counter +1 연산을 이용한 MOD-128 동기식 Counter
Entity Unit 의 설계 library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.std_logic_signed.ALL; entity TX_CLK is port ( RESET, SYS_CLK : in std_logic;
BCLK, SCLK, CCLK : out std_logic); end TX_CLK;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-68
설계 -7 : Clock 분주기에 대한 VHDL 설계
+1 연산을 이용한 설계 계수 State 가 많은 경우에
표현이 보다 간결함 architecture RTL of TX_CLK is signal TMP1, TMP2: std_logic_vector(6 downto 0); begin TMP1 <= TMP2 + 1; process (RESET, SYS_CLK) begin if (RESET=’0’) then TMP2 <= “1111111”; elsif (SYS_CLK=’0’ and SYS_CLK’EVE
NT) then TMP2 <= TMP1; end if; end process; (SCLK, BCLK) <= TMP2(6 DOWNTO 5); CCLK <= TMP2(3); end RTL;
State Machine 을 이용한 설계 architecture RTL1 of TX_CLK is signal C_STATE, N_STATE :
std_logic_vector(6 downto 0); begin process ( RESET, SYS_CLK ) begin if RESET = '0' then C_STATE <= "1111111"; elsif SYS_CLK = '0' and SYS_CLK'event the
n C_STATE <= N_STATE; end if; end process; process ( C_STATE ) begin case C_STATE is when "0000000" => N_STATE<=”000000
1"; -- 중간 생략되어 있으므로 각자 표현할 것 when others => N_STATE<="0000000"; end case; end process; (SCLK, BCLK) <= C_STATE(6 DOWNTO 5); CCLK <= C_STATE(3); end RTL1;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-69
설계 -8 : 송신부에 대한 Structural Modeling 설계
송신부에 대한 VHDL 설계 5 개의 Component 를 연결하는 Stru
ctural Modeling 을 행한다 . library IEEE; use IEEE.std_logic_1164.ALL; entity TX_BLK is port ( RESET, SYS_CLK, INFO : in std_logic;
BCLK : out std_logic; TX_OUT : out std_logic_vector(5 downto 0);
end TX_BLK; -- Architecture 에 대한 Structuring Modeling
architecture RTL of TX_BLK is component TX_CLK port ( RESET, SYS_CLK : in std_logic; BCLK, SCLK, CCLK : out std_logic); end component; -- 다른 4 개의 COMPONENT 에 대한 선언도 -- 기술한다 .
-- Component 연결을 위한 Wire 에 대한 선언 -- 을 행한다 .
signal BCLK_S, SCLK_S, CCLK_S : std_logic; signal I_CH_S, Q_CH_S, I_CH, Q_CH : std_logic; signal SIN, COS : std_logic_vector(4 downto 0);
-- Component Configuration 을 위한 표현 for u0 : TX_CLK use entity work.TX_CLK(RTL); for u1 : DQPSK_ENC use entity work.DQPSK_ENC(RTL); for u2 : SPREAD use entity work.SPREAD(RTL); for u3 : QPSK_MOD use entity work.QPSK_MOD(RTL); for u4 : DDFS use entity work.DDFS(RTL); begin BCLK <= BCLK_S; u0 : TX_CLK port map ( RESET, SYS_CLK, BCLK_S, SCLK_S, CCLK_S ); u1 : DQPSK_ENC port map ( RESET, SCLK_S, INFO, I_CH_S, Q_CH_S ); u2 : SPREAD port map ( RESET, CCLK_S, I_CH_S, Q_CH_S, I_CH, Q_CH ); u3 : QPSK_MOD port map ( I_CH, Q_CH, SIN, COSIN, TX_OUT ); u4 : DDFS port map (SYS_CLK, RESET, SIN, COS ); end RTL;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-70
설계 -9 : 송신부 검증을 위한 임의 신호 생성부 설계
임의 송신 신호 생성을 위한 개념 20-Bit 상수 Data 를 Right Rotate 시키면서 1-Bit 단위로 신호 생성
VHDL 설계 library IEEE; use IEEE.std_logic_1164.ALL; entity RANDOM is port ( RESET, BCLK: in std_logic; RANDOM_OUT: out std_logic); end RANDOM; architecture RTL of RANDOM is signal TMP : std_logic_vector(19 downto 0); begin process ( RESET, BCLK ) begin if RESET = '0' then TMP <= "11000010101110101101"; elsif BCLK = ’1' and BCLK'event then TMP <= TMP(0) & TMP(19 downto 1); end if; end process; RANDOM_OUT <= TMP(0); end RTL;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-71
설계 -10 : 송신부 검증을 위한 Test Bench 에 대한 설계
본 설계에서 사용한 Test Bench
Test Bench 에 대한 VHDL 설계 library IEEE; use IEEE.std_logic_1164.ALL; entity TB_TX is end TB_TX; architecture RTL of TB_TX is component TX_BLK port ( RESET,SYS_CLK,INFO : in std_logic; BCLK : out std_logic; TX_OUT : out std_logic_vector(5 downto 0)); end component;
component RANDOM port ( RESET, BCLK : in std_logic; RANDOM_OUT : out std_logic); end component; signal RESET, SYS_CLK : std_logic := ‘0’; signal INFO, BCLK_S : std_logic; signal TX_OUT : std_logic_vector(5 downto 0); for u0 : TX_BLK use entity work.TX_BLK(RTL); for u1 : RANDOM use entity work.RANDOM(RTL); begin RESET <= '1' after 20 ns; SYS_CLK <= not SYS_CLK after 3 ns; u0 : TX_BLK port map ( RESET, SYS_CLK, INFO, BCLK_S, TX_OUT ); u1 : RANDOM port map ( RESET, BCLK_S, INFO ); end RTL; configuration TB_TX_C of TB_TX is for RTL end for; end TB_TX_C;
TX_BLK
rese t
random
sys_clk
b it_ c lk
in fo
tx_ou t
6
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-72
설계 -10 : 송신부에 대한 Simulation 결과
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-73
DS/SS 시스템의 수신기에 대한 기본적 Block Diagram
Base Band Demodulator
DownC onverter
A/ D
LANInterfac e
RF Input
Spread Spec trum Rec eiver
DataDec oder
De-Spreader
Vec torDem odulator
Tim ingG enerator
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-74
Base Band Receiver 의 개념에 따른 구성 요소 추출
구성 요소 Complex Multiplier 에 의한 IF Carrier Frequency 에 대한 제거 Matched Filter 를 사용한 역 확산 (De-Spreading) 의 기능 PN Code 동기에 따른 Symbol Clock 신호 생성 기능 DQPSK Demodulation 의 기능 병렬로 복원된 신호를 직렬 신호로 변경하는 기능 수신부에서 요구되는 내부 Clock 신호를 생성하는 기능
M atc hed
F ilter
M atc hed
F ilter
P ower
Detec tor
DQ P S K
Demodulator
P arallel
to
S erial
Integrated
&
Dump
F ilter
C omplex
M ultip lier
Receiver C lock G enerator
chip
c lock
detect
symbolc lock
bitc lock
7
7
7
7
3
3
RXIn
RXC lock
RX O ut
B itC lkRX
Reset
6
N C O
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-75
설계 -12 : Down Conversion 기능의 개념 설계
Complex Multiplier 설계를 위한 수식 송신 신호 :
정보 신호의 위상과 국부 반송파를 분리하기 위한 수식 (DSB 경우 )
정보 신호의 위상과 국부 반송파를 분리하기 위한 수식 (SSB 경우 ) Real 의 수신신호 를 Complex Number 로 변환하여
처리하여야 함 . : Hilbert Transform
)cos()]sin()()cos()([)cos()()( wtwttcQwttcIwttRXINtd
I
)sin()()cos()()( wttQ
SwttIStTXOUT
)(sin2
)(cos
2
)(ComponentsFrequencyDouble
tC
QtC
I
))]sin(sin()()cos()([)sin()()( wtwttC
QwttC
IwttRXINtd
Q
)(cos2
)(sin
2
)(ComponentsFrequencyDouble
tC
QtC
I
)cos()]sin()()cos()([)sin()()cos()()( wtwttC
QwttC
IwttinQwttinItd
I
))]sin(sin()()cos()([ wtwttC
IwttC
Q sin)(cos)( tC
QtC
I
))]sin(sin()()cos()([)cos()()sin()()( wtwttC
QwttC
IwttinQwttinItd
Q
)cos()]sin()()cos()([ wtwttC
IwttC
Q cos)(sin)( tC
QtC
I
)(tRXIN )()( tinjQtinI
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-76
설계 -12 : Complex Multiplier 의 구조 설계
Complex Multiplier 에 대한 Micro-Architecture 회로 설계
ALTERA FLEX10K 에서 8 비트 곱셈기가 덧셈기 보다 약 10 배 크다 .
)]cos()sin([
)]sin()cos([
))sin()(cos()(
wtQwtIj
wtQwtI
wtjwtjQI
inin
inin
inin
210d21d
21
0
Q I
)sin()cos(
))sin()(cos()(
MMMMM
wtQMwtIM
wtwtQIM
inin
inin
I in
Q in
Id
Q d
0M
)cos(wt
2M
21 MM
1M
)sin(wt
X
X
X
X
+
+
)sin(wt )cos(wt
Iin
Q in
+
-
++
Id
Q d
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-77
설계 -12 : Integrate and Dump Filter 기능의 구조 설계
Integrate and Dump Filter 에 대한 Micro-Architecture 회로 설계 1-Chip 구간에 대하여 16 회 Integrate 하여 Data 로 추정하고 , Dump 하는 기능
VHDL 설계에 대한 고찰 Mod-16 Counter 에 대한 설계 : System Clock 에 의하여 Count 되는 회로 Accumulate 및 Dump 기능을 갖는 회로에 대한 설계 Adder 기능에 대한 설계 출력 값을 Window 설정에 따라 출력하는 기능에 대한 설계
+ dumpreg
Barrel Shifter(C O UNT=1111)
+ dumpreg
Barrel Shifter(C O UNT=1111)
4- bitdump
countersys_ c lk
Id
Q d
12
12
14
14
3
3
3
3
D I windowposition
DQ windowposition
I_ ch
Q _ ch
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-78
설계 -13 : 수신부 NCO 설계를 위한 Sine, Cosine ROM Table 자료
Sine Table Cosine Table
"000000", "001100", "010110","011101", "011111", "011101","010110", "001100", "000000","110100", "101010", "100011","100001", "100011", "101010","110100"
"011111", "011101", "010110", "001100", "000000", "110100","101010", "100011", "100001","100011", "101010", "110100" "000000", "001100", "010110","011101"
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-79
설계 -13 : 수신부 NCO 설계에 대한 구조 설계
NCO 에 대한 블록 구성도
VHDL 설계에 대한 고찰 송신부의 DDFS 와 동일한 개념으로 설계 : 차이점은 ROM Bit 임에 유의할 것 향후 Timing Recovery Block 과의 Interface 를 위한 기능의 설정 요구
+
reg
4
4
sine, coslook up
tablecos
sin
phase accumulator
FC W
6
6
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-80
설계 -14 : 역 확산을 위한 Matched Filter 구조 설계
역 확산을 위한 기본 수식과 개념
송신부에서 전송하는 Information Data 가 ‘ 0’ 인 경우 와 Information Data 가 ‘ 1’ 인 경우에 대한 Filter 출력 값에 대한 판단
Matched Filter 설계를 위한 Micro-Architecture 회로 설계
IIISUM PNCodeDMF 7
0QQQsum PNCodeDMF
7
0
reg7 reg6 reg5 reg4 reg3 reg2 reg1 reg0
MUX
mux
PN
_reg
8
+
0
1
match_ in
cc lk
cc lkx8
count8='0' cc lkx8
match_out
3
4
7
count8='7'
cc lkx8
7
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-81
설계 -14 : 역 확산을 위한 Matched Filter 의 VHDL 설계 (1)
Entity 에 대한 VHDL 표현 library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.std_logic_signed.ALL; use work.PACK_MATCH.ALL; entity MATCH_FILTER is port ( RESET, CCLK,CCLKX8 : in std_logic; MATCH_IN: in std_logic_vector(2 downto 0);
MATCH_OUT: out std_logic_vector(6 downto 0)); end MATCH_FILTER; Architecture Unit 에 대한 VHDL 설계를 위한 기본 방향
8 개의 3-Bit Shift Register 에 대한 표현 하나의 Process 구문을 이용하여 표현 가능함
PN Code 값에 따른 3-Bit Register 값의 4-Bit 로의 변형 Package Unit 에 Function 으로 표현하고 , Function Call 구문을 사용
CHIP Clock 보다 8 배 빠른 Clock 을 이용하여 8 개의 Register 를 차례대로 곱함 최종 출력단의 Bit 수를 고려하여 , 8 번 Dump 과정에서 덧셈 수행에 있어서 4-Bit
Data 를 7 Bit 로 Sign Extend 덧셈 Sign Extend 의 이유와 방법에 주의하여 표현 최종 출력에 있어서 8 번 덧셈이 정확히 수행되었는지를 주의깊게 관찰
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-82
설계 -14 : 역 확산을 위한 Matched Filter 의 VHDL 설계 (2)
Entity 에 대한 VHDL 표현 SIGNAL shift_reg0, shift_reg7 : STD_LOGIC_VECTOR(2 DOWNTO
0);
SIGNAL shift_reg6, shift_reg5 : STD_LOGIC_VECTOR(2 DOWNTO 0);
SIGNAL shift_reg4, shift_reg3 : STD_LOGIC_VECTOR(2 DOWNTO 0);
SIGNAL shift_reg2, shift_reg1 : STD_LOGIC_VECTOR(2 DOWNTO 0);
SIGNAL pn_reg : STD_LOGIC_VECTOR(7 DOWNTO 0);
SIGNAL mul8_reg : STD_LOGIC_VECTOR(2 DOWNTO 0);
SIGNAL pn_code : STD_LOGIC;
SIGNAL mul_out : STD_LOGIC_VECTOR(3 DOWNTO 0);
SIGNAL sum_in : STD_LOGIC_VECTOR(6 DOWNTO 0);
SIGNAL sum_out : STD_LOGIC_VECTOR(6 DOWNTO 0);
SIGNAL count8 : STD_LOGIC_VECTOR(2 DOWNTO 0);
BEGIN
PROCESS ( reset, cclk )
BEGIN
IF reset = '0' THEN
shift_reg7 <= ( OTHERS => '0' );
shift_reg6 <= ( OTHERS => '0' );
shift_reg5 <= ( OTHERS => '0' );
shift_reg4 <= ( OTHERS => '0' );
shift_reg3 <= ( OTHERS => '0' );
shift_reg2 <= ( OTHERS => '0' );
shift_reg1 <= ( OTHERS => '0' );
shift_reg0 <= ( OTHERS => '0' );
ELSIF cclk = '1' AND cclk'EVENT THEN
shift_reg0 <= shift_reg1;
shift_reg1 <= shift_reg2;
shift_reg2 <= shift_reg3;
shift_reg3 <= shift_reg4;
shift_reg4 <= shift_reg5;
shift_reg5 <= shift_reg6;
shift_reg6 <= shift_reg7;
shift_reg7 <= match_in;
END IF;
END PROCESS;
pn_reg <= "00100111";
PROCESS (count8)
BEGIN
CASE count8 IS
WHEN "000" => pn_code <= pn_reg(0);
WHEN "001" => pn_code <= pn_reg(1);
WHEN "010" => pn_code <= pn_reg(2);
WHEN "011" => pn_code <= pn_reg(3);
WHEN "100" => pn_code <= pn_reg(4);
WHEN "101" => pn_code <= pn_reg(5);
WHEN "110" => pn_code <= pn_reg(6);
WHEN OTHERS => pn_code <= pn_reg(7);
END CASE;
END PROCESS;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-83
설계 -14 : 역 확산을 위한 Matched Filter 의 VHDL 설계 (3)
PROCESS (count8)
BEGIN
CASE count8 IS
WHEN "000" => mul8_reg <= shift_reg0;
WHEN "001" => mul8_reg <= shift_reg1;
WHEN "010" => mul8_reg <= shift_reg2;
WHEN "011" => mul8_reg <= shift_reg3;
WHEN "100" => mul8_reg <= shift_reg4;
WHEN "101" => mul8_reg <= shift_reg5;
WHEN "110" => mul8_reg <= shift_reg6;
WHEN OTHERS => mul8_reg <= shift_reg7;
END CASE;
END PROCESS;
mul_out <= two_mul (mul8_reg, pn_code);
PROCESS (reset, cclkx8)
VARIABLE tmp_sum : STD_LOGIC_VECTOR(6 DOWNTO 0);
BEGIN
IF reset <= '0' THEN
sum_out <= (OTHERS => '0');
count8 <= (OTHERS => '1');
match_out <= (OTHERS => '0');
ELSIF cclkx8 = '0' AND cclkx8'EVENT THEN
count8 <= count8 + 1;
IF count8 = 0 THEN
tmp_sum :=(mul_out(3)&mul_out(3)&mul_out(3)&mul_out);
ELSE
tmp_sum := mul_out + sum_out;
END IF;
IF count8 = 7 THEN
match_out <= tmp_sum ;
END IF;
sum_out <= tmp_sum;
END IF;
END PROCESS;
END matched_a;
요구되는 Package 와 Function Unit에 대한 설계를 행할 것 Function Name : Two_Mul Package Name : Pack_Match
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-84
설계 -15 : Power Detection 블록을 위한 구조 설계
Power magnitude 의 검출을 위한 수식 기본식 :
근사식 :
Power Detection 블록에 대한 Micro-Architecture 의 설계
Threshold Register 의 값은 MCU 에 의하여 Programmable 하여야 한다 . 본 강좌에서는 내부 Constant 로 설정한다 . Threshold 값보다 큰 경우의 Detect 신호는 Active-Low 로 설정한다 .
22QSUMISUM MFMFMag
)}(),({21
)}(),({
QSUMISUM
QSUMISUM
MFAbsMFAbsMin
MFAbsMFAbsMaxMag
ABS7
7
MF I sum
ABS
MagnitudeGenerator
Com parator
ThresholdRegister
OutputRegister
MFQ sum
7
7
7
7
7
7
7
7
detect
I sum
Qsum
detect
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-85
설계 -15 : Power Detection 블록을 위한 VHDL 설계 (1)
Entity Unit 의 설계 library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.std_logic_signed.ALL; entity DETECT is port ( RESET, CCLK : in std_logic; MAT_ISUM, MAT_QSUM : in std_logic_vector(6 downto 0); MAT_IOUT, MAT_QOUT : out std_logic_vector(6 downto 0); DET : out std_logic); end DETECT;
Architecture Unit 의 설계를 위한 방향 설정 Magnitude 를 계산하는 블록 : Process 구문을 사용
ABS Function 을 이용하여 절대값을 구함 2 개의 절대값에서 큰 값과 적은 값을 결정함 ( 최대값 + 1/2* 최소값 ) 의 식에 따라 Magnitude 값을 결정함
Detect 신호를 생성하는 블록 : Process 구문을 사용 설계자가 설정한 임계 값과 비교하여 Detect 신호를 Active-Low 로 생성함 Detect 신호가 생성되는 순간의 Matched Filter 출력을 저장하는 기능 수행
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-86
설계 -15 : Power Detection 블록을 위한 VHDL 설계 (2)
architecture RTL of DETECT is signal MAG: std_logic_vector(6 downto 0);begin process(MAT_ISUM, MAT_QSUM) variable I_V, Q_V, T_MAX, T_MIN: std_logic_vector(6 downto 0); begin-- 절대값을 생성하는 구문 I_V := abs(MAT_ISUM); Q_V := abs(MAT_QSUM);-- 최대값과 최소값을 생성하는 구문 if I_V > Q_V then T_MAX := I_V; T_MIN := Q_V; else T_MAX := Q_V; T_MIN := I_V; end if; MAG <= T_MAX + (‘0’&T_MIN(6 downto 1)); end process;
process ( CCLK, RESET ) constant HOLD: std_logic_vector(6 downto 0) :=”011110
0"; begin if RESET = '0' then DET <= ’1'; MAT_IOUT <= (others => '0'); MAT_QOUT <= (others => '0'); elsif CCLK='0' and CCLK'event then if MAG > HOLD then DET <= ’0'; MAT_IOUT <= MAT_ISUM;
MAT_QOUT <= MAT_QSUM; else DET <= ’1'; end if; end if; end process; end RTL;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-87
설계 -16 : Differential Demodulation 블록의 개념 설계 (1)
현재 symbol 과 이전 symbol 사이의 위상차에 대한 정의
Power Detection 블록의 출력 I(k) 와 Q(k) 를 복소수 형태로 표현
에 대한 계산 과정
= Dot(k) + j Cross(k)
)()1()( kkk inoutout
)()()( kjin ekAkS
)()()( 22 kQkIkA ))(
)((tan)( 1
kI
kQk
)1()( kk outout ))1((
)1()1()()()( fixedkj
ekAkinSkjekAkinS
))1()((
)1()()]1([)()( fixedkkj
ekAkAkinSkinSkoutS
))(
mod(
)1()( fixedkj
ekAkA
))(mod
sin()1()())(mod
cos()1()(fixed
kkAkjAfixed
kkAkA
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-88
설계 -16 : Differential Demodulation 블록의 개념 설계 (2)
Dot 와 Cross 로 정의된 값에 대한 식
의 각 경우에 대하여 에 따른 Dot, Cross 의 값
)(mod k
( A 2, A 2 )
Dot(k)
jCross(k)(-A 2, A 2 )
( -A 2, -A 2 )( A 2, -A 2 )
0 도90 도
180 도 270 도
))(mod
cos()1()()(fixed
kkAkAkDot
))(mod
sin()1()()(fixed
kkAkAkCross
0,4
,4
fixed
45fixed
)(mod k )(kDot )(kCross
0
90
180
270
45fixed
)(kDot)(kCross2A
2A
2A2A 2A2A
2A 2A
2A2A
2A
2A
2A 2A2A2A
0fixed
)(kDot )(kCross2A
2A2A
2A
0
0
0
0
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-89
설계 -16 : Differential Demodulation 블록의 구조 설계
Symbol 회전을 위한 구성식과 Micro-Architecture 의 설계
Dot, Cross 의 생성을 위한 구성식과 Micro-Architecture 의 설계
Ik
Q k
Irot(k)
Q rot(k)
+
-
7
7
7
7
Ik
Q k
1 - j ( - 450 ro tation)
Dot
C rosstdelay
registersymbolrotator
7
7
Ik
Q k
Ik- 1
Q k- 1
15
15
X
X
X
X
+-
+
+
)1)(())(),(( jk
jQk
IkrotQkrotI
)()(
)()(
krotjQkrotIk
Ik
Qjk
Qk
I
)()(
))1()1(())1()1((
))1()1()((
)]1()1()[())(),((
kjCrosskDot
krotQk
IkrotIk
QjkrotQk
QkrotIk
I
krotjQkrotIk
jQk
I
krotjQkrotIk
jQk
IkCrosskDot
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-90
설계 -16 : Differential Demodulation 블록의 VHDL 설계 (1)
Entity Unit 의 설계 library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.std_logic_signed.ALL; entity DEMOD_BLK is port ( RESET, DET : in std_logic; ISUM, QSUM : in std_logic_vector(6 downto 0); DOT, CROSS : out std_logic); end DEMOD_BLK;
Architecture Unit 의 설계를 위한 방향 설정 를 Rotate 하기 위한 블록에 대한 표현
7-Bit 의 Operand 를 Sign Extend 하고 덧셈과 뺄셈을 행함 연산 결과 중 상위 7-Bit 를 1-Symbol Delay 를 수행하는 블록으로 전달
1-Symbol Delay 를 행하는 블록에 대한 표현 Dot 와 Cross 를 생성하고 , 해당하는 부호를 출력하는 블록에 대한 표현
4 회의 곱셈 연산자를 사용하고 , 결과를 4 개의 각 Variable Object 에 저장 4 개의 곱셈 결과를 이용하여 DOT 와 CROSS 의 결정 식에 따라 Sign Exten
d 하고 연산 수행 DOT 와 CROSS 의 최종 연산 값에 따른 부호를 출력
4
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-91
설계 -16 : Differential Demodulation 블록의 VHDL 설계 (2)
architecture RTL of DEMOD_BLK is -- signal 에 대한 선언을 표현하여야 함 begin process(ISUM, QSUM) -- variable 에 대한 선언을 표현하여야 함 begin ROT_I_V := (ISUM(6) & ISUM)+(QSUM(6)& QSUM); ROT_I <= ROT_I_V(7 downto 1); -- 생략되어 있는 구문을 각자 표현할 것 end process; process(RESET, DET) begin if RESET = '0' then D_IOUT <= ( others => '0' ); D_QOUT <= ( others => '0' ); elsif DET'event and DET = ’0' then D_IOUT <= ROT_I; D_QOUT <= ROT_Q; end if; end process;
process (ISUM, QSUM, D_IOUT, D_QOUT)-- variable 에 대한 선언을 표현하여야 함 begin MUL1_V := ISUM * D_IOUT;-- 생략되어 있는 구문을 각자 표현할 것 DOT_V :=(MUL1_V(13)&MUL1_V) + (MUL4_V(13)&MUL4_V); CROSS_V :=(MUL3_V(13)&MUL3_V) - (MUL2_V(13) & MUL2_V); DOT <= DOT_V(14); CROSS <= CROSS_V(14); end process;end RTL;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-92
설계 -17 : 수신부 클럭 생성 블록의 개념 설계
기능에 대한 정의 Power Detection Block 에서 생성된 detect 신호에 의해 dot, cross 신호가 발생
하므로 dot 와 cross 신호가 유용한 범위에서 심볼 클럭과 비트 클럭을 생성한다 .
설계 방법론 처음으로 detect 신호가 동기 되면 acq 가 ‘ 1’ 이 되며 , 이때 칩 클럭에 동기 되는
8 진 카운터를 구동하여 cnt(2), 즉 MSB 는 심볼 클럭이 되며 , cnt(1) 은 비트 클럭이 된다 .
77 0 1 2 3 4 5 6 7 3 4 5 6 7210 3 4 5 6 7210
available dot,cross data available dot,cross data available dot,cross data
cclk
detect
dot, cross
acq
counter
cnt(0)
cnt(1)
cnt(2)
bclk
sclk
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-93
설계 -18 : 병렬 신호를 직렬 신호로 출력하는 블록의 개념 설계
기능에 대한 정의 입력
1-Bit 의 I-Channel 과 1-Bit 의 Q Channel 의 병렬 신호 Symbol Clock 단위로 입력
출력 1-Bit 의 직렬 신호로 수신 신호를 표현 Bit Clock 단위로 출력
개념에 따른 Timing 설계
I-1 I-2 I-3 I-4
Q-2 Q-3 Q-4Q-1
I-1 Q-1 I-2 Q-2 I-3 Q-3 I-4 Q-4
I-5
Q-5
I-5 Q-5
I-1 Q-1 I-2 Q-2 I-3 Q-3 I-4 Q-4 I-5
BCLK
SCLK
I_TMP
Q_TMP
MUX_OUT
DATA_OUT
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-94
설계 -18 : 병렬 신호를 직렬 신호로 출력하는 블록의 구조 설계
블록 구성도
Entity Unit 의 설계library IEEE; use IEEE.std_logic_1164.All; entity P2S is port ( RESET : in std_logic; BCLK, SCLK : in std_logic;
DOT, CROSS : in std_logic; RX_OUT : out std_logic);end P2S;
Architecture Unit 의 설계 2 개의 process 구문으로 구성 Process 구문 사이의 Signal 선언이
요구됨
architecture RTL of P2S is signal I_TMP, Q_TMP : std_logic;begin process ( SCLK, RESET ) begin if RESET = '0' then I_TMP <= '0'; Q_TMP <= '0'; elsif SCLK = '0' and SCLK'event then I_TMP <= DOT; Q_TMP <= CROSS; end if; end process; process ( RESET, BCLK ) begin if RESET = '0' then RX_OUT <= '0'; elsif BCLK = ’1' and BCLK'event then if SCLK='1' then RX_OUT <= I_TMP; else RX_OUT <= Q_TMP; end if; end if; end process;end RTL;
MUXD
0
1
Q
D Q
D Q
DOT
CROSS
SCLK BCLK
RX_OUT
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-95
설계 -19 : Timing Recovery Block 에 대한 개념 설계 (1)
DBPSK 변조 방식인 경우 주파수 Error 에 대한 정의식 유도 과정
위의 수식에 를 각각 대입하여 정리하면 다음과 같다 .
DQPSK 변조 방식인 경우 주파수 Error 에 대한 정의식 유도 과정
위의 수식에 를 각각 대입하여 정리하면 다음과 같다 .
]sin[]4mod
sin[2)]([]cos[]4mod
cos[2)]([
]sin[]4mod
cos[2)]([]cos[]4mod
sin[2)]([
]mod
cos[)1()()]([
]mod
sin[)1()()]([)]1()(cos[)1()()]([)]1()(sin[)1()()]([
)()]([)()]([)(
rotAkCrossSignrotAkCrossSign
rotAkDotSignrotAkDotSign
fixedrotkAkAkCrossSignfixedrotkAkAkDotSign
kkkAkAkCrossSignkkkAkAkDotSignkDotkCrossSignkCrosskDotSignkFD
23,,
2,0
mod
rotrotAkFD ]sin[2)(
]sin[]mod
cos[2)]([]cos[]mod
sin[2)]([
]mod
sin[)1()()]([)]1()(sin[)1()()]([)()]([)(
rotAkDotSignrotAkDotSign
rotkAkAkDotSignkkkAkAkDotSignkCrosskDotSignkFD
,0mod
rotrotAkFD ]sin[2)(
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-96
설계 -19 : Timing Recovery Block 에 대한 개념 설계 (2)
주파수 Error 에 대한 정의식
전달 함수에 대한 정의식
K1, K2 의 값 : 20 ~ 221
Block Diagram
]}[{]}[{ CrossSignDotDotSignCrossFD
1
1
124
11
Z
ZKK
S IG N
S IG N
2'S
2'SC ross
Dot15
15
15
15
-
F requency disc riminato r
16 S hift R eg
4
viewport contro l
AF C
8K1
X
8X
5K2
+1315
15 15
+
0 1M U X
Inv_LF
Reg16
rxsympls
DDF S
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-97
설계 -20 : 수신부에 대한 Structural Modeling 설계
수신부에 대한 VHDL 표현library IEEE; use IEEE.std_logic_1164.ALL;entity RX_BLK is port ( RESET, SYS_CLK : in std_logic;
RX_IN : in std_logic_vector(5 downto 0); RX_BIT_CLK, DATA_OUT : out std_logic);
end RX_BLK;architecture RTL of RX_BLK is -- 사용하는 Component 에 대한 선언을 한다 . component RX_CLK port ( RESET, SYS_CLK, DET : in std_logic; BCLK, SCLK, CCLK,CCLKX8 : out std_logic); end component; component MATCH port ( RESET,CCLK,CCLKX8 : in std_logic; MATCH_IN : in std_logic_vector(2 downto 0); MATCH_OUT : out std_logic_vector(6 downto 0)); end component; -- Component 를 연결하는 Wire 에 대한 선언을 한다 .
signal BCLK_S, SCLK_S, CCLK_S, CCLKX8_S, DET_S, DOT_S, CROSS_S, DOT, CROSS : std_logic;
signal I_CH_S, Q_CH_S, DET_ISUM, DET_QSUM : std_logic_vector(6 downto 0); signal SIN_S, COS_S : std_logic_vector(5 downto 0); signal RX_IN_I, RX_IN_Q : std_logic_vector(2 downto 0);j
-- 사용하는 Component 에 대한 Configuration
-- Specification 을 모두 표현하여야 한다 .
for u0 : RX_CLK use entity work.RX_CLK(RTL); -- 다른 Component 에 대한 Configuration 정보도
표현한다 . begin RX_BIT_CLK <= BCK_S; u0 : RX_CLK port map (RESET, SYS_CLK, BCLK_S, SCLK_S, CCLK_S, CCLKX8_S ); u1 : MATCH port map (RESET, CCLK_S, CCLKX8_S RX_
IN_I, I_CH_S ); u2 : MATCH port map (RESET, CCLK_S, CCLKX8_S RX_
IN_Q,, Q_CH_S ); u3 : DETECT port map ( RESET, CCLK_S, I_CH_S, Q_CH_S, I_CH_DET, Q_CH_DET, DET_S ); u4 : DEMOD_BLK port map ( RESET, DET_S, DET_ISUM, DET_QSUM, DOT_S, CROSS_S ); u5 : P2S port map ( RESET, BCLK_S, SCLK_S, DOT_S, CROSS_S, DATA_OUT ); u6 : DN_CONV port map ( RESET, SYS_CLK, RX_IN, COS_S, SIN_S, RX_IN_I, RX_IN_Q); u7 : NCO port map (RESET, SYS_CLK, SIN_S, COS_S); end RTL;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-98
설계 -21 : DS/SS-MODEM 설계를 위한 Test Bench 설계
Test Bench 에 대한 기본 모형
Test Bench VHDL 표현library IEEE; use IEEE.std_logic_1164.ALL;entity TB_MODEM isend TB_MODEM;
--architecture RTL of TB_MODEM is component TX_BLK port ( RESET, SYS_CLK, INFO : in std_logic; BCLK : out std_logic; TX_OUT : out std_logic_vector(5 downto 0)); end component;component RANDOM port ( RESET, BCLK : in std_logic; RANDOM_OUT : out std_logic);end component;
component RX_BLK port ( RESET, SYS_CLK : in std_logic; RX_IN : in std_logic_vector(5 downto 0); RX_BIT_CLK : in std_logic; DATA_OUT : out std_logic); end component; signal RST_TX, RST_RX: std_logic := '0'; signal TX_CLK, RX_CLK: std_logic := '0'; signal INFO, OUT_DATA, BIT_CK_S, RX_BIT_CLK : std_logic; signal TX_RX : std_logic_vector(5 downto 0); for u0 : TX_BLK use entity work.TX_BLK(RTL); for u1 : RANDOM use entity work.RANDOM(RTL); for u2 : RX_BLK use entity work.RX_BLK(RTL);begin RST_TX <= '1' after 20 ns; RST_RX <= '1' after 120 ns; TX_CLK <= not TX_CLK after 3 ns; RX_CLK <= not RX_CLK after 3 ns; u0 : TX_BLK port map ( RST_TX, TX_CLK, INFO, BCLK_S, TX_RX ); u1 : RANDOM port map ( RST_TX, BCLK_S, INFO ); u2 : RX_BLK port map ( RST_RX, RX_CLK, TX_RX, RX_BIT_CLK, OUT_DATA );end RTL;--configuration TB_MODEM_C of TB_MODEM is for RTL end for;end TB_MODEM_C;
MODEMBlock
StimulusVector
Info. Data
TX Clock
TX Reset
RX Reset
RX Clock
TX-RXchannel
Recovered Data
6
Test-bench Model
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-99
설계한 MODEM 의 Test Bench 에 대한 Simulation
VHDL Simulation 파형과 분석을 행할 때의 관찰 사항 Source Information 을 표현하는 INFO 와 수신하여 복원한 Information 을 표현하는
OUT_DATA 에 대한 비교를 행한다 . 송신부에서 대역 확산된 값이 PN Code 에 대응하는 값이며 , I-Channel 과 Q-Channel
의 값이 동일 위상 또는 다른 위상으로 동일하게 변화하는 가를 확인한다 . Power Detect 검출 신호가 Symbol Rate 단위로 검출되는 가를 확인한다 . Matched Filter 의 출력에 대한 검사를 행한다 . Differential Demodulation 블록에 대한 검사를 행한다 . 병렬 신호가 직렬 신호로 출력되는 가를 검사한다 .
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-100
회로 합성을 위한 VHDL Code Compile
회로 합성을 위한 Design_Analyzer 환경 Loading Unix Prompt 상에서 (design_analyze &) 하위 계층부터 최상위 계층 순으로 (File -> read) 최상위 Block 을 Click 하고 (Edit -> Uniquify -> hierarchy)
read 에 의한 결과
Constraint 를 위해 최상위 Block Double click
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-101
Clock Speed 설정 Attributes -> Clocks -> Specify
회로 합성을 위한 Constraint 설정 (1)
Clock Constraint 를 위한Clock 신호 선택
Clock Duration : 20 ns
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-102
Fan-out 설정 Attributes -> Design Constraints -> Design Constraint
회로 합성을 위한 Constraint 설정 (2)
Fan-out : 4
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-103
회로 합성을 위한 Constraint 설정 (3)
회로 합성을 위한 노력의 정도를 지정 Tools -> Optimization 회로합성 노력 정도 : 중간
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-104
FPGA 를 위한 EDIF Netlist 생성
File -> Save as File Format 에서 EDIF 를 선택
출력 Netlist Format 지정
출력 File 이름 지정
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-105
Max+PlusII Tools 구동
Max+PlusII Tools 구동 max2win &
FPGA P&R 을 위한 Project 선택 (Synopsys 에서 생성한 EDIF Netlist) File -> Project -> Name
Project 파일 선택
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-106
Compile Window 활성화
Compile Window 활성화 MAX+plusII -> Compiler
Device 선택 Assign -> Device
Device 선택
Family 선택
Compiler Window 활성화
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-107
Compile Option 지정 및 Compile
VHDL Timing Simulation 을 위해 VHDL write Option 지정 Interfaces -> VHDL Netlist writer
P&R 시작 : Start button click 활성화된 VHDL Netlist Writer
Start button
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-108
Timing Simulation 결과
MAXPLUSII 의 출력 VHDL Code 를 이용한 Timing Simulation 결과 SYS_CLK 주파수 : 33.3 MHz
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-109
PAD 정보를 부여한 VHDL 표현LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY top_tx_blk IS
PORT ( p_reset : IN STD_LOGIC;
p_sys_clk : IN STD_LOGIC;
p_info : IN STD_LOGIC;
p_bclk : OUT STD_LOGIC;
p_tx_out : OUT
STD_LOGIC_VECTOR(5 DOWNTO 0));
END top_tx_blk;
ARCHITECTURE rtl OF top_tx_blk IS
COMPONENT tx_blk
PORT ( reset : IN STD_LOGIC;
sys_clk : IN STD_LOGIC;
info : IN STD_LOGIC;
bclk : OUT STD_LOGIC;
tx_out : OUT
STD_LOGIC_VECTOR(5 DOWNTO 0));
END COMPONENT;
COMPONENT pzic
PORT (pad : IN STD_LOGIC;
y : OUT STD_LOGIC);
END COMPONENT;
COMPONENT NID4
PORT (a : IN STD_LOGIC;
y : OUT STD_LOGIC);
END COMPONENT;
COMPONENT pob4
PORT (a : IN STD_LOGIC;
pad : OUT STD_LOGIC);
END COMPONENT;
SIGNAL reset, sys_clk, sys_clk_buf, info, bclk
: STD_LOGIC;
SIGNAL tx_out
: STD_LOGIC_VECTOR(5 DOWNTO 0);
BEGIN
CORE : tx_blk
PORT MAP( reset, sys_clk_buf, info, bclk, tx_out);
BUF0 : NID4 PORT MAP ( sys_clk, sys_clk_buf);
U0 : pzic PORT MAP ( p_reset, reset);
U1 : pzic PORT MAP ( p_sys_clk, sys_clk);
U2 : pzic PORT MAP ( p_info, info);
TX_DATA : FOR i IN 0 TO 5 GENERATE
PAD0 : pob4 PORT MAP (tx_out(i), p_tx_out(i));
END GENERATE;
U3 : pob4 PORT MAP (bclk, p_bclk);
END rtl;
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-110
PAD 정보를 포함한 VHDL 에 대하여 논리 합성 도면
Univ. of Inchon System ASIC Design Lab. VHDL 과 통신 칩 설계 NO.-111
결론 및 향후 연구 과제