Chapter 8. Additional Topics in VHDL 2001. 01. 07. 권동혁.

Slides:



Advertisements
Similar presentations
Multiplexers Section 3-7 Mano & Kime. Multiplexers & Demultiplexers Multiplexers (Selectors) Lab 1 – Behavioral VHDL -- Multiplexers MUX as a Universal.
Advertisements

1 Lecture 13 VHDL 3/16/09. 2 VHDL VHDL is a hardware description language. The behavior of a digital system can be described (specified) by writing a.
History TTL-logic PAL (Programmable Array Logic)
VHDL ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
Introduction to VHDL (Lecture #5) ECE 331 – Digital System Design The slides included herein were taken from the materials accompanying Fundamentals of.
Comprehensive VHDL Module 6 Types November Comprehensive VHDL: Types Copyright © 2000 Doulos Types Aim ©To understand the use and synthesis.
VHDL Data Types Module F3.1. VHDL Data Types Scalar Integer Enumerated Real (floating point)* Physical* Composite Array Record Access (pointers)* * Not.
ECE C03 Lecture 18ECE C03 Lecture 61 Lecture 18 VHDL Modeling of Sequential Machines Prith Banerjee ECE C03 Advanced Digital Design Spring 1998.
Introduction to VHDL CSCE 496/896: Embedded Systems Witawas Srisa-an.
ELEN 468 Lecture 191 ELEN 468 Advanced Logic Design Lecture 19 VHDL.
HDL-Based Digital Design Part I: Introduction to VHDL (I) Dr. Yingtao Jiang Department Electrical and Computer Engineering University of Nevada Las Vegas.
VHDL And Synthesis Review. VHDL In Detail Things that we will look at: –Port and Types –Arithmetic Operators –Design styles for Synthesis.
ECE C03 Lecture 141 Lecture 14 VHDL Modeling of Sequential Machines Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
Package with 4-valued logic Signal Attributes Assertion Data Flow description.
1 H ardware D escription L anguages Basic Language Concepts.
VHDL Training ©1995 Cypress Semiconductor 1 Introduction  VHDL is used to:  document circuits  simulate circuits  synthesize design descriptions 
CPE 626 Advanced VLSI Design Lecture 3: VHDL Recapitulation Aleksandar Milenkovic
1 Part I: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
Synthesis Presented by: Ms. Sangeeta L. Mahaddalkar ME(Microelectronics) Sem II Subject: Subject:ASIC Design and FPGA.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
IAY 0600 Digital Systems Design
VHDL Introduction. V- VHSIC Very High Speed Integrated Circuit H- Hardware D- Description L- Language.
VHDL IE- CSE. What do you understand by VHDL??  VHDL stands for VHSIC (Very High Speed Integrated Circuits) Hardware Description Language.
VHDL Files & Text IO ECE4623/5623 Computer Hardware Design.
陳慶瀚 機器智慧與自動化技術 (MIAT) 實驗室 國立中央大學資工系 2009 年 10 月 8 日 ESD-04 VHDL 硬體描述語言概論 VHDL Hardware Description Language.
1 Introduction to VHDL Spring What is VHDL? VHDL can be uses to model and synthesise digital systems. VHDL = VHSIC Hardware Description Language.
L12 – VHDL Overview. VHDL Overview  HDL history and background  HDL CAD systems  HDL view of design  Low level HDL examples  Ref: text Unit 10, 17,
Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.
CPE 626 Advanced VLSI Design Lecture 4: VHDL Recapitulation (Part 2) Aleksandar Milenkovic
Lecture #8 Page 1 Lecture #8 Agenda 1.VHDL : Operators 2.VHDL : Signal Assignments Announcements 1.HW #4 assigned ECE 4110– Digital Logic Design.
Copyright(c) 1996 W. B. Ligon III1 Getting Started with VHDL VHDL code is composed of a number of entities Entities describe the interface of the component.
VHDL Very High Speed Integrated Circuit Hardware Description Language Shiraz University of shiraz spring 2011.
Design Methodology Based on VHDL Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
1 Introduction to VHDL part 1 Fall Preliminary Class web page egre365/index.html Syllabus Grades: –Quizzes.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Chapter 5 Introduction to VHDL. 2 Hardware Description Language A computer language used to design circuits with text-based descriptions of the circuits.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, February 25 CEC 220 Digital Circuit Design Slide 1 of 19.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
VHDL Programming Fundamentals Presented By Dr. Pradyut Kumar Biswal Department of Electronics, IIIT Bhubaneswar.
CEC 220 Digital Circuit Design Introduction to VHDL Friday, February 21 CEC 220 Digital Circuit Design Slide 1 of 10.
Lecture #8 Page 1 Lecture #8 Agenda 1.VHDL : Operators 2.VHDL : Signal Assignments Announcements 1.HW #4 assigned ECE 4110– Sequential Logic Design.
VHDL Tutorial.
Case Study: Xilinx Synthesis Tool (XST). Arrays & Records 2.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, Oct 14 CEC 220 Digital Circuit Design Slide 1 of 19.
Introduction To VHDL 홍 원 의.
Basic Language Concepts
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Chapter 2. Introduction To VHDL
CPE 528: Session #7 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
CPE 626 Advanced VLSI Design Lecture 2: VHDL Recapitulation Aleksandar Milenkovic
ECE 434 Advanced Digital System L17
ECE 434 Advanced Digital System L15
ECE 434 Advanced Digital System L08
CPE/EE 422/522 Advanced Logic Design L15
CHAPTER 10 Introduction to VHDL
RTL Style در RTL مدار ترتيبي به دو بخش (تركيبي و عناصر حافظه) تقسيم مي شود. مي توان براي هر بخش يك پروسس نوشت يا براي هر دو فقط يك پروسس نوشت. مرتضي صاحب.
ECE 434 Advanced Digital System L9
CPE 528: Lecture #4 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
CPE/EE 422/522 Advanced Logic Design L08
CPE/EE 422/522 Advanced Logic Design L07
CPE/EE 422/522 Advanced Logic Design L14
CPE/EE 422/522 Advanced Logic Design L11
ECE 434 Advanced Digital System L10
CPE 528: Lecture #5 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
CPE 528: Lecture #3 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
VHDL Data Types Module F3.1.
© Copyright Joanne DeGroat, ECE, OSU
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

Chapter 8. Additional Topics in VHDL 권동혁

Contents 1.Attributes 2.Transport and Inertial Delays 3.Operator Overloading 4.Mulitvalued Logic and Signal Resolution 5.IEEE-1164 Standard Logic 6.Generics 7.Generate Statements 8.Synthesis of VHDL Code 9.Synthesis Examples 10.Files and TEXTIO

1. Attributes S ’ EVENT : “ S tick EVENT ”, S is signal name S 가 변하면 TRUE S ’ ACTIVE : returns TRUE if S has just been re- evaluated, even if S does not chang.

2. Transport and Inertial Delays Transport Delay : delays an input signal by the specified delay time. (delay introduced by wiring) Inertial Delay : default delay type. 입력에서의 short pulse 는 출력으로 propagate 안됨. Gate 와 같은 device 를 modeling. (inertial delay T : 폭이 T 보다 짧은 pulse 는 reject 됨.)

Signal_name <= reject pulse-width expression after delay- time Z1 <= transport X after 10 ns; -- transport delay Z2 <= X after 10 ns; -- inertial delay Z3 <= reject 4 ns X after 10 ns; -- delay with specified -- rejection pulse width Zm <= X after 4 ns; -- inertial delay rejects short pulses Z3 <= transport Zm after 6ns; -- total delay is 10 ns

sequential statements A <= transport B after 1 ns; A <= transport C after 2 ns; ---> 차례로 수행 A <= B after 1 ns; -- inertial delay implied A <= C after 2 ns; -- inertial delay implied ---> the change to B is removed from the queue, only the change to C occures A <= transport B after 2 ns; A <= transport C after 1 ns; ---> the previous change to B is removed from the queue, only the change to C occures.

3. Operator Overloading arithmetic operators, + and - : integer operation. not on bit-vector operation operator overloading : "+" operator implicitly call an appropriate addtion function. ex) procedure Addvec 대신에 bit_vector 계산에 operator 로 + 를 사용하고 function "+" 를 별도로 정의하여 사용함. A <= B + C + 3;  A,B,C 가 integer 이면, excute integer arithmetic operation.  A,B,C 가 type bit_vector 이면, 두가지 overloading function call A <= 3 + B + C;  compile-time error. (integer + bit_vector 를 위한 function 없음 )

