Review. LIBRARY list of library names; USE library.package.object; ENTITY entity_name IS generic declarations PORT ( signal_name(s): mode signal_type;

Size: px
Start display at page:

Download "Review. LIBRARY list of library names; USE library.package.object; ENTITY entity_name IS generic declarations PORT ( signal_name(s): mode signal_type;"

Transcription

1 LIBRARY list of library names; USE library.package.object; Review ENTITY entity_name IS generic declarations PORT ( signal_name(s): mode signal_type; signal_name(s) : mode signal_type); END ENTITY entity_name; ARCHITECTURE architecture_name OF entity_name IS type declarations signal declarations constant declarations function definitions procedure definitions component declarations BEGIN concurrent statement; concurrent statement; END ARCHITECTURE architecture_name;

2 Examples simple adders Half Adder in1 in1 in2 Cout sum + in Cout sum

3 Half Adder LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY half_adder is PORT (in1, in2 : IN STD_LOGIC; Sum, Cout : OUT STD_LOGIC); END ENTITY half_adder; ARCHITECTURE func OF half_adder IS BEGIN Cout <= in1 in2; Sum <= in1 in2; END ARCHITECTURE func;

4 Full Adder half adder plus carry in in1 in2 Cin Cout sum

5 Full Adder LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY fulladder IS PORT(in1, in2, Cin : IN STD_LOGIC; Sum, Cout : OUT STD_LOGIC); END ENTITY fulladder; ARCHITECTURE logicfunc OF fulladder IS BEGIN Sum <= Cout <= END ARCHITECTURE logicfunc;

6 Full Adder same library, same entity ARCHITECTURE logicfunc2 OF fulladder IS SIGNAL Cout1, Sum1, Cout2 : STD_LOGIC; BEGIN Cout1 <= in1 and in2; Sum1 <= in1 xor in2; Cout2 <= Sum1 and Cin; Sum <= Sum1 xor Cin; Cout <= Cout1 or Cout1; END ARCHITECTURE logicfunc2;

7 Components allow entity reuse Component declaration - defines component - placed in declaration section of architecture COMPONENT component_name IS PORT ( signal_name(s) : mode type; signal_name(s) : mode type); END COMPONENT component_name; to create a specific instance of the component label: component_name PORT MAP (s1,, sn);

8 - LIBRARY ieee; -- Full Adder from half adders USE ieee.std_logic_1164.all; ENTITY fulladder2 IS PORT( A, B, Cin : IN STD_LOGIC; Sum, Cout : OUT STD_LOGIC); END ENTITY fulladder2; ARCHITECTURE func3 OF fulladder2 IS SIGNAL Cout1, Cout2, Sum1 : STD_LOGIC; COMPONENT half_adder IS PORT( in1, in2 : IN STD_LOGIC; Sum, Cout : OUT STD_LOGIC); END COMPONENT half_adder; BEGIN ha1: half_adder PORT MAP (A, B, Sum1, Cout1); ha2: half_adder PORT MAP (Sum1, Cin, Sum, Cout2); Cout <= Cout1 OR Cout2; END ARCHITECTURE func3;

9 Components where are they stored? Simplest file structure options: 1. fulladder2.vhd and half_adder.vhd in the same directory and included in the same project (Quartus will find even if not included in the project warning). 2. fulladder2 and half_adder source code in the same file.

10 Four bit adder variation 1 FA FA FA FA

11 Vectors grouping bits/lines in VHDL, items can be grouped BIT BIT_VECTOR STD_LOGIC STD_LOGIC_VECTOR CHARACTER STRING vector range defined in one of two ways: BIT_VECTOR ( 7 DOWNTO 0 ) BIT_VECTOR ( 0 TO 7)

12 -- Four bit ripple carry adder with full adder (page 1/2) library IEEE; use IEEE.std_logic_1164.all; ENTITY fulladder IS PORT( A, B, Cin : IN STD_LOGIC; Sum, Cout : OUT STD_LOGIC); END ENTITY fulladder; ARCHITECTURE logicfunc OF fulladder IS BEGIN Sum <= A xor B xor Cin; Cout <= (A and B) or (( A xor B) and Cin); END ARCHITECTURE logicfunc;

13 -- Four bit ripple carry adder with full adder (page 2/2) library ieee; use ieee.std_logic_1164.all; entity adder4_combin is port( X, Y : in std_logic_vector (3 downto 0); Ci : in std_logic; S : out std_logic_vector (3 downto 0); Co : out std_logic); end entity adder4_combin; architecture structure of adder4_combin is signal C : std_logic_vector (0 to 2); component fulladder is port ( A, B, Cin : in std_logic; Sum, Cout : out std_logic); end component fulladder; begin FA_0: fulladder port map (X(0), Y(0), Ci, S(0), C(0)); FA_1: fulladder port map (X(1), Y(1), C(0), S(1), C(1)); FA_2: fulladder port map (X(2), Y(2), C(1), S(2), C(2)); FA_3: fulladder port map (X(3), Y(3), C(2), S(3), Co); end architecture structure;

14 Four bit adder variation 2 want to put the full adder into a user library Step 1: Define a package in a separate file. or Include the package definition at the end of the file that defines the full adder entity.

15 -- Full adder and full adder package LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY fulladder IS PORT( A, B, Cin : IN STD_LOGIC; Sum, Cout : OUT STD_LOGIC); END ENTITY fulladder; ARCHITECTURE logicfunc OF fulladder IS BEGIN Sum <= A xor B xor Cin; Cout <= (A and B) or (( A xor B) and Cin); END ARCHITECTURE logicfunc; LIBRARY ieee; USE ieee.std_logic_1164.all; PACKAGE fa_p IS COMPONENT fulladder IS PORT( A, B, Cin : IN STD_LOGIC; Sum, Cout : OUT STD_LOGIC); END COMPONENT fulladder; END PACKAGE fa_p;

16 Four bit adder variation 2 want to put the full adder into a user library Step 2: Program calls the library containing the package. *** When using a library, the component declaration is not required.

17 -- Four bit ripple carry adder using a full adder package library IEEE; use IEEE.std_logic_1164.all; use work.fa_p.fulladder; entity adder4 is port(x, Y : in std_logic_vector (3 downto 0); Ci : in std_logic; S : out std_logic_vector (3 downto 0); Co : out std_logic); end entity adder4; architecture structure of adder4 is signal C : std_logic_vector (0 to 2); begin FA_0: fulladder port map (X(0), Y(0), Ci, S(0), C(0)); FA_1: fulladder port map (X(1), Y(1), C(0), S(1), C(1)); FA_2: fulladder port map (X(2), Y(2), C(1), S(2), C(2)); FA_3: fulladder port map (X(3), Y(3), C(2), S(3), Co); end architecture structure;

18 Sixteen bit adder general case If we want to expand the previous program to 16, 32, or 64 bits, it would be painful. Generalize by using: generic to specify the number of bits once in the entity the remainder of the code is written in terms of the generic variable for-generate loop to create all the required instances of the component

19 -- Sixteen bit ripple carry adder using generic and generate library ieee; use ieee.std_logic_1164.all; use work.fa_p.fulladder; entity addern is generic (n : integer := 16); port(x, Y : in std_logic_vector ( downto 0); Ci : in std_logic; S : out std_logic_vector ( downto 0); Co : out std_logic); end entity addern; architecture structure of addern is signal C : std_logic_vector (0 to ); begin FA_0 : fulladder port map (X(0), Y(0), Ci, S(0), C(0)); FA_n : for i in 1 to n-2 generate FA: fulladder port map (X( ), Y( ), C( ), S( ), C( )); end generate; FA_msb : fulladder port map (X( ), Y( ), C( ), S( ),Co); end architecture structure;

20 -- Sixteen bit ripple carry adder --> improving the general case library ieee; use ieee.std_logic_1164.all; use work.fa_p.fulladder; entity addern is generic (n : integer := 16); port(x, Y : in std_logic_vector ( downto 0); Ci : in std_logic; S : out std_logic_vector ( downto 0); Co : out std_logic); end entity addern; architecture structure of addern is signal C : std_logic_vector (0 to ); begin FA_0 : fulladder port map (X(0), Y(0), Ci, S(0), C(0)); FA_n : for i in 1 to n-2 generate FA: fulladder port map (X( ), Y( ), C( ), S( ), C( )); end generate; FA_msb : fulladder port map (X( ), Y( ), C( ), S( ),Co); end architecture structure;

21 Four bit adder using arithmetic Note: Package ieee.std_logic_unsigned.all allows use of binary numbers in arithmetic circuits.

22 -- Four bit adder using binary arithmetic library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity adderb is port (X, Y : in std_logic_vector (3 downto 0); Cin : in std_logic; S : out std_logic_vector (3 downto 0); Cout : out std_logic); end entity adderb; architecture behaviour of adderb is signal Sum : std_logic_vector (4 downto 0); begin Sum <= ('0' & X) + Y + Cin; S <= Sum(3 downto 0); Cout <= Sum(4); end architecture behaviour;

23 Constant Declaration for readability CONSTANT constant_name : type := value; e.g. constant bus_size : integer := 32; constant msb : integer := bus_size - 1;

Arithmetic Circuits. Nurul Hazlina Adder 2. Multiplier 3. Arithmetic Logic Unit (ALU) 4. HDL for Arithmetic Circuit

Arithmetic Circuits. Nurul Hazlina Adder 2. Multiplier 3. Arithmetic Logic Unit (ALU) 4. HDL for Arithmetic Circuit Nurul Hazlina 1 1. Adder 2. Multiplier 3. Arithmetic Logic Unit (ALU) 4. HDL for Arithmetic Circuit Nurul Hazlina 2 Introduction 1. Digital circuits are frequently used for arithmetic operations 2. Fundamental

More information

Concurrent Signal Assignment Statements (CSAs)

Concurrent Signal Assignment Statements (CSAs) Concurrent Signal Assignment Statements (CSAs) Digital systems operate with concurrent signals Signals are assigned values at a specific point in time. VHDL uses signal assignment statements Specify value

More information

Digital Systems Design

Digital Systems Design Digital Systems Design Review of Combinatorial Circuit Building Blocks: VHDL for Combinational Circuits Dr. D. J. Jackson Lecture 2-1 Introduction to VHDL Designer writes a logic circuit description in

More information

Basic Language Concepts

Basic Language Concepts Basic Language Concepts Sudhakar Yalamanchili, Georgia Institute of Technology ECE 4170 (1) Describing Design Entities a sum b carry Primary programming abstraction is a design entity Register, logic block,

More information

Mridula Allani Fall Fall

Mridula Allani Fall Fall Mridula Allani Fall 2010 Fall 2010 1 Model and document digital systems Hierarchical models System, RTL (Register Transfer Level), gates Different levels of abstraction Behavior, structure Verify circuit/system

More information

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language)

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language) Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits Hardware Description Language) 1 Standard ICs PLD: Programmable Logic Device CPLD: Complex PLD FPGA: Field Programmable

