EEL4712 Digital Design (VHDL Tutorial).

Slides:



Advertisements
Similar presentations
Verilog Intro: Part 1.
Advertisements

Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
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)
Introduction to VHDL (Lecture #5) ECE 331 – Digital System Design The slides included herein were taken from the materials accompanying Fundamentals of.
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
Introduction to VHDL Multiplexers. Introduction to VHDL VHDL is an acronym for VHSIC (Very High Speed Integrated Circuit) Hardware Description Language.
Introduction to VHDL CSCE 496/896: Embedded Systems Witawas Srisa-an.
ELEN 468 Lecture 191 ELEN 468 Advanced Logic Design Lecture 19 VHDL.
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi Some of the slides were taken from K Gaj’s lecture slides from GMU’s.
VHDL And Synthesis Review. VHDL In Detail Things that we will look at: –Port and Types –Arithmetic Operators –Design styles for Synthesis.
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
VHDL Asutosh Kar Asst. Prof. in IIIT, Bhubaneswar.
VHDL Training ©1995 Cypress Semiconductor 1 Introduction  VHDL is used to:  document circuits  simulate circuits  synthesize design descriptions 
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
1 Part I: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
Tutorial 1 Combinational Logic Synthesis. Introduction to VHDL VHDL = Very high speed Hardware Description Language VHDL and Verilog are the industry.
VHDL IE- CSE. What do you understand by VHDL??  VHDL stands for VHSIC (Very High Speed Integrated Circuits) Hardware Description Language.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
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.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
VHDL Very High Speed Integrated Circuit Hardware Description Language Shiraz University of shiraz spring 2011.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
VHDL Basics. VHDL BASICS 2 OUTLINE –Component model –Code model –Entity –Architecture –Identifiers and objects –Operations for relations VHDL ET062G &
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.
George Mason University Data Flow Modeling in VHDL ECE 545 Lecture 7.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
BASIC VHDL LANGUAGE ELEMENTS Digital Design for Instrumentation with VHDL 1.
VHDL Discussion Subprograms IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
ECOM 4311—Digital System Design with VHDL
Data Flow Modeling in VHDL
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.
VHDL Tutorial.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, Oct 14 CEC 220 Digital Circuit Design Slide 1 of 19.
George Mason University Data Flow Modeling of Combinational Logic ECE 545 Lecture 5.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
Hardware Description Languages: Verilog
IAY 0600 Digital Systems Design
Introduction To VHDL 홍 원 의.
A Case Study of the Rehosting from VHDL to Matlab/C
Basic Language Concepts
Subject Name: FUNDAMENTALS OF HDL Subject Code: 10EC45
Design Entry: Schematic Capture and VHDL
VHDL Basics.
Hardware Description Languages: Verilog
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Behavioral Modeling in Verilog
CHAPTER 10 Introduction to VHDL
VHDL VHSIC Hardware Description Language VHSIC
CPE 528: Lecture #4 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
VHDL Hardware Description Language
Data Flow Modeling of Combinational Logic
CPE/EE 422/522 Advanced Logic Design L11
VHDL Discussion Subprograms
IAS 0600 Digital Systems Design
CPE 528: Lecture #5 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
VHDL Introduction.
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
VHDL Discussion Subprograms
IAS 0600 Digital Systems Design
Hardware Modeling & Synthesis Using VHDL
VHDL Data Types Module F3.1.
Design units Lecture 2.
COE 202 Introduction to Verilog
Presentation transcript:

EEL4712 Digital Design (VHDL Tutorial)

Abstraction Levels Register Transfer Level (RTL): High-level VHDL designs usually described at this level Ref: VHDL: Modular Design and Synthesis of Cores and Systems, Z. Navabi, 2007

RTL Design Flow RTL Design Flow Hardware Generation Design Entry Testbench in VHDL Design Validation Compilation and Synthesis Post-synthesis Simulation Timing Analysis Gate-level Ref: VHDL: Modular Design and Synthesis of Cores and Systems, Z. Navabi, 2007

RTL Design Flow Design Entry Testbench Generation Design Validation Describing the design in VHDL in a top-down hierarchical fashion Testbench Generation Generate test data that can activate various functionality of the design Design Validation The process to check the design for any design flaws Can be done Simulation Assertion-based verification Formal Methods Compilation and Synthesis The process of automatic hardware generation from a RTL design Gate-level designs Ref: VHDL: Modular Design and Synthesis of Cores and Systems, Z. Navabi, 2007

Design Description Behavioral Description Structural Description Describe a system in terms of how it behaves Specifies the relations between input and output signals Structural Description Describe a system as a collection of gates that are interconnected to perform a function Example Consider a circuit that warns car passengers when the door is open or the seatbelt is not used whenever the engine is one Ref: https://www.seas.upenn.edu/~ese171/vhdl/vhdl_primer.html If (ignition is on) Begin warning <= (Door is open) or (seatbelt is off) end Behavioral Representation Structural Representation Ref: https://www.seas.upenn.edu/~ese171/vhdl/vhdl_primer.html

Basic Structure of a VHDL File VHDL Entity Interface (Entity Declaration) Body (Architecture) Sequential Combinational Processes Subprograms Ports ENTITY entity1 IS PORT ( i1, i2 : in std_logic; w1 : out std_logic ); END ENTITY entity1; ARCHITECTURE simple1 OF entity1 IS SIGNAL s1 : std_logic; BEGIN statement1; statement2; statement3; END ARCHITECTURE simple1; Ref: VHDL: Modular Design and Synthesis of Cores and Systems, Z. Navabi, 2007

Entity-Architecture Outline Ref: VHDL: Modular Design and Synthesis of Cores and Systems, Z. Navabi, 2007

Example: 2x1 Multiplexer Truth Table sel in1 in2 out 1 in1 output in2 1 sel We can create larger multiplexers with 2 to 1 multiplexers If (sel = ‘0’) then output <= in1; else output <= in2; end if;

Entity Ports The NAME_OF_ENTITY is a user-selected identifier entity NAME_OF_ENTITY is [ generic generic_declarations);]      port (signal_names: mode type;             signal_names: mode type;                 :             signal_names: mode type); end [NAME_OF_ENTITY] ; The NAME_OF_ENTITY is a user-selected identifier signal_names specify external interface signals. mode: indicates the signal direction: in: indicates that the signal is an input out: indicates that the signal is an output of the entity whose value can only be read by other entities that use it. Buffer: indicates that the signal is an output of the entity whose value can be read inside the entity’s architecture Inout: the signal can be an input or an output. type: a built-in or user-defined signal type Bit: can have the value 0 and 1 bit_vector: is a vector of bit values (e.g. bit_vector (0 to 7) std_logic, std_ulogic, std_logic_vector, std_ulogic_vector can have 9 values to indicate the value and strength of a signal. Std_ulogic and std_logic are preferred over the bit or bit_vector types. Boolean: can have the value TRUE and FALSE Integer: can have a range of integer values Real: can have a range of real values Character: any printing character Time: to indicate time Representing Value Uninitialized 'U' Forcing Unknown 'X' Forcing 0 '0' Forcing 1 '1' High Impedance 'Z' Weak Unknown 'W' Weak 0 'L' Weak 1 'H' Don’t care '-'   generic: generic declarations are optional and determine the local constants used for timing and sizing (e.g. bus widths) the entity. A generic can have a default value. The syntax for a generic follows,   generic ( constant_name: type [:=value] ; : constant_name: type [:=value] ); Ref: https://www.seas.upenn.edu/~ese171/vhdl/vhdl_primer.html

Entity Ports: Examples 2x1 Multiplexer Buzzer circuit in1 in2 output sel 1 entity mux_2x1 is port( in1 : in std_logic; in2 : in std_logic; sel : in std_logic; output : out std_logic); end mux_2x1; entity BUZZER is      port ( DOOR, IGNITION, SBELT: in std_logic;             WARNING: out std_logic);      end BUZZER; Ref: https://www.seas.upenn.edu/~ese171/vhdl/vhdl_primer.html

Architecture Body The architecture body specifies how the circuit operates and how it is implemented.  architecture architecture_name of NAME_OF_ENTITY is      -- Declarations            -- components declarations            -- signal declarations            -- constant declarations            -- function declarations            -- procedure declarations            -- type declarations :      begin      -- Statements             end architecture_name; Ref: https://www.seas.upenn.edu/~ese171/vhdl/vhdl_primer.html

Architecture Body: Examples 2x1 Multiplexer Buzzer architecture procedural of multiplexer is begin process (in1, in2, sel) begin if (sel = '0') then output <= in1; else output <= in2; end if; end process; end architecture procedural; architecture buzzer_arch of BUZZER is begin WARNING <= (not DOOR and IGNITION) or (not SBELT and IGNITION); end  buzzer_arch;

VHDL Operators Order of Processing **, ABS, NOT *, /, MOD, REM +, - XNOR XOR NOR NAND OR AND NOT Boolean Operators >= > <= < /= = Comparison ** / * REM MOD ABS - + Arithmetic & Concat. Order of Processing **, ABS, NOT *, /, MOD, REM +, - =, /=, <, <=, >, >= AND, OR, NAND, NOR, XOR, XNOR  Processing Ref: VHDL: Modular Design and Synthesis of Cores and Systems, Z. Navabi, 2007

Concurrent Assignment Statements Simple Signal Assignment Signal_name <= Expression  Selected Signal Assignment Set the value of the signal to one of the several options based on selection operation (only one can be true) Conditional Signal Assignment Set a signal to one of the several options (multiple conditions can be true) Generate Statements Provides a way to repeating a logical expression or a component instantiation with sel select output <= in1 when ‘0’, in2 when others; output <= in1 when sel=‘0’ else in2 when sel=‘1’ else ‘X’;

Sequential Assignment Statements Sequential statements execute sequentially within a process A process executes every time one of the signals in the sensitivity list changes Within a process, each statement is sequential Process statements without sensitivity list are like infinite loops You can use them in testbenches process_label :process(sensitivity_list) -- declarative part begin -- sequential statement end process process_label;

Sequential Assignment Statements If Statement Case Statement process(in1, in2, sel) begin if (sel = '0') then output <= in1; else output <= in2; end if; end process; process(in1, in2, sel) case sel is when '0' => output <= in1; when others => output <= in2; end case;

Component Instantiation Label: identifies unique instance of component Component Type: selects the desired declared component Port Map: connects Component to signals in the architecture SystemToTest Testbench Set input values, check output values Architecture Body label Component U_WITH_SELECT : mux_2x1(WITH_SELECT) port map ( in1 => in1, in2 => in2, sel => sel, output => output_with_select); What You Defined in the New Entity What You Instantiate Ref: VHDL: Modular Design and Synthesis of Cores and Systems, Z. Navabi, 2007

Questions?