4. Multivalued Logic and Signal Resolution two-valued bit logic : 0, 1 multivalued logic : 0, 1, Z, X,... resolution function : 2 개 이상의 source 로부터 출력이 관련될 때 실제 출력을 결정. a=c=d=1,b=0  f=Z, 1  resolution functions 이 자동으로 call 되어 f=1 로 결정하게 됨.

VHDL signal ---1)resolved signal : resolution function 을 가진 신호 2)unresolved signal : resolution function 이 없는 신호 R <= transport '0' after 2 ns, 'Z' after 6 ns; R <= transport '1' after 4 ns; R <= transport '1' after 8 ns, '0' after 10 ns;

5. IEEE-1164 Standard Logic specifies a 9-valued logic system 'U' - Uninitialized, 'X' - Forcing unknown, '0' - Forcing 0 '1' - Forcing 1, 'Z' - Hige Impedance, 'W' - Week unknown 'L' - Weak 0, 'H' - Weak 1, '-' - Don't care forcing signal and weak signal is tied : forcing signal dominates. useful in modeling the internal operation of certain type of ICs. IEEE-1164 standard : defines the AND, OR, NOT, XOR, other fuction for 9-valued logic

6. Generics commonly used to specify parameters for a component

7. Generate Statements When an iterative array of identical components is required, an easy way of instantiating these components. At compile time, a set of concurrent statement(s) is generated ex) generate_label: for identifier in range generate [begin] concurrent statement(s) end generate [generate_label]; generate_label: if condition generate [begin] concurrent statement(s) end generate [generate_label];