More information

VHDL Examples Mohamed Zaky

VHDL Examples Mohamed Zaky VHDL Examples By Mohamed Zaky (mz_rasmy@yahoo.co.uk) 1 Half Adder The Half Adder simply adds 2 input bits, to produce a sum & carry output. Here we want to add A + B to produce Sum (S) and carry (C). A

More information

EE261: Intro to Digital Design

EE261: Intro to Digital Design 2014 EE261: Intro to Digital Design Project 3: Four Bit Full Adder Abstract: This report serves to teach us, the students, about modeling logic and gives a chance to apply concepts from the course to a

More information

Abi Farsoni, Department of Nuclear Engineering and Radiation Health Physics, Oregon State University

Abi Farsoni, Department of Nuclear Engineering and Radiation Health Physics, Oregon State University Hardware description language (HDL) Intended to describe circuits textually, for a computer to read Evolved starting in the 1970s and 1980s Popular languages today include: VHDL Defined in 1980s by U.S.

More information

VHDL. ELEC 418 Advanced Digital Systems Dr. Ron Hayne. Images Courtesy of Cengage Learning

VHDL. ELEC 418 Advanced Digital Systems Dr. Ron Hayne. Images Courtesy of Cengage Learning VHDL ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Cengage Learning Design Flow 418_02 2 VHDL Modules 418_02 3 VHDL Libraries library IEEE; use IEEE.std_logic_1164.all; std_logic Single-bit

