Systems Architecture Lab: Introduction to VHDL

Slides:



Advertisements
Similar presentations
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
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.
Mridula Allani Fall 2010 (Refer to the comments if required) ELEC Fall 2010, Nov 21(Adopted from Profs. Nelson and Stroud)
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
02/02/20091 Logic devices can be classified into two broad categories Fixed Programmable Programmable Logic Device Introduction Lecture Notes – Lab 2.
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.
VHDL Intro What does VHDL stand for? VHSIC Hardware Description Language VHSIC = Very High Speed Integrated Circuit Developed in 1982 by Govt. to standardize.
1/31/20081 Logic devices can be classified into two broad categories Fixed Programmable Programmable Logic Device Introduction Lecture Notes – Lab 2.
HDL-Based Digital Design Part I: Introduction to VHDL (I) Dr. Yingtao Jiang Department Electrical and Computer Engineering University of Nevada Las Vegas.
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
Propositional Calculus Math Foundations of Computer Science.
CSET 4650 Field Programmable Logic Devices Dan Solarek VHDL Behavioral & Structural.
GOOD MORNING.
1 H ardware D escription L anguages Basic Language Concepts.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
SUPLEMENTARY CHAPTER 1: An Introduction to Digital Logic The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
1 Combinational Logic Lecture #6. 모바일컴퓨터특강 2 강의순서 Decoder 3x8 Mux 4x1 Mux 8x1 Mux 8x1 4bits Half Adder Full Adder Ripple carry Adder 4-bit Adder.
Apr. 3, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 3: Review of Digital Circuits and Logic Design Jeremy R. Johnson Mon. Apr.
ASIC 121: Practical VHDL Digital Design for FPGAs Tutorial 1 September 27, 2006.
CWRU EECS 317 EECS 317 Computer Design LECTURE 1: The VHDL Adder Instructor: Francis G. Wolff Case Western Reserve University.
מבנה מחשב תרגול 2. 2 Boolean AND Operation Truth Table Equivalent Gate Different notations:
Digital Logic. 2 Abstractions in CS (gates) Basic Gate: Inverter IO IO GNDI O Vcc Resister (limits conductivity) Truth Table.
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
HARDWARE DESCRIPTION LANGUAGE (HDL). What is HDL? A type of programming language for sampling and modeling of electronic & logic circuit designs It can.
ECE 331 – Digital System Design Multiplexers and Demultiplexers (Lecture #13)
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
9/9/2006DSD,USIT,GGSIPU1 Concurrent vs Sequential Combinational vs Sequential logic –Combinational logic is that in which the output of the circuit depends.
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
Explain Half Adder and Full Adder with Truth Table.
Combinational logic circuit
Computer Architecture & Operations I
Computer Architecture & Operations I
CS 270: Mathematical Foundations of Computer Science
Basic Language Concepts
Subject Name: FUNDAMENTALS OF HDL Subject Code: 10EC45
Behavioral Style Combinational Design with VHDL
IAY 0600 Digital Systems Design
Dataflow Style Combinational Design with VHDL
Behavioral Style Combinational Design with VHDL
ENG6530 Reconfigurable Computing Systems
Jeremy R. Johnson Wed. Sept. 29, 1999
IAS 0600 Digital Systems Design
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
UNIT 2: Data Flow description
Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan
Field Programmable Gate Array
Field Programmable Gate Array
ECE 434 Advanced Digital System L08
Propositional Calculus: Boolean Algebra and Simplification
ECE 331 – Digital System Design
VHDL VHSIC Hardware Description Language VHSIC
IAS 0600 Digital Systems Design
Digital Logic.
Digital Systems Design 2
Concurrent vs Sequential
VHDL Introduction.
Digital Logic.
ECE 331 – Digital System Design
IAS 0600 Digital Systems Design
Digital Logic Circuits
Combinational Circuits
VHDL - Introduction.
Presentation transcript:

Systems Architecture Lab: Introduction to VHDL September 4, 1997 Systems Architecture Lab: Introduction to VHDL Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan May 9, 2001 Systems Architecture

September 4, 1997 Introduction Objective: To provide an introduction of digital design and simulation. To introduce the hardware description language VHDL and the VHDL simulator and design tools from SymphonyEDA: Sonata and VHDLSimili. Behavioral models Structural models Discrete event simulation signals events waveforms concurrency May 9, 2001 Systems Architecture

VHDL VHSIC Hardware Description Language IEEE standard Very High Speed Integrated Circuit IEEE standard IEEE 1076-1987 IEEE 1076-1993 A language for describing digital designs with several levels of abstraction behavioral (describe what the design does) structural (describe how the design is implemented) Tools exist for verifying designs and synthesizing hardware layout from designs specified in VHDL May 9, 2001 Systems Architecture

VHDL Simulation Since a VHDL program is a description of a design, it, by itself, does not compute anything. To verify a design, it must be simulated on a set of inputs. Simulation is “event driven” When inputs change (an event) the corresponding outputs are computed using rules specified in the design The state of the design may also change (sequential logic - e.g. memory, registers, or any state variables) Changes propagate throughout the system There may be delays Operations may occur concurrently May 9, 2001 Systems Architecture

Intro to VHDL Lab Objective: Prepare for the implementation of the MIPS ALU. To learn how to implement simple designs (both behavioral and structural) in VHDL using the VHDL simulator and design tools from SymphonyEDA: Sonata and VHDLSimili. Components multiplexor full adder and, or, not gates May 9, 2001 Systems Architecture

September 4, 1997 Boolean Functions A boolean variable has two possible values (true/false) (1/0). A boolean function has a number of boolean input variables and has a boolean valued output. A boolean function can be described using a truth table. There are 22n boolean function of n variables. s x0 x1 f 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 f x0 x1 s Multiplexor function May 9, 2001 Systems Architecture

Boolean Expressions A boolean expression is a boolean function. September 4, 1997 Boolean Expressions A boolean expression is a boolean function. Any boolean function can be written as a boolean expression Disjunctive normal form (sums of products) For each row in the truth table where the output is true, write a product such that the corresponding input is the only input combination that is true Not unique E.G. (multiplexor function) s  x0  x1 + s  x0  x1 + s  x0  x1 + s  x0  x1 s x0 x1 f 0 0 0 0 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 May 9, 2001 Systems Architecture

Simplification of Boolean Expressions September 4, 1997 Simplification of Boolean Expressions Simplifying multiplexor expression using boolean algebra s  x0  x1 + s  x0  x1 + s  x0  x1 + s  x0  x1 = s  x0  x1 + s  x0  x1 + s  x1  x0 + s  x1  x0 (commutative law) = s  x0  (x1 + x1) + s  x1  (x0 + x0) (distributive law) = s  x0  1 + s  x1  1 (inverse law) = s  x0 + s  x1 (identity law) Verify that the boolean function corresponding to this expression as the same truth table as the original function. May 9, 2001 Systems Architecture

September 4, 1997 Logic Circuits A single line labeled x is a logic circuit. One end is the input and the other is the output. If A and B are logic circuits so are: and gate or gate inverter (not) A B A B A May 9, 2001 Systems Architecture

September 4, 1997 Logic Circuits Given a boolean expression it is easy to write down the corresponding logic circuit Here is the circuit for the original multiplexor expression x0 x1 s May 9, 2001 Systems Architecture

September 4, 1997 Logic Circuits Here is the circuit for the simplified multiplexor expression x0 x1 s May 9, 2001 Systems Architecture

September 4, 1997 Multiplexor A multiplexor is a switch which routes n inputs to one output. The input is selected using a decoder. d0 d1 d2 d3 s1 s0 May 9, 2001 Systems Architecture

VHDL constructs Entity Port Architecture Signal implementation of an entity support for both behavioral and structural models Signal std_ulogic (from IEEE 1164 library) input/output signals internal signals inside an architecture assignment delays Vectors of signals (bus) May 9, 2001 Systems Architecture

Half Adder entity half_adder is port(a,b : in std_ulogic; sum,carry : out std_ulogic); end half_adder; a sum b carry May 9, 2001 Systems Architecture

MUX entity mux is port(I0, I1, I2, I3 : in std_ulogic; Sel : in std_ulogic_vector (1 downto 0); Z : out std_ulogic); end mux; I0 I1 I2 I3 Z Sel May 9, 2001 Systems Architecture

32-Bit ALU entity ALU32 is port(a,b : in std_ulogic_vector (31 downto 0); Op : in std_ulogic_vector (2 downto 0); result : out std_ulogic_vector (31 downto 0); zero : out std_ulogic; CarryOut : out std_ulogic; overflow : out std_ulogic); end ALU32; Op a b CarryOut Overflow Result Zero May 9, 2001 Systems Architecture

Half Adder Behavioral Implementation library IEEE; use IEEE.std_logic_1164.all; entity half_adder is port(a,b : in std_ulogic; sum,carry : out std_ulogic); end half_adder; architecture concurrent_behavior of half_adder is begin sum <= (a xor b) after 5 ns; carry <= (a and b) after 5 ns; end concurrent_behavior; May 9, 2001 Systems Architecture

Half Adder Structural Implementation library IEEE; use IEEE.std_logic_1164.all; entity half_adder is port(a,b : in std_logic; sum,carry : out std_logic); end half_adder; architecture structural of half_adder is component and_2 port(x,y : in std_logic; c : out std_logic); end component; May 9, 2001 Systems Architecture

Half Adder Implementation (cont.) component xor_2 port(x,y : in std_logic; c : out std_logic); end component; begin X1 : xor_2 port map(x => a, y => b, c =>sum); A1 : and_2 port map(x => a, y => b, c => carry); end structural; May 9, 2001 Systems Architecture

MUX Behavioral Implementation entity mux4 is port(I0, I1, I2, I3 : in std_ulogic; Sel : in std_ulogic_vector (1 downto 0); Z : out std_ulogic); end mux; architecture behavioral of mux4 is begin with Sel select Z <= I0 after 5 ns when “00”, I1 after 5 ns when “01” , I2 after 5 ns when “10”, I3 after 5 ns when “11”, ‘U’ after 5 ns when others; end behavioral; May 9, 2001 Systems Architecture

Simulation Model Signal changes are called events Whenever an input signal changes the output is recomputed changes are propagated there may be a delay Updates occur concurrently The history of changes on a signal produces a waveform (value vs. time) shows delays and dependencies May 9, 2001 Systems Architecture