8. Synthesis of VHDL Code CAD tools : VHDL description => circuit description ( logic schematic, wirelist, gates, flip-flops, registers, counters, multiplexers, adders,....) synthesis tools : VHDL description => implement using PGA or CPLD VHDL code compiles and simulates correctly ≠ synthesize correctly. => synthesis tool 이 designer 의 의도를 이해하도록 VHDL code 변경. => efficient implementation 을 위한 추가적인 변경이 필요. ex) A <= B and C; -- A implemented using combinational logic wait for clock'event and clock = '1'; A <= B and C; -- A represents a register(or flip-flop), rising edge -- of the clock.

VHDL signal 에 값이 assign 되면 새로운 값이 배정될 때 까지 그 값이 유지 => synthesizer 가 latch 로 인식. * a 가 3 이면 ? b 의 previous value 가 유지되야함.--> latch 사용. * null 대신에 b<='0' 로 바꾸면 latch 를 제거할 수 있다. b=a 0 ' = D a=3 이면 b=previous value, G=0, --> G=(a 1 a 0 )'

if 문 사용시 주의 if A = '1' then Nextstate <= '3'; end if; -- designer : A ≠ '1' 이면 Next state 는 이전상태 값 유지. -- sinthesizer : A ≠ '1' 이면 Next state 는 unkwon('X') --ambiguous. if A = '1' then Nextstate <= '3'; else Nextstate <= '2'; -- unambiguous end if; speed 최적화 => 부품의 수가 증가 (max. propagation delay 의 path 길이를 짧게 ). ex)3-level gate network ->2-level network : gate 수 증가. 지연 감소 area 최적화 => 부품수 감소.( 필요한 chip area 감소 )

