Docsity

Understanding VHDL: The Industry Standard Language for Digital Design, Lecture notes of Embedded Systems

Partial preview of the text

Download Understanding VHDL: The Industry Standard Language for Digital Design and more Lecture notes Embedded Systems in PDF only on Docsity!

Why VHDL?

 (^) Shorter development time for electronic design  (^) Simpler maintenance  (^) Traditional : schematic design

VHDL Background

 (^) VHDL - VHSIC Hardware Description Language.  (^) Industry Standard Language.  (^) ‘70s and ‘80s by U.S Department of Defense.  (^) Sophisticated electronics components.  (^) Standardized by the IEEE in 1987.

VHDL Usage

 (^) High-tech companies like texas instruments, Intel and most European companies use VHDL.  (^) Universities use VHDL.  (^) VHDL groups to support new users.

VHDL Concepts

Architecture Bodies Hardware abstraction of a digital system Design Entity Entity A1 A2 A

Libraries in VHDL

library IEEE; use IEEE.std_logic_1164. all ; http:// www.csee.umbc.edu/portal/help/VHDL/packages/std_logic_ 64.vhd  (^) Logical operators like and, or , xor etc…  (^) Conversion functions like To_bit, To_bitvector etc…

Libraries in VHDL

use IEEE.std_logic_textio. all ; http:// www.csee.umbc.edu/portal/help/VHDL/packages/std_logic_tex tio.vhd For File operations like read, write. use IEEE.std_logic_arith. all ; http://www.csee.umbc.edu/portal/help/VHDL/packages/std_log ic_arith_syn.vhd For arithmetic operations like +,_, ABS, *, <,>, <=,>=,/, SHR,

Libraries in VHDL

use IEEE.math_real. all ; http://www.csee.umbc.edu/portal/help/VHDL/packages/mathpack.vhd Functions like SQRT, EXP, LOG, LOG10, SIN, COS, TAN, SINH, COSH, ARCSIN, ARCCOS, ARCTAN, TANH, ARCSINH, ARCCOSH, ARCTANH etc… use IEEE.math_complex. all ; http://www.csee.umbc.edu/portal/help/VHDL/packages/mathpack.vhd Functions like COMPLEX_TO_POLAR, POLAR_TO_COMPLEX, ABS, SQRT, EXP, LOG, SIN, COS, TAN, SINH, COSH, TANH, +,-,,/ etc…* 10

Entity Declaration Syntax

entity NAME_OF_ENTITY is port ( signal_names : mode type ; signal_names : mode type ; : signal_names : mode type ); end [NAME_OF_ENTITY] ; NAME_OF_ENTITY: user defined Signal_names: list of signals (both input and output) Mode: in, out, buffer, inout type: boolean, integer, character, std_logic 11

Example of Half Adder

library ieee; use ieee.std_logic_1164.all; entity half_adder is port(x,y: in std_logic; sum, carry: out std_logic); end half_adder; architecture myadd of half_adder is begin sum <= x xor y; carry <= x and y; end myadd;

Configuration

architecture- architecture- architecture- entity binding configuration  (^) A design entity can have multiple alternative architectures.  (^) A configuration specifies the architecture that is to be used to implement a design entity.

Compilation Process

 (^) Elaboration Phase  (^) Hierarchy of entity is expanded and Linked.  (^) Components are bound to the entities in library.  (^) Top –level entity is built as network of behavioral models.  (^) Storage is allocated for all data objects(signals, variables and co constants) declared in design.  (^) Initial values are assigned.  (^) Initialization Phase  (^) Effective values for explicitly declared signals are computed.  (^) Processes are executed once until they suspend.  (^) Simulation time is reset to 0 ns. Simulation Process

Signal  (^) communication between components.  (^) has past values, current values and future values.  (^) future values can be assigned using a signal assignment statement.  (^) declared outside the process.  (^) can be seen as real, physical signals.  (^) Some delay must be incurred in a signal assignment.  (^) Example: signal GATE_DELAY: TIME:=10NS;  (^) Literal – represents constant values.  (^) Operators – operate on data objects. VHDL Language Elements 19

 (^) Identifier  (^) Sequence of 1 or more characters.  (^) A legal character is an upper case or lower case or a digit or underscore.  1 st (^) character must be a letter and the last character may not be underscore.  (^) Lower-case and Upper-case letters are identical when used in an identifier. E.g., Count, COUNT, CounT.  (^) Two underscore characters cannot appear consecutively. VHDL Language Elements