×
Aiming for the stars? Great, but did you have to build a rocket first.
--Your friends at LectureNotes
Close

Note for VHDL Programming - VHDL by Vj Rathore

  • VHDL Programming - VHDL
  • Note
  • 383 Views
  • 2 Offline Downloads
  • Uploaded 9 months ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

1 Digital System Design with PLDs and FPGAs VHDL Kuruvilla Varghese DESE Indian Institute of Science Kuruvilla Varghese Introduction / Features • Evolution – VHDL – VHSIC Hardware Description Language – DOD, USA 1970’s & 1980’s – IEEE 1076.3 • Schematic – Connectivity Information (Net list) – Hierarchy, but bottom-up – Portability (Schematic database, Libraries) – Controller (FSM) Design external – Design Description 2 • • • • Open standard Human readable Portability Documentation, Simulation, Synthesis • Hierarchical design (top-down or bottom-up) • Higher Level constructs • Supports library based design • Strict Type checking Kuruvilla Varghese 1

Text from page-2

Schematic 3 source: linuxtoys.org Kuruvilla Varghese VHDL Features 4 • Entity – Interface Specifications • Architecture – Functionality e.g. 4 bit comparator • Function a(3) b(3) a b = equals a(2) b(2) equals a(1) b(1) a(0) b(0) Function Kuruvilla Varghese 2

Text from page-3

Equality Comparator -- 4 bit equality comparator library ieee; use ieee.std_logic_1164.all; 5 bit - ‘0’, ‘1’ std_logic – ‘0’, ‘1’, ‘Z’, … in entity eqcomp is port (a, b: in std_logic_vector(3 downto 0); equals: out std_logic); end eqcomp; architecture arch_eqcomp of eqcomp is begin equals <= ‘1’ when (a = b) else ‘0’; end arch_eqcomp; buffer out inout buffer – has restrictions, we use signals (wires) for local feedback Kuruvilla Varghese Equality Comparator • Comments start with -- anywhere on the line • Library Packages Components, Functions, Procedures, Data Objects • Mode – in, out, inout, buffer 6 • Identifiers – Alphabetic, Numeric or underscore characters – Not case sensitive – The first character must be an alphabet – The last character cannot be an underscore – Two underscores in succession are not allowed • Range: downto, to (MSbit, LSbit) – Bit order, Byte order (Little Endian, Big Endian) Kuruvilla Varghese 3

Text from page-4

Syntax, Operators • Architecture Body – Architecture declaration • • • • • Component declarations Type declarations Constant declarations Signal declarations Function, Procedure definitions 7 • Logical Operators – and, nand, or, nor, xor, xnor, not These are defined for data type “bit” and “boolean” For “std_logic” data type these operators are overloaded in “ieee.std_logic_1164” package – Architecture statement Kuruvilla Varghese Operators • Arithmetic Operators – +, -, *, / – ** (exponentiation) – mod (modulo division) – rem (modulo remainder) – abs (absolute value) A mod B = A – B * N A rem B = A −  A / B  ∗ B 8 • These operators are defined for “integer” and “real” data types • For “std_logic” data type, these operators are overloaded in “ieee.std_logic_unsigned” package Kuruvilla Varghese 4

Lecture Notes