Synopsis Design Compiler : case 문 ==> MUX, gates. b 1 = a 1 'a 0, b 0 =a 1 ' + a 0

standard VHDL : not provide for arithmetic opeartion on bit- vectors.  function 이나 procedure 사용 (Add4, Addvec) IEEE : bit_vectors, std_logic vectors 에서 arithmetic operation 을 할 수 있는 function 을 포함하는 standard synthesis package 개 발. (numeric_bit package, numeric_std package) numeric_bit, numeric_std package 가 정의하는 overloaded opeartors: 1)Unary: abs, - 2)Arithmetic: +, -, *, /, rem, mod 3)Relational: >, =, <=, =, /= 4)Logical: not, and, or, nand, nor, xor, xnor 5)Shifting: shift_left, shift_right, rotate_left, rotate_right, sll, srl, rol, ror

9. Synthesis Examples 2 개의 CAD system 으로 VHDL code synthesizing 비 교 ( Synopsis Design Compiler with XACT libraries, Altera Max- Plus II VHDL compiler) fig2-13 을 수정하여 fig8-18 을 적용 - Synopsis Design Compiler using generic libraries : 3 flip-flops, 13 gates. (Chapter 1 의 designed circuit : 7 gates) - Synopsis Design Compiler using IEEE standard logic : 12 gates. - Xilinx libraries and XC4000 PGA : 2 CLB.(8 gates, 1 XNOR or 11 gates : fig8-19) - Altera Max-Plus II VHDL compiler with MAX 7000 CPLD : 9 logic cells. => when s6 문과 when others 문을 변경하여 4 logic cells 로 줄임. ( a small change in the code => a large change in the amount of resources used)

Dice game(fig 5-11, fig 5-13) 예제 - S ynopsis Design Compiler : 27.5 CLBs. => behavioral model 을 data flow model 로 변 경하여 25 CLB. - Altera Max-Plus II VHDL compiler with MAX 7000 series : 39 logic cells 와 34 shareable expanders. =>data flow model 로 변경 후 38logic cells 와 25 sharable expander. => VHDL code 변경 : 31 logic cells and 13 shareable expanders (fit into a 7032 chip)

10. Files and TEXTIO standard TEXTIO package : can be used to read or write lines of text from or to a file. file 사용을 위한 선언 file file-name : file_type [open mode] is "file_pathname"; file test_data : text open read_mode is "c:\f2 test.dat"; mode : read_mode, write_mode, append_mode a file can contain only one type of object - integers, bit_vectors, text strings. type bv_file is file of bit_vector; endfile(file_name) --each file type has implicit endfile function

type text is file of string; --TEXTIO package 에서 text type 을 정의 type line is access string; -- line is the pointer to the buffer. variable buff : line; readline (buff, test_data); -- test_data 에서 text 1 line 을 읽어 buff 가 point 하는 buffer 에 놓는다. buff 는 buffersp 의 다음 text 를 point 한 다. read (point, value); read (point, value, good); variable buffw: line; variable int1: integer; variable bv8: bit_vector(7 downto 0); write(buffw, int1, right, 6); -- int1 을 string 으로 바꿔 buffw 가 point -- 하는 buffer 에 right-justify 해서 6 character wide 로 write. -- buffw 는 adjust 되어 다음을 point 함. write(buffw, bv8, right, 10); writeline(buffw, output_file); -- output_file 로 buffer 내용을 write.

ex) file 내용이 다음과 같다. fill_memory procedure is called. 12AC 7 (7 hex bytes follow) AE 03 B6 91 C7 00 0C (LDX imm, LDA dir, STA ext) 005B 2 ( 2 hex bytes follow) 01 FC