More information

Declarations of Components and Entities are similar Components are virtual design entities entity OR_3 is

Declarations of Components and Entities are similar Components are virtual design entities entity OR_3 is Reserved Words component OR_3 port (A,B,C: in bit; Z: out bit); end component ; Reserved Words Declarations of Components and Entities are similar Components are virtual design entities entity OR_3 is

More information

Hardware Description Language VHDL (1) Introduction

Hardware Description Language VHDL (1) Introduction Hardware Description Language VHDL (1) Introduction Digital Radiation Measurement and Spectroscopy NE/RHP 537 Introduction Hardware description language (HDL) Intended to describe circuits textually, for

More information

VHDL kod yerleşimi. kütüphaneler. Dış görünüş (entity: varlık) İşleyişi, yapısı (architecture: mimari)

VHDL kod yerleşimi. kütüphaneler. Dış görünüş (entity: varlık) İşleyişi, yapısı (architecture: mimari) VHDL Basics VHDL kod yerleşimi library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; kütüphaneler entity and_gate_3_1 is port ( a:in std_logic; b:in

More information

Review of Digital Design with VHDL

Review of Digital Design with VHDL Review of Digital Design with VHDL Digital World Digital world is a world of 0 and 1 Each binary digit is called a bit Eight consecutive bits are called a byte Hexadecimal (base 16) representation for

More information

Chapter 6 Combinational-Circuit Building Blocks

Chapter 6 Combinational-Circuit Building Blocks Chapter 6 Combinational-Circuit Building Blocks Commonly used combinational building blocks in design of large circuits: Multiplexers Decoders Encoders Comparators Arithmetic circuits Multiplexers A multiplexer

More information

Experiment 8 Introduction to VHDL

Experiment 8 Introduction to VHDL Experiment 8 Introduction to VHDL Objectives: Upon completion of this laboratory exercise, you should be able to: Enter a simple combinational logic circuit in VHDL using the Quartus II Text Editor. Assign

More information

UNIT I Introduction to VHDL VHDL: - V -VHSIC, H - Hardware, D - Description, L Language Fundamental section of a basic VHDL code Library :

UNIT I Introduction to VHDL VHDL: - V -VHSIC, H - Hardware, D - Description, L Language Fundamental section of a basic VHDL code Library : UNIT I Introduction to VHDL VHDL stands for very high-speed integrated circuit hardware description language. Which is one of the programming languages used to model a digital system by dataflow, behavioral

More information

VHDL Structural Modeling II

VHDL Structural Modeling II VHDL Structural Modeling II ECE-331, Digital Design Prof. Hintz Electrical and Computer Engineering 5/7/2001 331_13 1 Ports and Their Usage Port Modes in reads a signal out writes a signal inout reads

More information

1. Defining and capturing the design of a system. 2. Cost Limitations (low profit margin must sell millions)

1. Defining and capturing the design of a system. 2. Cost Limitations (low profit margin must sell millions) What is an Embedded System? A type of computer system ECEN 4856: Embedded System Design Lecture 2: Embedded System Standards Traditional Definitions Limited in hardware and software vs the PC Designed

More information

Advanced Electronics Lab.

Advanced Electronics Lab. College of Engineering Course Book of 2010-2011 Advanced Electronics Lab. Mr. Araz Sabir Ameen M.Sc. in Electronics & Communications ALTERA DE2 Development and Education Board DE2 Package: The DE2 package

More information

Lecture 1: VHDL Quick Start. Digital Systems Design. Fall 10, Dec 17 Lecture 1 1

Lecture 1: VHDL Quick Start. Digital Systems Design. Fall 10, Dec 17 Lecture 1 1 Lecture 1: VHDL Quick Start Digital Systems Design Fall 10, Dec 17 Lecture 1 1 Objective Quick introduction to VHDL basic language concepts basic design methodology Use The Student s Guide to VHDL or The

More information

What Is VHDL? VHSIC (Very High Speed Integrated Circuit) Hardware Description Language IEEE 1076 standard (1987, 1993)

What Is VHDL? VHSIC (Very High Speed Integrated Circuit) Hardware Description Language IEEE 1076 standard (1987, 1993) What Is VHDL? VHSIC (Very High Speed Integrated Circuit) Hardware Description Language IEEE 1076 standard (1987, 1993) Only possible to synthesize logic from a subset of VHDL Subset varies according to

More information

EECE-4740/5740 Advanced VHDL and FPGA Design. Lecture 3 Concurrent and sequential statements

EECE-4740/5740 Advanced VHDL and FPGA Design. Lecture 3 Concurrent and sequential statements EECE-4740/5740 Advanced VHDL and FPGA Design Lecture 3 Concurrent and sequential statements Cristinel Ababei Marquette University Department of Electrical and Computer Engineering Overview Components hierarchy

More information

EEL 4712 Digital Design Test 1 Spring Semester 2008

EEL 4712 Digital Design Test 1 Spring Semester 2008 IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with a reasonable effort, it is assumed wrong. Also, as always, the best answer gets the most points. COVER SHEET: Problem:

More information

6.111 Lecture # 5. Entity section describes input and output. VHDL: Very High speed integrated circuit Description Language:

6.111 Lecture # 5. Entity section describes input and output. VHDL: Very High speed integrated circuit Description Language: 6.111 Lecture # 5 VHDL: Very High speed integrated circuit Description Language: All VHDL files have two sections: architecture and entity -- Massachusetts (Obsolete) Stoplight Example library ieee; use

More information

LECTURE 4: The VHDL N-bit Adder

LECTURE 4: The VHDL N-bit Adder EECS 317 Computer Design LECTURE 4: The VHDL N-bit Adder Instructor: Francis G. Wolff wolff@eecs.cwru.edu Case Western Reserve University Review: N-Bit Ripple-Carry Adder Hierarchical design: 2-bit adder

More information

Contents. Appendix D VHDL Summary Page 1 of 23

Contents. Appendix D VHDL Summary Page 1 of 23 Appendix D VHDL Summary Page 1 of 23 Contents Appendix D VHDL Summary...2 D.1 Basic Language Elements...2 D.1.1 Comments...2 D.1.2 Identifiers...2 D.1.3 Data Objects...2 D.1.4 Data Types...2 D.1.5 Data

More information

Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification

Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification Ahmed Abu-Hajar, Ph.D. abuhajar@digitavid.net Digitavid, Inc San Jose, CA Session One Outline Introducing VHDL

More information

Very High Speed Integrated Circuit Har dware Description Language

Very High Speed Integrated Circuit Har dware Description Language Very High Speed Integrated Circuit Har dware Description Language Industry standard language to describe hardware Originated from work in 70 s & 80 s by the U.S. Departm ent of Defence Root : ADA Language

More information

Sudhakar Yalamanchili, Georgia Institute of Technology, 2006

Sudhakar Yalamanchili, Georgia Institute of Technology, 2006 Modeling Structure Sudhakar Yalamanchili, Georgia Institute of Technology, 2006 (1) Elements of Structural Models microphone To processor Micro 3284 headphones speakers amplifier Structural models describe

More information

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems EE 3610: Digital Systems 1 Lecture 3: Modeling in VHDL VHDL: Overview 2 VHDL VHSIC Hardware Description Language VHSIC=Very High Speed Integrated Circuit Programming language for modelling of hardware

More information

VHDL for FPGA Design. by : Mohamed Samy

VHDL for FPGA Design. by : Mohamed Samy VHDL for FPGA Design by : Mohamed Samy VHDL Vhdl is Case insensitive myvar = myvar = MYVAR IF = if = if Comments start with -- Comments can exist anywhere in the line Semi colon indicates the end of statements

More information

2/14/2016. Hardware Synthesis. Midia Reshadi. CE Department. Entities, Architectures, and Coding.

2/14/2016. Hardware Synthesis. Midia Reshadi. CE Department.   Entities, Architectures, and Coding. Hardware Synthesis MidiaReshadi CE Department Science and research branch of Islamic Azad University Email: ce.srbiau@gmail.com Midia Reshadi 1 Chapter 2 Entities, Architectures, and Coding Styles Midia

More information

Lattice VHDL Training

Lattice VHDL Training Lattice Part I February 2000 1 VHDL Basic Modeling Structure February 2000 2 VHDL Design Description VHDL language describes a digital system as a set of modular blocks. Each modular block is described

More information

VHDL. Official Definition: VHSIC Hardware Description Language VHISC Very High Speed Integrated Circuit

VHDL. Official Definition: VHSIC Hardware Description Language VHISC Very High Speed Integrated Circuit VHDL VHDL Official Definition: VHSIC Hardware Description Language VHISC Very High Speed Integrated Circuit VHDL Alternative (Student Generated) Definition Very Hard Digital Logic language VHDL Design

More information

Lecture 4. VHDL Fundamentals. George Mason University

Lecture 4. VHDL Fundamentals. George Mason University Lecture 4 VHDL Fundamentals George Mason University Required reading P. Chu, RTL Hardware Design using VHDL Chapter 3, Basic Language Constructs of VHDL 2 Design Entity ECE 448 FPGA and ASIC Design with

More information

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic George Mason University Reading Required P. Chu, FPGA Prototyping by VHDL Examples Chapter 3, RT-level

More information

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic George Mason University Reading Required P. Chu, FPGA Prototyping by VHDL Examples Chapter 3, RT-level

More information

Lecture 5: Aldec Active-HDL Simulator

Lecture 5: Aldec Active-HDL Simulator Lecture 5: Aldec Active-HDL Simulator 1. Objective The objective of this tutorial is to introduce you to Aldec s Active-HDL 9.1 Student Edition simulator by performing the following tasks on a 4-bit adder

More information

Computer-Aided Digital System Design VHDL

Computer-Aided Digital System Design VHDL بس م اهلل الر حم ن الر حی م Iran University of Science and Technology Department of Computer Engineering Computer-Aided Digital System Design VHDL Ramin Rajaei ramin_rajaei@ee.sharif.edu Modeling Styles

More information

VHDL Objects. Lecture 8: VHDL (2) Variables. VHDL Objects - Constant. Files. EE3109 Gopi K. Manne Fall 2007

VHDL Objects. Lecture 8: VHDL (2) Variables. VHDL Objects - Constant. Files. EE3109 Gopi K. Manne Fall 2007 Lecture 8: VHDL (2) VHDL Objects Four types of objects in VHDL Constants Variables Computer Aided Digital Design EE3109 Gopi K. Manne Fall 2007 Signals Files The scope of an object is as follows : Objects

More information

ECE 545 Lecture 8. Data Flow Description of Combinational-Circuit Building Blocks. George Mason University

ECE 545 Lecture 8. Data Flow Description of Combinational-Circuit Building Blocks. George Mason University ECE 545 Lecture 8 Data Flow Description of Combinational-Circuit Building Blocks George Mason University Required reading P. Chu, RTL Hardware Design using VHDL Chapter 7, Combinational Circuit Design:

More information

ELCT 501: Digital System Design

ELCT 501: Digital System Design ELCT 501: Digital System Lecture 4: CAD tools (Continued) Dr. Mohamed Abd El Ghany, Basic VHDL Concept Via an Example Problem: write VHDL code for 1-bit adder 4-bit adder 2 1-bit adder Inputs: A (1 bit)

More information

Design a 4 bit-adder. Then design a 4-7 decoder to show the outputs. Output Sum(4 bits) Adder. Output carry(1 bit)

Design a 4 bit-adder. Then design a 4-7 decoder to show the outputs. Output Sum(4 bits) Adder. Output carry(1 bit) Csc 343 Lab 2 Sep 28. 07 Objective: Design a 4 bit-adder. Then design a 4-7 decoder to show the outputs. Structure: Input A (4 bits) Input B (4 bit) Adder Output Sum(4 bits) Output carry(1 bit) input cin

More information

ACS College of Engineering. Department of Biomedical Engineering. Logic Design Lab pre lab questions ( ) Cycle-1

ACS College of Engineering. Department of Biomedical Engineering. Logic Design Lab pre lab questions ( ) Cycle-1 ACS College of Engineering Department of Biomedical Engineering Logic Design Lab pre lab questions (2015-2016) Cycle-1 1. What is a combinational circuit? 2. What are the various methods of simplifying

More information

CSCI Lab 3. VHDL Syntax. Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\

CSCI Lab 3. VHDL Syntax. Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\ CSCI 250 - Lab 3 VHDL Syntax Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\ Objectives 1. Learn VHDL Valid Names 2. Learn the presentation of Assignment and Comments 3. Learn Modes, Types, Array,

More information

Digital Design Laboratory Lecture 2

Digital Design Laboratory Lecture 2 ECE 280 / CSE 280 Digital Design Laboratory Lecture 2 Adder Design Basic building block is a full adder Chained together as a ripple carry adder Carry lookahead adder is an other option Propagate and generate

More information

Modeling Complex Behavior

Modeling Complex Behavior Modeling Complex Behavior Sudhakar Yalamanchili, Georgia Institute of Technology, 2006 (1) Outline Abstraction and the Process Statement Concurrent processes and CSAs Process event behavior and signals

More information

Embedded Systems CS - ES

Embedded Systems CS - ES Embedded Systems - 1 - REVIEW Hardware/System description languages VDHL VHDL-AMS SystemC TLM - 2 - VHDL REVIEW Main goal was modeling of digital circuits Modelling at various levels of abstraction Technology-independent

More information

Logic and Computer Design Fundamentals VHDL. Part 1 Chapter 4 Basics and Constructs

Logic and Computer Design Fundamentals VHDL. Part 1 Chapter 4 Basics and Constructs Logic and Computer Design Fundamentals VHDL Part Chapter 4 Basics and Constructs Charles Kime & Thomas Kaminski 24 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Overview

More information

Hardware Description Languages. Modeling Complex Systems

Hardware Description Languages. Modeling Complex Systems Hardware Description Languages Modeling Complex Systems 1 Outline (Raising the Abstraction Level) The Process Statement if-then, if-then-else, if-then-elsif, case, while, for Sensitivity list Signals vs.

More information

1. Using the for-generahon scheme, concurrent statements can be replicated a predetermined number of times.

1. Using the for-generahon scheme, concurrent statements can be replicated a predetermined number of times. Generate Statements Concurrent statements can be conditionally selected or replicated during the elaboration phase using the generate statement. There are two forms of the generate statement. 1. Using

More information

EE434 ASIC & Digital Systems

EE434 ASIC & Digital Systems EE434 ASIC & Digital Systems VHDL Sequential Processing Spring 2016 Dae Hyun Kim daehyun@eecs.wsu.edu 1 Sequential Statements Sequential statements are executed sequentially. Format ARCHITECTURE architecture_name

More information

IE1204 Digital Design L7: Combinational circuits, Introduction to VHDL

IE1204 Digital Design L7: Combinational circuits, Introduction to VHDL IE24 Digital Design L7: Combinational circuits, Introduction to VHDL Elena Dubrova KTH / ICT / ES dubrova@kth.se This lecture BV 38-339, 6-65, 28-29,34-365 IE24 Digital Design, HT 24 2 The multiplexer

More information

Experiment 18 Full Adder and Parallel Binary Adder

Experiment 18 Full Adder and Parallel Binary Adder Objectives Experiment 18 Full Adder and Parallel Binary Adder Upon completion of this laboratory exercise, you should be able to: Create and simulate a full adder in VHDL, assign pins to the design, and

More information

COE 405, Term 062. Design & Modeling of Digital Systems. HW# 1 Solution. Due date: Wednesday, March. 14

COE 405, Term 062. Design & Modeling of Digital Systems. HW# 1 Solution. Due date: Wednesday, March. 14 COE 405, Term 062 Design & Modeling of Digital Systems HW# 1 Solution Due date: Wednesday, March. 14 Q.1. Consider the 4-bit carry-look-ahead adder (CLA) block shown below: A 3 -A 0 B 3 -B 0 C 3 4-bit

More information

EEL 4712 Digital Design Test 1 Spring Semester 2007

EEL 4712 Digital Design Test 1 Spring Semester 2007 IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with a reasonable effort, it is assumed wrong. COVER SHEET: Problem: Points: 1 (15 pts) 2 (20 pts) Total 3 (15 pts) 4 (18 pts)

More information

Solutions - Homework 2 (Due date: October 9:30 am) Presentation and clarity are very important!

Solutions - Homework 2 (Due date: October 9:30 am) Presentation and clarity are very important! ECE-8L: Computer Logic Design Fall Solutions - Homework (Due date: October rd @ 9: am) Presentation and clarit are ver important! PROBLEM ( PTS) Complete the following table. Use the fewest number of bits

More information

Lecture 5: State Machines, Arrays, Loops. EE 3610 Digital Systems

Lecture 5: State Machines, Arrays, Loops. EE 3610 Digital Systems EE 3610: Digital Systems 1 Lecture 5: State Machines, Arrays, Loops BCD to Excess-3 (XS 3 ) Code Converter Example: Fig. 2-53 2 Easier to use one type of code (e.g. XS 3 ) over the other type (e.g. BCD)

More information

DOD, VHSIC ~1986, IEEE stnd 1987 Widely used (competition Verilog) Commercial VHDL Simulators, Synthesizers, Analyzers,etc Student texts with CDROMs

DOD, VHSIC ~1986, IEEE stnd 1987 Widely used (competition Verilog) Commercial VHDL Simulators, Synthesizers, Analyzers,etc Student texts with CDROMs DOD, VHSIC ~1986, IEEE stnd 1987 Widely used (competition Verilog) Commercial VHDL Simulators, Synthesizers, Analyzers,etc Student texts with CDROMs Entity Architecture Blocks CAE Symbol CAE Schematic

More information

Digital Systems Design

Digital Systems Design IAY 0600 Digital Systems Design VHDL discussion Dataflow Style Combinational Design Tallinn University of Technology Combinational systems Combinational systems have no memory. A combinational system's

More information

Introduction to VHDL #1

Introduction to VHDL #1 ECE 3220 Digital Design with VHDL Introduction to VHDL #1 Lecture 3 Introduction to VHDL The two Hardware Description Languages that are most often used in industry are: n VHDL n Verilog you will learn

More information

Lecture 4. VHDL Fundamentals. Required reading. Example: NAND Gate. Design Entity. Example VHDL Code. Design Entity

Lecture 4. VHDL Fundamentals. Required reading. Example: NAND Gate. Design Entity. Example VHDL Code. Design Entity Required reading Lecture 4 VHDL Fundamentals P. Chu, RTL Hardware Design using VHDL Chapter 3, Basic Language Constructs of VHDL George Mason University 2 Example: NAND Gate Design Entity a b z a b z 0

More information

ECE 545 Lecture 5. Data Flow Modeling in VHDL. George Mason University

ECE 545 Lecture 5. Data Flow Modeling in VHDL. George Mason University ECE 545 Lecture 5 Data Flow Modeling in VHDL George Mason University Required reading P. Chu, RTL Hardware Design using VHDL Chapter 4, Concurrent Signal Assignment Statements of VHDL 2 Types of VHDL Description

More information

Getting Started with Xilinx WebPack 13.1

Getting Started with Xilinx WebPack 13.1 Getting Started with Xilinx WebPack 13.1 B. Ackland June 2011 (Adapted from S. Tewksbury notes WebPack 7.1) This tutorial is designed to help you to become familiar with the operation of the WebPack software

More information

Mid-Term Exam Solutions

Mid-Term Exam Solutions CS/EE 26 Digital Computers: Organization and Logical Design Mid-Term Eam Solutions Jon Turner 3/3/3. (6 points) List all the minterms for the epression (B + A)C + AC + BC. Epanding the epression gives

More information

Tutorial 4 HDL. Outline VHDL PROCESS. Modeling Combinational Logic. Structural Description Instantiation and Interconnection Hierarchy

Tutorial 4 HDL. Outline VHDL PROCESS. Modeling Combinational Logic. Structural Description Instantiation and Interconnection Hierarchy CS3: Hardware Lab Tutorial 4 HDL Outline VHDL basic language concepts basic design methodology Examples A. Sahu Dept of Comp. Sc. & Engg. Indian Institute of Technology Guwahati i i i3 i4 Modeling Combinational

More information

VHDL HIERARCHICAL MODELING

VHDL HIERARCHICAL MODELING To incorporate hierarchy in VHDL we must add component declarations and component instantiations to the model. In addition, we need to declare internal signals to interconnect the components. We can also

More information

The VHDL Hardware Description Language

The VHDL Hardware Description Language The VHDL Hardware Description Language p. 1/? The VHDL Hardware Description Language CSEE W4840 Prof. Stephen A. Edwards Columbia University The VHDL Hardware Description Language p. 2/? Why HDLs? 1970s:

More information

VHDL 2 Combinational Logic Circuits. Reference: Roth/John Text: Chapter 2

VHDL 2 Combinational Logic Circuits. Reference: Roth/John Text: Chapter 2 VHDL 2 Combinational Logic Circuits Reference: Roth/John Text: Chapter 2 Combinational logic -- Behavior can be specified as concurrent signal assignments -- These model concurrent operation of hardware

More information

Hardware Modeling. VHDL Basics. ECS Group, TU Wien

Hardware Modeling. VHDL Basics. ECS Group, TU Wien Hardware Modeling VHDL Basics ECS Group, TU Wien VHDL Basics 2 Parts of a Design Unit Entity Architecture Configuration Package Package Package Body Library How to create a Design Unit? Interface to environment

More information

Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification Part II

Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification Part II Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification Part II Ahmed Abu-Hajar, Ph.D. abuhajar@digitavid.net Digitavid, Inc San Jose, CA VHDL Lexical Description Code

More information

Lecture 38 VHDL Description: Addition of Two [5 5] Matrices

Lecture 38 VHDL Description: Addition of Two [5 5] Matrices Lecture 38 VHDL Description: Addition of Two [5 5] Matrices -- First, write a package to declare a two-dimensional --array with five elements library IEEE; use IEEE.STD_LOGIC_1164.all; package twodm_array

More information

Polusabirač. design.vhd. testbench.vhd. library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all;

Polusabirač. design.vhd. testbench.vhd. library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; Polusabirač design.vhd use ieee.numeric_std.all; entity half_adder is i_bit1 : in std_logic; i_bit2 : in std_logic; o_sum : out std_logic; o_carry : out std_logic end half_adder; architecture rtl of half_adder

More information

Writing VHDL for RTL Synthesis

Writing VHDL for RTL Synthesis Writing VHDL for RTL Synthesis Stephen A. Edwards, Columbia University December 21, 2009 The name VHDL is representative of the language itself: it is a two-level acronym that stands for VHSIC Hardware

More information

Digital Systems Design

Digital Systems Design IAY 0600 Example: HalfAdder Behavior Structure Digital Systems Design a b Sum Carry 0 0 0 0 0 1 1 0 a b HalfAdder Sum Carry 1 0 1 0 VHDL discussion Dataflow Style Combinational Design 1 1 0 1 a Sum Sum

More information

Advanced Training Course on FPGA Design and VHDL for Hardware Simulation and Synthesis. 26 October - 20 November, 2009

Advanced Training Course on FPGA Design and VHDL for Hardware Simulation and Synthesis. 26 October - 20 November, 2009 2065-15 Advanced Training Course on FPGA Design and VHDL for Hardware Simulation and Synthesis 26 October - 20 November, 2009 FPGA Architectures & VHDL Introduction to Synthesis Nizar Abdallah ACTEL Corp.2061

More information

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents VHDL Testbench Tutorial 1 Contents 1 VHDL Testbench 2 Test Bench Syntax 3 Testbench Example: VHDL Code for Up Down Binary Counter 4 VHDL Testbench code for up down binary counter 5 Testbench Waveform for

More information

CCE 3202 Advanced Digital System Design

CCE 3202 Advanced Digital System Design CCE 3202 Advanced Digital System Design Lab Exercise #2 Introduction You will use Xilinx Webpack v9.1 to allow the synthesis and creation of VHDLbased designs. This lab will outline the steps necessary

More information

310/ ICTP-INFN Advanced Tranining Course on FPGA and VHDL for Hardware Simulation and Synthesis 27 November - 22 December 2006

310/ ICTP-INFN Advanced Tranining Course on FPGA and VHDL for Hardware Simulation and Synthesis 27 November - 22 December 2006 310/1780-10 ICTP-INFN Advanced Tranining Course on FPGA and VHDL for Hardware Simulation and Synthesis 27 November - 22 December 2006 VHDL & FPGA - Session 2 Nizar ABDALLH ACTEL Corp. 2061 Stierlin Court

More information

Architecture des Ordinateurs I

Architecture des Ordinateurs I Architecture des Ordinateurs I Part I: VHDL and Logic Design The Language VHDL Paolo.Ienne@epfl.ch EPFL I&C LAP Recommended Books: John F. Wakerly Digital design (3rd edition) Prentice Hall, 21 Peter J.

More information

COE 405 Design Methodology Based on VHDL

COE 405 Design Methodology Based on VHDL COE 405 Design Methodology Based on VHDL Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Outline Elements of VHDL Top-Down Design Top-Down Design with

More information

COVER SHEET: Total: Regrade Info: 5 (5 points) 2 (8 points) 6 (10 points) 7b (13 points) 7c (13 points) 7d (13 points)

COVER SHEET: Total: Regrade Info: 5 (5 points) 2 (8 points) 6 (10 points) 7b (13 points) 7c (13 points) 7d (13 points) EEL 4712 Midterm 2 Spring 2011 VERSION 1 Name: UFID: Sign your name here if you would like for your test to be returned in class: IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read

More information

-- Fill in values for each generic. -- Fill in values for each signal. SIGNAL load_start : std_ulogic := '1'; SIGNAL clock : std_ulogic := '0';

-- Fill in values for each generic. -- Fill in values for each signal. SIGNAL load_start : std_ulogic := '1'; SIGNAL clock : std_ulogic := '0'; -- Fill in values for each generic -- Fill in values for each signal SIGNAL load_start : std_ulogic := '1'; SIGNAL clock : std_ulogic := '0'; SIGNAL start : std_ulogic_vector(0 TO 15) := "0000000000000000";

More information

VHDL 3 BASIC OPERATORS AND ARCHITECTURE BODY. Design descriptions & design constructions examples are taken from foundation series examples

VHDL 3 BASIC OPERATORS AND ARCHITECTURE BODY. Design descriptions & design constructions examples are taken from foundation series examples 1 VHDL 3 BASIC OPERATORS AND ARCHITECTURE BODY Design descriptions & design constructions examples are taken from foundation series examples 2 What we have done in Lab 1 entity AND_Gate is port ( a : in

More information

EE6301 DIGITAL LOGIC CIRCUITS UNIT V VHDL PART A

EE6301 DIGITAL LOGIC CIRCUITS UNIT V VHDL PART A EE6301 DIGITAL LOGIC CIRCUITS UNIT V VHDL PART A 1. Write a VHDL code for 2 x 1 MUX. [N/D 14], [ M/J 16], [A/M 17] library ieee; use ieee.std_logic_1164.all; entity mux2_1 is port (a,b,sel:instd_logic;

More information

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools

ECE U530 Digital Hardware Synthesis. Course Accounts and Tools ECE U530 Digital Hardware Synthesis Prof. Miriam Leeser mel@coe.neu.edu Sept 13, 2006 Lecture 3: Basic VHDL constructs Signals, Variables, Constants VHDL Simulator and Test benches Types Reading: Ashenden

More information

VHDL is a hardware description language. The code describes the behavior or structure of an electronic circuit.

VHDL is a hardware description language. The code describes the behavior or structure of an electronic circuit. VHDL is a hardware description language. The code describes the behavior or structure of an electronic circuit. Its main applications include synthesis of digital circuits onto CPLD/FPGA (Complex Programmable

More information

Lab 3: Standard Combinational Components

Lab 3: Standard Combinational Components Lab 3: Standard Combinational Components Purpose In this lab you will implement several combinational circuits on the DE1 development board to test and verify their operations. Introduction Using a high-level

More information

Sign here to give permission to return your test in class, where other students might see your score:

Sign here to give permission to return your test in class, where other students might see your score: EEL 4712 Midterm 1 Spring 2017 VERSION 1 Name: UFID: Sign here to give permission to return your test in class, where other students might see your score: IMPORTANT: Please be neat and write (or draw)

More information

Design units can NOT be split across different files

Design units can NOT be split across different files Skeleton of a Basic VHDL Program This slide set covers the components to a basic VHDL program, including lexical elements, program format, data types and operators A VHDL program consists of a collection

More information

LANGUAGE VHDL FUNDAMENTALS

LANGUAGE VHDL FUNDAMENTALS LANGUAGE VHDL FUNDAMENTALS Introduction Entities and architectures Sentences and processes Objects Data types and operands Authors: Luis Entrena Arrontes, Celia López, Mario García, Enrique San Millán,

More information

PACKAGE. Package syntax: PACKAGE identifier IS...item declaration... END PACKAGE [identifier]

PACKAGE. Package syntax: PACKAGE identifier IS...item declaration... END PACKAGE [identifier] Modular Design PACKAGE Package is a collection of : - Type declaration - Component declaration - Constants declaration - Subprograms (functions or procedures) Package is a separate VHDL code consisting

More information

EE 595. Part II Design Units in VHDL. EE 595 EDA / ASIC Design Lab

EE 595. Part II Design Units in VHDL. EE 595 EDA / ASIC Design Lab EE 595 Part II Design Units in VHDL Design Units There are five type of design units in VHDL: Entities Architectures Packages Package Bodies Configurations Entities and architectures are the only two design

More information

Generatore di parità. LIBRARY ieee; USE ieee.std_logic_1164.all ; ENTITY xor2 IS PORT( A, B : in std_logic ; Y : out std_logic ) ; END xor2 ;

Generatore di parità. LIBRARY ieee; USE ieee.std_logic_1164.all ; ENTITY xor2 IS PORT( A, B : in std_logic ; Y : out std_logic ) ; END xor2 ; LIBRARY ieee; USE ieee.std_logic_1164.all ; ENTITY xor2 IS PORT( A, B : in std_logic ; Y : out std_logic ) ; END xor2 ; ARCHITECTURE arch1 OF Xor2 IS BEGIN Y

More information

Introduction. V H I S C Very High Speed Integrated Circuit. Hardware. Description. Language VHDL. What is VHDL? IEEE Standard (1) (2)

Introduction. V H I S C Very High Speed Integrated Circuit. Hardware. Description. Language VHDL. What is VHDL? IEEE Standard (1) (2) Introduction Sudhakar Yalamanchili, Georgia Institute of Technology, 2006 (1) VHDL What is VHDL? V H I S C Very High Speed Integrated Circuit Hardware Description Language IEEE Standard 1076-1993 (2) History

More information

Building Blocks. Entity Declaration. Entity Declaration with Generics. Architecture Body. entity entity_name is. entity register8 is

Building Blocks. Entity Declaration. Entity Declaration with Generics. Architecture Body. entity entity_name is. entity register8 is Building Blocks Entity Declaration entity entity_name is [signal] identifier {, identifier}: [mode] signal_type {; [signal] identifier {, identifier}: [mode] signal_type}); end [entity ] [entity_name];

More information

COVER SHEET: Total: Regrade Info: 2 (6 points) 3 (8 points) 4 (10 points) 8 (12 points) 6 (6 points) 7 (6 points) 9 (30 points) 10 (4 points)

COVER SHEET: Total: Regrade Info: 2 (6 points) 3 (8 points) 4 (10 points) 8 (12 points) 6 (6 points) 7 (6 points) 9 (30 points) 10 (4 points) EEL 4712 Midterm 2 Spring 2010 VERSION 1 Name: UFID: Sign your name here if you would like for your test to be returned in class: IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read

More information

Menu. Introduction to VHDL EEL3701 EEL3701. Intro to VHDL

Menu. Introduction to VHDL EEL3701 EEL3701. Intro to VHDL 3-Jul-1 4:34 PM VHDL VHDL: The Entity VHL: IEEE 1076 TYPE VHDL: IEEE 1164 TYPE VHDL: The Architecture Mixed-Logic in VHDL VHDL MUX examples See also example file on web: Creating graphical components (Component_Creation.pdf)

More information

COVER SHEET: Total: Regrade Info: 5 (14 points) 7 (15 points) Midterm 1 Spring 2012 VERSION 1 UFID:

COVER SHEET: Total: Regrade Info: 5 (14 points) 7 (15 points) Midterm 1 Spring 2012 VERSION 1 UFID: EEL 4712 Midterm 1 Spring 2012 VERSION 1 Name: UFID: IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with a reasonable effort, it is assumed wrong. As always, the best answer

More information