목 차 •1. HDL 소개 및 설계방법 •2. 간단한 VHDL Modeling •2. 디지털 변복조 방식 •3. DQPSK CODING TECHNIQUES •부록 : ALTERA 설치 및 사용법 SungKyunKwan Univ. VADA Lab. 1 HDL 소개 및 설계방법 ◈ Why need such HDLs ? Concept a Schematic capture and simulation English specification High-level synthesis HDL description Manual design Synthesis tools Registertransfer design SungKyunKwan Univ. VADA Lab. 2 HDL 소개 및 설계방법 The lack of a formalized description makes the task of simulation and verification difficult The lack of documentation during the design process make maintaining and re-targeting the design difficult. Formalized input can be used for documentation, simulation, verification and synthesis. The design description also serves as a good exchange medium between different user, as well as between user and design tools. SungKyunKwan Univ. VADA Lab. 3 HDL 소개 및 설계방법 ◈ Programming Language Features for HDLs Data Types • format (e.g., number of bit) • types (e.g., Boolean, integer, floating point) • data representation (e.g., signed/unsigned) Operators and Assignment Statements • arithmetic , Boolean , logic , bit manipulation , array access SungKyunKwan Univ. VADA Lab. 4 HDL 소개 및 설계방법 Control Constructs • if-then-else , case , loop Execution Ordering • sequential , concurrent ◈ Hardware-Specific HDL Features Interface Declarations • Port(size, mode) size (e.g., num-bit), hardware-specific feature (e.g., Whether the port is buffered or tristate), mode (e.g., input, output, input-output) SungKyunKwan Univ. VADA Lab. 5 HDL 소개 및 설계방법 Structural Declarations • The specification of registers, counter, other H/W structures that are to be used like variables in the HDL description. RT and Logic Operators • Bit -level logical operator bit shifting, bit rotation, bit-stream extraction …. • RT-level operator increment and decrement operator for variables. SungKyunKwan Univ. VADA Lab. 6 HDL 소개 및 설계방법 Asynchrony • In addition to synchronous behavior, RT-level hardware typically exhibits asynchronous behavior in the form of set, reset and interrupts. Hierarchy • As designs get more complex, we naturally resort to hierarchy as a means of describing, managing and capturing the complex behavior • Procedural, structural, behavioral and design hierarchy SungKyunKwan Univ. VADA Lab. 7 HDL 소개 및 설계방법 Interprocess Communication For purely synchronous designs, this communication can be embedded within the process’behavioral description, since each process operates in a lock-step manner. In such case, the user can explicitly describe the communication using standard HDL constructs to force reads and writes on correct clock cycle. • Parameter passing • Message passing a b process P1(a,b) in port a; out port b; { ..... } x process P1(x,y) in port x; out port y; { ..... } Parameter passing SungKyunKwan Univ. y Process P1(a,b) in channel a; out channel b; { receive(a,buf) ... send(b,msg) } a b Process P1(a,b) in channel a; out channel b; { receive(a,buf) ... send(b,msg) } Message passing VADA Lab. 8 HDL 소개 및 설계방법 Constraints • Constraints on the design behavior guide the synthesis of the design towards feasible realization in term of performance, cost, testability, reliability, and other physical restrictions. User allocation and Bindings ◈ HDL Format To support design description and modeling, we need a variety of HDL formats that suit different application and users. SungKyunKwan Univ. VADA Lab. 9 HDL 소개 및 설계방법 Textual HDLs • ISPS, Sliage, VHDL, HardwareC, MIMOLA… Graphical HDLs Tabular HDLs • Tabular descriptions provide a concise notation for state-based design description, particularly for FSDMs Waveform-Based HDLs SungKyunKwan Univ. VADA Lab. 10 HDL 소개 및 설계방법 • Timing diagrams can graphically represent change on signals, can show sequencing of events, and can also effectively show timing relationships between event. ◈ Matching Language to Target Architecture Entity Full_Adder is port(X,Y : in bit; CIN : in bit; SUM : out bit; COUT: out bit); end Full_Adder; SungKyunKwan Univ. X COUT Y CIN SUM VADA Lab. 11 HDL 소개 및 설계방법 3 U? 3 1 S1 3 CIN 2 S3 AND2 2 OR2 1 3 2 U? XOR2 1 COUT S2 U? XOR2 1 U? 2 3 2 U? AND2 1 Architecture behave of Full_Adder is signal S1,S2,S3:bit begin S1 <= X xor Y; SUM <= S1 xor CIN after 3 ns; S2 <= X and Y; S3 <= S1 and CIN; COUT <= S2 or S3 after 5 ns; end; X Y SUM SungKyunKwan Univ. VADA Lab. 12 HDL 소개 및 설계방법 ◈ Modeling Guidelines for HDLs In order to achieve effcient hardware synthesis, we need to match the model of the language to that of the underlying target architecture. Combinational Designs • Hardware design is composed of an interconnection of logic gates. (Boolean VHDL operators) Functional Designs SungKyunKwan Univ. VADA Lab. 13 HDL 소개 및 설계방법 • Function designs are characterized by a mixture of synchronous and asynchronous behavior, in which asynchronous event may override synchronous operation. ☞ Illustrate a functional design using an up/down counter with asynchronous set and reset Register-Transfer Designs • RT designs correspond to the FSMD model. • RT designs have an implicit notion of states and state transitions Behavioral Designs • Design behavior is typically expressed in a sequential language style using sequential assignment statement SungKyunKwan Univ. VADA Lab. 14 HDL 소개 및 설계방법 ◈ 효율적인 모델링 기법 대규모 설계를 위해서는 동작적 모델링. 구현을 위해서는 합성 가능한 구문 이용 Process문의 sensitivity list를 검사. 연산 순서를 조정한 모델링 a b c + d + a c b MUX MUX MUX + out out SungKyunKwan Univ. d VADA Lab. 15 HDL 소개 및 설계방법 연산수행을 줄이는 모델링 a b c d a + c b + d + + + + out out out = a+b+c+d out = (a+b)+(c+d) 같은 연산은 한번에 수행 process(a,b,c,d) begin y1 <= a+b; y2 <= a+b+d; y3 <= a+c; end process; SungKyunKwan Univ. process(a,b,c,d) begin y1 <= a+b; y2 <= y1+d; y3 <= a+c; end process; VADA Lab. 16 HDL 소개 및 설계방법 보다 효율적인 문장 선택 ☞빠른 속도를 필요로 하는 회로에는 case문보다 if문이 효율적이다. Simulator에 따라 다른 library와 package사용 ☞ Library나 각package들의 이름 및 형식은 사용 하는 simulator에 따라 다를 수 있다. 반도체 회사에서 제공하는 library를 이용한 합성 관련이 많은 부분을 그룹지어 코딩 및 합성 SungKyunKwan Univ. VADA Lab. 17 간단한 VHDL Modeling Full_adder 동작적 모델링 • Library ieee; use ieee.std_logic_1164.all; entity f_adder is port(x,y,c_in : in std_logic; s_out,c_out : out std_logic); end f_adder; architecture behave of f_adder is begin process(x,y,c_in) variable tmp : std_logic_vector(1 downto 0); SungKyunKwan Univ. VADA Lab. 18 간단한 VHDL Modeling begin l := “00”; if x=‘1’ then l := l+1; end if ; if y=‘1’ then l := l+1; end if ; if c_in=‘1’ then l := l+1; end if ; if (l=0) or (l=2) then s_out <= ‘0’ else s_out <= ‘1’; end if; if (l=0) or (l=1) then c_out <= ‘0’ else c_out <= ‘1’; end if; end process; end behave; SungKyunKwan Univ. VADA Lab. 19 간단한 VHDL Modeling Full_adder 구조적 모델링 st1 x HA1 : h_adder y s_out st2 HA2 : h_adder c_in st3 org : or2 c_out f_adder SungKyunKwan Univ. VADA Lab. 20 간단한 VHDL Modeling • 반가산기 모델링(Half adder) Library ieee; use ieee.std_logic_1164.all; entity h_adder is port(a,b : in std_logic; s,c : out std_logic); end h_adder; architecture behave of h_adder is begin process(a,b) begin SungKyunKwan Univ. if (a=b) then s <= ‘0’; else s <= ‘1’; end if; ☞ if (a=‘1’) and (b=‘1’) then c <=‘1’; else c <= ‘1’; end if; end process; end behave; VADA Lab. 21 간단한 VHDL Modeling • OR gate 모델링 Library ieee; use ieee.std_logic_1164.all; entity or2 is port(a,b : in std_logic; o : out std_logic); end or2; ☞ if (a=‘0’) and (b=‘0’) o <=‘0’; else o <= ‘1’; end if; end process; end behave; architecture behave of or2 is begin process(a,b) begin SungKyunKwan Univ. VADA Lab. 22 간단한 VHDL Modeling • 전가산기 모델링(Full adder) Library ieee; use ieee.std_logic_1164.all; entity f_adder is port(x,y,c_in : in std_logic; s_out,c_out : out std_logic); end f_adder; architecture structural of or2 is signal st1,st2,st3 : std_logic; ☞ component or2 port(a,b : in std_logic; o : out std_logic); end component; component h_adder port(a,b : in std_logic; s,c : out std_logic); end component; begin SungKyunKwan Univ. VADA Lab. 23 간단한 VHDL Modeling HA1 : h_adder port map(x,y,st1,st2); HA2 : h_adder port map(st1,c_in,s_out,st3); ORG : or2 port map(st2,st3,c_out); end structural; SungKyunKwan Univ. VADA Lab. 24 간단한 VHDL Modeling Multiplexer 모델링 a a sel y 0 a 1 b y b sel MUX 2X1 SYMBOL SungKyunKwan Univ. MUX 2X1 진리표 VADA Lab. 25 간단한 VHDL Modeling • Entity entity Mux2X1 is port(a,b : in std_logic; sel : in std_logic; y : out std_logic); end Mux2X1; SungKyunKwan Univ. VADA Lab. 26 간단한 VHDL Modeling • Architecture 1 Architecture behave of Mux2X1 is begin process(a,b,sel) begin if sel=‘0’ then y <= a; else y <= b; end if; end process; end behave; SungKyunKwan Univ. VADA Lab. 27 간단한 VHDL Modeling • Architecture 2 Architecture behave of Mux2X1 is begin process(a,b,sel) begin case sel is when ‘0’ => y <= a; when others => y<=b; end case; end process; end behave; SungKyunKwan Univ. VADA Lab. 28 간단한 VHDL Modeling • Architecture 3 Architecture behave of Mux2X1 is signal temp : std_logic; begin process(a,b,sel) begin temp <= not(sel); y <= (a and temp) or (b and sel); end process; end behave; SungKyunKwan Univ. VADA Lab. 29 간단한 VHDL Modeling 동기10진 카운터 modeling • Library ieee; use ieee.std_logic_1164.all; entity cnt10 is port(ck,rst : in std_logic; q : buffer std_logic_vector(3 downto 0)); end cnt10; architecture behave of cnt10 is begin SungKyunKwan Univ. VADA Lab. 30 간단한 VHDL Modeling process(ck,rst) begin if ck’event and ck=‘1’ then if rst = ‘0’ then q <= “0000”; elsif q = “1001” then q<= “0000”; else q <= q+ “0001”; end if; end if; end process; end behave; SungKyunKwan Univ. VADA Lab. 31 디지털 변복조 방식 ¸Þ½ÃÁö¿ø mi ½ÅÈ£Àü¼Û ºÎÈ£±â Si º¯Á¶±â S i (t) 송신기 Åë ½Å Ã¤ ³Î 반송파 추정 ½ÅÈ£Àü¼Û º¹È£±â X °ËÆıâ X (t) 수신기 SungKyunKwan Univ. VADA Lab. 32 디지털 변복조 방식 ◈ 디지털 통과대역 변조 ASK(Amplitude Shift Keying) FSK(Frequency Shift Keying) PSK(Phase Shift Keying) QAM(Quadrature-Amplitude Modulation) SungKyunKwan Univ. VADA Lab. 33 디지털 변복조 방식 1 디지탈 열 0 1 1 0 기저대역 신호 양극성 0 T 2T 3T t 4T ASK t PSK t FSK t SungKyunKwan Univ. VADA Lab. 34 디지털 변복조 방식 ◈ PSK(Phase Shift Keying) 디지털 신호의 정보내용에 따라 반송파의 위상 변 화시키는 방식 M진 PSK(M-ary Phase Shift Keying) m ▶ 2원 디지털 신호를 m개의 bit로 묶어서 M 2 개의 위상 으로 분할시킨 위상변조방식. ▶ 2진, 4진, 8진 PSK 등이 널리 사용. PSK파는 일정한 진폭을 갖는 파형 ▶ 전송로 등에 의한 레벨 변동의 영향을 적게 받는다 SungKyunKwan Univ. VADA Lab. 35 디지털 변복조 방식 ◈ 2진 PSK(Binary Phase Shift Keying) 데이터( 1)에 따라 개개의 데이터 구간에 2종의 위 상을 갖는 정현파 중 하나를 전송하는 방식 si (t ) Aai cos2 f c t T 1 0 SungKyunKwan Univ. 0 1 1 0 VADA Lab. 36 디지털 변복조 방식 ◈ 4진 PSK(Quadrature Phase Shift Keying) I채널(양극파형 1) x cos(2fct + qo) + 양극 NRZ 펄스 - /2 Á÷º´·Äº¯È¯±â S SQPSK(t) - sin(2fct + qo) Q 채널(양극파형 2) SungKyunKwan Univ. x VADA Lab. 37 디지털 변복조 방식 dI(t) +1 d0 d6 d2 d4 -1 2Tb 4Tb 6Tb 8Tb dQ(t) +1 d1 d5 d7 d3 -1 2Tb 4Tb 6Tb 8Tb 2Tb 4Tb 6Tb 8Tb s(t) SungKyunKwan Univ. VADA Lab. 38 디지털 변복조 방식 ◈ 차동 PSK(Differential Phase Shift Keying) 동기검파용 기준반송파가 필요없다 1구간(T초)전의 PSK신호를 기준파로 사용하여 동 기검파하는 방식. 전후의 신호구간 사이의 위상차가 정보에 대응하도 록 송신측에서 PSK변조하기 전에 차동부호화 (Differential Encoding) 할 필요가 있다.. SungKyunKwan Univ. VADA Lab. 39 디지털 변복조 방식 ◈ 차동 PSK 송신기 I채널(양극파형 1) x cos(2fct + qo) + Á÷º´·Äº¯ ȯ±â 양극 NRZ 펄스 - /2 Differential encoder S SDQPSK(t) - sin(2fct + qo) Q 채널(양극파형 2) SungKyunKwan Univ. x VADA Lab. 40 DQPSK CODING TECHNIQUES DQPSK Serial-to-Parallel Encoder (S_TO_P.vhd) (enc.vhd) DQPSK Decoder Parallel-to-Serial denc.vhd SungKyunKwan Univ. VADA Lab. 41 DQPSK CODING TECHNIQUES SungKyunKwan Univ. VADA Lab. 42 DQPSK CODING TECHNIQUES DQPSK ENCODER 구조적 모델링 st1 d_in STP : S_TO_P (s_to_p.vhd) st2 EN : enc oup (enc.vhd) denc.vhd SungKyunKwan Univ. VADA Lab. 43 DQPSK CODING TECHNIQUES • 직병렬변환기 모델링 Library ieee; use ieee.std_logic_1164.all; entity s_to_p is port(reset,tx_in : in std_logic; bclk,sclk : in std_logic; I_ch,q_ch : out std_logic); end s_to_p; architecture behave of s_to_p is signal tmp : std_logic; begin process(reset,tx_in,bclk) SungKyunKwan Univ. begin if reset=‘0’ then tmp <= ‘0’; ☞ elsif bclk’even and bclk=‘0’ then tmp <= tx_in; end if; process(reset, TMP, tx_in, sclk) begin if reset = '0’ then i_ch <= '0'; VADA Lab. 44 DQPSK CODING TECHNIQUES q_ch <= '0'; elsif sclk'event and sclk = '0' i_ch <= TMP; q_ch <= tx_in; end if; end process; end behave; SungKyunKwan Univ. then VADA Lab. 45 DQPSK CODING TECHNIQUES • 직병렬변환기 Simulation 결과 SungKyunKwan Univ. VADA Lab. 46 DQPSK CODING TECHNIQUES • ENCODER 모델링 Library ieee; use IEEE.std_logic_1164.ALL; entity enc is port (rst, i_in, q_in : in std_logic; sclk : in std_logic; d_out : out std_logic_vector(1 downto 0)); end enc; architecture behave of enc is signal C_STATE, N_STATE : std_logic_vector(1 downto 0); signal IQ_IN : std_logic_vector(1 downto 0); SungKyunKwan Univ. VADA Lab. 47 DQPSK CODING TECHNIQUES begin IQ_IN <= i_in & q_in; process(rst,sclk,IQ_IN) begin if rst = '0' then C_STATE <= "00"; elsif sclk'event and sclk = '0’ then case C_STATE is when "00" => case IQ_IN is when "00" => N_STATE <= "00"; when "01" => N_STATE <= "01"; when "10" => N_STATE <= "10"; when "11" => N_STATE <= "11"; when others => SungKyunKwan Univ. VADA Lab. 48 DQPSK CODING TECHNIQUES end case; when "01" => case IQ_IN is when "00" => N_STATE <= "01"; when "01" => N_STATE <= "11"; when "10" => N_STATE <= "00"; when "11" => N_STATE <= "10"; when others => end case; when "10” => case IQ_IN is when "00" => N_STATE <= "10"; when "01" => N_STATE <= "00"; when "10" => N_STATE <= "11"; when "11" => N_STATE <= "01"; when others => SungKyunKwan Univ. VADA Lab. 49 DQPSK CODING TECHNIQUES end case; when "11" => case IQ_IN is when "00" => N_STATE <= "11"; when "01" => N_STATE <= "10"; when "10" => N_STATE <= "01"; when "11" => N_STATE <= "00"; when others => end case; when others => end case; end if; end process; SungKyunKwan Univ. VADA Lab. 50 DQPSK CODING TECHNIQUES process(rst,sclk,N_STATE) begin if rst='0' then N_STATE <= "00"; elsif sclk'event and sclk='1' then C_STATE <= N_STATE; d_out <= N_STATE; end if; end process; end behave; SungKyunKwan Univ. VADA Lab. 51 DQPSK CODING TECHNIQUES • ENCODER Simulation 결과 SungKyunKwan Univ. VADA Lab. 52 DQPSK CODING TECHNIQUES • DQPSK ENCODER 모델링 library ieee; use ieee.std_logic_1164.all; entity denc is port(fck,hck : in std_logic; clr : in std_logic; d_in : in std_logic; oup : out std_logic_vector(1 downto 0)); end denc; architecture behave of denc is SungKyunKwan Univ. VADA Lab. 53 DQPSK CODING TECHNIQUES signal st1,st2 : std_logic; component S_TO_P port ( reset, tx_in bclk, sclk i_ch, q_ch end component; : in : in : out std_logic; std_logic; std_logic); component ENC port (rst, i_in, q_in : in std_logic; sclk : in std_logic; d_out : out std_logic_vector(1 downto 0)); end component; SungKyunKwan Univ. VADA Lab. 54 DQPSK CODING TECHNIQUES begin STP : s_to_p port map(clr,d_in,hck,fck,st1,st2); EN : ENC port map(clr,st1,st2,fck,oup); end behave; SungKyunKwan Univ. VADA Lab. 55 DQPSK CODING TECHNIQUES • DQPSK ENCODER Simulation 결과 SungKyunKwan Univ. VADA Lab. 56 ALTERA 설치 및 사용법 ◈ 시스템 요구사항 486DX66 or Pentium 계열 이상. MS Windows NT 3.51 or MS Windows95 환경. MS Windows에서 사용 가능한 그래픽 카드와 모니터. CD-ROM 드라이버. Parallel port 32MB RAM(Device에 따라 다름) SungKyunKwan Univ. VADA Lab. 57 ALTERA 설치 및 사용법 ◈ SOFTWARE INSTALL SungKyunKwan Univ. VADA Lab. 58 ALTERA 설치 및 사용법 SungKyunKwan Univ. VADA Lab. 59 ALTERA 설치 및 사용법 ◈ 디지털 시스템의 설계방법 회로도에 의한 방법. VHDL에 의한 방법. SungKyunKwan Univ. VADA Lab. 60 ALTERA 설치 및 사용법 Yes MAX+PLUUS II start MAX+PLUUS II start 새로운 디자인을 만든다(.GDF) 새로운 디자인을 만든다(.vhd) 심볼을 입력하고 node와 bus를 이용하여 회로도 완성 회로의 동작을 VHDL 문법에 맞게 기술 회로도 저장후 project이름 설정 File 저장후 project 이름을 설정 Project compile Project compile Yes ERROR ERROR No No No Timing analysis Timing analysis Simulation Simulation No 동작정상 Yes MAX+PLUUS II End SungKyunKwan Univ. 동작정상 Yes MAX+PLUUS II End VADA Lab. 61 ALTERA 설치 및 사용법 Design Entry Project Processing MAX+PLUSII Text Editor MAX+PLUSII Graphic Editor MAX+PLUSII Waveform Editor MAX+PLUSII Symbol Editor Compiler Netlist Extractor(includes all netlist readers) Database Builder Logic Synthesizer Functional, Timing, or Linked SNF Extractor Partitioner Fitter EDIF, VHDL & Verilog Netlist Writers Design Doctor Assembler MAX+PLUSII Floorplan Editor Project Verification MAX+PLUSII Simulator MAX+PLUSII Message Processor & Hierarchy Display Device programming MAX+PLUSII Waveform Editor MAX+PLUSII Timing Analyzer SungKyunKwan Univ. MAX+PLUSII Programmer VADA Lab. 62 ALTERA 설치 및 사용법 ◈ Graphic Design File의 생성 ① 새로운 File 이름을 만든다. ② Project name을 정한다. ③ Logic함수에 대한 symbol을 입력한다. ④ Symbol을 원하는 위치로 이동한다. SungKyunKwan Univ. VADA Lab. 63 ALTERA 설치 및 사용법 ⑤ Input pin & output pin을 입력한다. ⑥ 해당 pin에 대한 이름을 입력한다. ⑦ Node와 bus들을 연결한다. ⑧ File을 저장한 후 기본적인 error check SungKyunKwan Univ. VADA Lab. 64 ALTERA 설치 및 사용법 SungKyunKwan Univ. VADA Lab. 65 ALTERA 설치 및 사용법 ☜ Symbol Libraries에는 매우 많은 종류의 TTL과 특히, 74XXX serise와 다수의 Mega Function Libraries가 준비되어 있고 또 자 신이 VHDL이나 AHDL로 설계한 Function을 Symbol로 만들면 Symbol Libraries Box에 포함되어 Symbol Files box에 나타난다. SungKyunKwan Univ. VADA Lab. 66 ALTERA 설치 및 사용법 SungKyunKwan Univ. VADA Lab. 67 ALTERA 설치 및 사용법 ☜ 지금까지는 입출력 각각의 port가 실제 ALTERA CPLD의 몇 번에 할당되는지의 정보는 없다. 이를 위해 다음과 같이 각각의 입출력 pin에 대한 pin 번호를 할당하기 위하여 이 메뉴를 이용한다. SungKyunKwan Univ. VADA Lab. 68 ALTERA 설치 및 사용법 ☜ 본 설계에서는 “test”가 Chip의 name이고 “@”우측에 표시된 것이 실제 CPLD에 연결된 pin번호이다. SungKyunKwan Univ. VADA Lab. 69 ALTERA 설치 및 사용법 ◈ 컴파일을 통한 Design 상태 점검 컴파일러는 일련의 Module과 Utility로 구성 project에 대한 Error 검출 Logic synthesize하여 ALTERA Chip으로 Fitting. SungKyunKwan Univ. VADA Lab. 70 ALTERA 설치 및 사용법 SungKyunKwan Univ. VADA Lab. 71 ALTERA 설치 및 사용법 ◈ Simulation을 통한 Logic검증 SungKyunKwan Univ. VADA Lab. 72 ALTERA 설치 및 사용법 SungKyunKwan Univ. VADA Lab. 73 ALTERA 설치 및 사용법 SungKyunKwan Univ. VADA Lab. 74 ALTERA 설치 및 사용법 ◈ Timing 분석 SungKyunKwan Univ. VADA Lab. 75 ALTERA 설치 및 사용법 ☜ Delay Matrix KEY_7로 부터 Led1 출 력까지 14.8ns지연이 일 어남. SungKyunKwan Univ. VADA Lab. 76 ALTERA 설치 및 사용법 ◈ VHDL 기술을 위한 Text file의 생성 SungKyunKwan Univ. VADA Lab. 77 ALTERA 설치 및 사용법 SungKyunKwan Univ. VADA Lab. 78 ALTERA 설치 및 사용법 SungKyunKwan Univ. VADA Lab. 79 ALTERA 설치 및 사용법 • library IEEE; use IEEE.std_logic_1164.ALL; entity S_TO_P is port ( reset, tx_in : in std_logic; bclk, sclk : in std_logic; i_ch, q_ch : out std_logic); end S_TO_P; architecture RTL of S_TO_P is signal TMP : std_logic; begin process (reset, tx_in, bclk) begin if reset = '0’ then TMP <= '0'; elsif bclk'event and bclk = '0' then TMP <= tx_in; end if; end process; SungKyunKwan Univ. process(reset, TMP, tx_in, sclk) begin if reset = '0’ then i_ch <= '0'; q_ch <= '0'; elsif sclk'event and sclk = '0’ then i_ch <= TMP; q_ch <= tx_in; end if; end process; end RTL; VADA Lab. 80 ALTERA 설치 및 사용법 SungKyunKwan Univ. VADA Lab. 81 참고문헌 VHDL 기초와 응용 – 이대영, 조원경, 정연모, 오재곤 공저 – 홍릉과학출판사 디지털시스템 설계 및 응용 – 양오 저 – 복두출판사 아날로그와 디지탈통신 – 진년강 저 – 청문각 전자통신 – 강창언 저 – 복두출판사 SungKyunKwan Univ. VADA Lab. 82