Chapter 2 Basic Logic Circuits and VHDL Description

Size: px
Start display at page:

Download "Chapter 2 Basic Logic Circuits and VHDL Description"

Transcription

1 Chapter 2 Basic Logic Circuits and VHDL Description We cannot solve our problems with the same thinking we used when we created them Albert Einstein Like a C or C++ programmer don t apply the logic. Design the combinational logic by using the HDL Learn the VHDL constructs and imagine the synthesizable designs and RTL designs using VHDL! Abstract This chapter describes the overview of various combinational logic elements. The chapter is organized in such a way that reader will be able to understand the concept of synthesizable RTL for the logic gates and small gate count combinational designs using synthesizable VHDL constructs. This chapter describes the basic logic gates, adders, gray-to-binary and binary-to-gray code converters. This chapter also covers the key practical concepts while designing by using the combinational logic elements. Keywords RTL Synthesis AND NOT OR NOR XOR XNOR Tri-state Bus Truth table Combinational Code converter Adder Gray Binary ALU Critical path Arithmetic operations Logic minimization Nine-valued logic De Morgan s theorem The original version of this chapter was revised: The incorrect information have been corrected. The erratum to this chapter is available at / _12 Springer Nature Singapore Pte Ltd V. Taraate, PLD Based Design with VHDL, DOI / _2 23

2 24 2 Basic Logic Circuits and VHDL Description 2.1 Introduction to Combinational Logic Combinational logic is implemented by the logic gates, and in the combinational logic, output is the function of present input. The goal of designer is always to implement the logic using minimum number of logic gates or logic cells. Minimization techniques are K-map, Boolean algebra, Shannon s expansion theorems, and hyperplanes. The conventional design technique using the Boolean algebra can be used for better understanding of the design functionality. The familiarity of the De Morgan s theorem and logic minimization technique can play an important role while coding for the design functionality. The De Morgan s theorem states that 1. Bubbled OR is equal to NAND. 2. Bubbled AND is equal to NOR. The NOR and NAND gates are universal logic elements and used to design the digital circuit functionality. NOR and NAND can be used as universal logic cells. Figure 2.1 gives more explanation about the De Morgan s Theorem. The thought process of designer should be such that the design should have the optimal performance with lesser area density. The area minimization techniques play an important role in the design of combinational logic or functions. In the present scenario, designs are very complex; the design functionality is described using the hardware description language as VHDL or Verilog. The subsequent section focuses on the use of VHDL RTL to describe the combinational design. Figure 2.2 illustrates the different types of combinational logic elements. This chapter discusses the basic combinational logic elements used to design the logic circuits. The complex combinational logic circuits are discussed in the subsequent chapters. Fig. 2.1 De Morgan s theorems

3 2.2 Logic Gates and Synthesizable RTL Using VHDL 25 Fig. 2.2 Combinational logic elements 2.2 Logic Gates and Synthesizable RTL Using VHDL This section discusses about the logic gates and the synthesizable VHDL RTL. In this section, the key VHDL constructs to describe the basic combinational logic gates are discussed. To have a good understanding of VHDL, let us discuss on the key VHDL terminologies used to describe the combinational logic. Let us make our life simpler by understanding the logical operators as shown in Table 2.1. Table 2.1 Logical operators Logical operators NOT/not Operator description Used as negation or to complement the input or signal VHDL description y_out <= NOT(a_in); OR/or To perform logical OR operation y_out <= a_in OR b_in; NOR/nor To perform logical NOR operation y_out <= a_in NOR b_in; AND/and To perform logical AND operation y_out <= a_in AND b_in; NAND/nand To perform logical NAND operation y_out <= a_in NAND b_in; XOR/xor To perform logical XOR operation y_out <= a_in XOR b_in; XNOR/xnor To perform logical XNOR operation y_out <= a_in XNOR b_in;

4 26 2 Basic Logic Circuits and VHDL Description In the subsequent section, the logic design is described by using the concurrent process statement and if-then-else constructs NOT or Invert Logic NOT logic complements the input. Not logic is also called as inverter or complement logic. Synthesizable RTL is shown in Example 2.1. The truth table of NOT logic is shown in Table 2.2. Example 2.1 Synthesizable VHDL code for NOT logic Note Operator (<=) is used for the port or signal assignment. On the other hand, concurrent construct process is used to infer both combinational and sequential logic by using the required VHDL constructs.

5 2.2 Logic Gates and Synthesizable RTL Using VHDL 27 Table 2.2 Truth table for NOT logic a_in y_out The use of the STD_LOGIC is nine-valued logic, and for the NOT function it is described below. Input U X 0 1 Z W L H Output U X 1 0 X X 1 0 X Synthesis result for the NOT logic is shown in Fig. 2.3; input port of not logic gate is named as a_in and output as y_out. The implementation of NOT using universal NAND and NOR logic gate is shown in Fig Fig. 2.3 Synthesis result for the NOT logic Fig. 2.4 NOT gate implementation using universal logic gates

6 28 2 Basic Logic Circuits and VHDL Description Two-Input OR Logic OR logic generates output as logical 1 when one of the inputs is logical 1. Synthesis result is shown in Example 2.2. The truth table of OR logic is shown in Table 2.3. Example 2.2 Synthesizable VHDL code for two-input OR logic Note While describing the design functionality, make sure that all the input ports are listed in the sensitivity list. Missing required signal from sensitivity list will create simulation and synthesis mismatch and will be discussed in the subsequent chapters. Table 2.3 Truth table for two-input OR logic a_in b_in y_out

7 2.2 Logic Gates and Synthesizable RTL Using VHDL 29 Fig. 2.5 Synthesis result for two-input OR logic Fig. 2.6 OR gate implementation using universal gates Synthesis result for the OR logic is shown in Fig. 2.5, input ports of OR logic gate are named as a_in and b_in and output as y_out. Using universal logic gates the implementation of OR gate is shown in Fig Two-Input NOR Logic NOR logic is opposite or complement of the OR logic. Synthesizable RTL is shown in Example 2.3. The truth table of NOR logic is shown in Table 2.4. Synthesis result for the NOR logic is shown in Fig. 2.7; input ports of NOR logic gates are named as a_in and b_in and output as y_out. Two-input NOR gate implementation using universal logic gates is shown in Fig Fig. 2.7 Synthesized two-input NOR logic

8 30 2 Basic Logic Circuits and VHDL Description Fig. 2.8 NOR gate implementation using universal gates Example 2.3 Synthesizable VHDL code for NOR logic Table 2.4 Truth table for two-input NOR logic a_in b_in y_out

9 2.2 Logic Gates and Synthesizable RTL Using VHDL Two-Input AND Logic AND logic generates an output as logical 1 when both the inputs a_in and b_in are logical 1. Synthesizable RTL is shown in Example 2.4. The truth table of AND logic is shown in Table 2.5. Example 2.4 Synthesizable VHDL code for AND logic Note AND gate is visualized as a series of two switches and used in programmable logic devices (PLD) as one of the elements to realize the required logic. Programmable AND plane can be created by using the AND logic gates with programmable inputs. Table 2.5 Truth table for two-input AND logic a_in b_in y_out

10 32 2 Basic Logic Circuits and VHDL Description Fig. 2.9 Synthesis result for two-input AND logic Fig AND gate implementation using universal gates Synthesized two-input AND logic is shown in Fig. 2.9; input ports of AND logic gate are named as a_in and b_in and output as y_out. Two-input AND gate implementation using minimum number of universal gates is shown in Fig Two-Input NAND Logic NAND logic is opposite or complement of the AND logic. Synthesizable RTL is shown in Example 2.5. The truth table of NAND logic is shown in Table 2.6 Table 2.6 Truth table for two-input NAND logic a_in b_in y_out

11 2.2 Logic Gates and Synthesizable RTL Using VHDL 33 Example 2.5 Synthesizable VHDL RTL for two-input NAND logic Note NAND logic is also treated as universal logic. By using NAND logic, all possible logic functions can be realized. NAND logic is used to implement the storage elements like latches or flip-flops and also to realize combinational functions. Synthesis result for the NAND logic is shown in Fig. 2.11; input ports of NAND logic gate are named as a_in and b_in and output as y_out. As stated earlier, NAND is universal gate, and implementation of NAND using NOR is shown in Fig Fig Synthesis result for the result for the two-input NAND logic

12 34 2 Basic Logic Circuits and VHDL Description Fig Implementation of NAND using universal gates Two-Input XOR Logic Two-input XOR is called as exclusive OR logic and generates output as logical 1 when both inputs are not equal. Synthesizable RTL is shown in Example 2.6. The truth table of XOR logic is shown in Table VHDL RTL for two input XOR library ieee; use ieee.std_logic_1164.all; en ty xor_logic_gate is port( a_in: in std_logic; b_in: in std_logic; y_out: out std_logic ); end xor_logic_gate; architecture arch_xor of xor_logic_gate is begin process(a_in, b_in) begin if (a_in/=b_in) then y_out <= '1'; else y_out <= '0'; end if; end process; end arch_xor; Entity is the pin out of the design named as xor_logic_gate that has three ports. Input ports are declared as a_in and b_in Output port is declared as y_out Architecture of the xor_logic_gate is named as arch_xor Architecture describes the relationship between the inputs and output. The procedural block Process is always sensitive to the changes specified in the sensitivity list. For any changes in the inputs a_in or b_in the process gets invoked. For the inputs, a_in is not equal to b_in output y_out = 1 otherwise output y_out = 0 For data flow model replace process block by using y_out <= a_in xor b_in; Example 2.6 Synthesizable VHDL code for two-input XOR logic

13 2.2 Logic Gates and Synthesizable RTL Using VHDL 35 Note XOR gate can be implemented by using two-input NAND gates. The number of two-input NAND gates required to implement two-input XOR gate are equal to 4. XOR gates are used to implement arithmetic operations like addition and subtraction. The implementation using minimum number of NAND gates is shown in Fig Table 2.7 Truth table for two-input XOR logic a_in b_in y_out Fig XOR gate implementation using NAND Fig Synthesis result for the two-input XOR logic Synthesis result for the two-input XOR logic is shown in Fig. 2.14; input ports of XOR logic gate are named as a_in and b_in and output as y_out. If XOR cell or gate is not available in the library, then XOR logic is realized using AND-OR-Invert or by using minimum number of NAND gates. XOR gate implementation using the universal gates is shown in Fig

14 36 2 Basic Logic Circuits and VHDL Description Fig XOR implementation using universal logic gates Two-Input XNOR Logic Two-input XNOR is called as exclusive NOR logic and generates output as logical 1 when two inputs are equal. XNOR is opposite or complement of XOR logic. Synthesizable RTL for XNOR is shown in Example 2.7. The truth table of XNOR logic is shown in Table 2.8. Synthesis result for the XNOR logic is shown in Fig. 2.16; input ports of XNOR logic gate are named as a_in and b_in and output as y_out. If XNOR cell is not available in the library, then XNOR logic is realized by using Invert-AND-OR or by using minimum number of NAND or NOR gates. The implementation of XNOR logic using universal gates is shown in Fig In the practical scenario, the XOR and XNOR gates are used in the parity detection to detect for the even or odd parity. The subsequent chapter focuses on the complex designs and the synthesis. The even parity detector is shown in Fig and uses the XOR and XNOR gates to generate active high value at the output for even number of 1 s in the input. The odd parity checker to detect for odd number of 1 s in the string is shown in Fig For odd number of 1 s, it generates the active high output. As shown in figure, it uses three XOR gates.

15 2.2 Logic Gates and Synthesizable RTL Using VHDL VHDL RTL for two input XNOR library ieee; use ieee.std_logic_1164.all; en ty xnor_logic_gate is port( a_in: in std_logic; b_in: in std_logic; y_out: out std_logic ); end xnor_logic_gate; architecture arch_xnor of xnor_logic_gate is begin process(a_in, b_in) begin if (a_in=b_in) then y_out <= '1'; else y_out <= '0'; end if; end process; end arch_xnor; Entity is the pin out of the design named as xnor_logic_gate that has three ports. Input ports are declared as a_in and b_in Output port is declared as y_out Architecture of the xnor_logic_gate is named as arch_xnor Architecture describes the relationship between the inputs and output. The procedural block Process is always sensitive to the changes specified in the sensitivity list. For any changes in the inputs a_in or b_in the process gets invoked. For the inputs, a_in is equal to b_in output y_out= 1 otherwise output y_out = 0 For data flow model replace process block by using y_out <= a_in xnor b_in; Example 2.7 Synthesizable VHDL code for XNOR logic Table 2.8 Truth table for XNOR logic a_in b_in y_out Fig Synthesis result for the XNOR logic

16 38 2 Basic Logic Circuits and VHDL Description Fig XNOR implementation using universal logic gates Fig Even-parity checker Fig Odd-parity checker Tri-State Logic Tri state has three logic states: logical 0, logical 1, and high impedance z. Synthesizable RTL is shown in Example 2.8. The truth table of tri-state logic is shown in Table 2.9.

17 2.2 Logic Gates and Synthesizable RTL Using VHDL 39 Example 2.8 Synthesizable VHDL code for tri-state bus logic Note Avoid use of tri-state logic while developing the RTL. Tri state is difficult to test. Instead of tri-state logic, it is recommended to use multiplexers to develop the logic with enable. Table 2.9 Truth table for tri-state logic Enable data_in data_out xxxx zzzz

19 2.3 Adder 41 Example 2.9 Synthesizable RTL code for half adder Note Half adders are used as basic component to perform the addition. Full adder logic circuits are designed using the instantiation of half adders as components. Synthesis result for the half adder is shown in Fig. 2.21; input ports of half adder are named as a_in and b_in and output as sum_out, carry_out. Fig Synthesis result for the half adder

20 42 2 Basic Logic Circuits and VHDL Description Full Adder Full adders are used to perform addition on three one-bit binary inputs. Consider three, one-bit binary numbers named as a_in, b_in, c_in and one-bit binary outputs as sum_out, carry_out. Table 2.11 is the truth table for full adder and RTL is described in Example Example 2.10 Synthesizable VHDL code for full adder Note Full adder consumes more area, so it is highly recommended to implement the adder logic using multiplexers. Subtraction can be performed by using 2 s complement addition.

21 2.3 Adder 43 Table 2.11 Truth table for full adder c_in a_in b_in sum_out carry_out Fig Synthesized full adder Synthesis result for the full adder is shown in Fig. 2.22; input ports of full adder are named as a_in, b_in, and c_in and output as sum_out, carry_out. In the practical design scenarios, the multiplexers (MUX) can be used to implement the addition and subtraction operations. MUX is universal logic and discussed in the Chap. 4. The realization of the full adder is shown in the following figure. As shown in Fig by using 2:1 MUX, the logic is realized. The concept of using MUX to realize Boolean functions or logic gates is important to understand the PLD-based designs. Readers are encouraged to implement the logic of all the basic combinational elements using minimum number of 2:1 MUX.

22 44 2 Basic Logic Circuits and VHDL Description Fig Realization of full adder using MUX 2.4 Code Converters This section deals with the commonly used code converters in the design. As name itself indicates, the code converters are used to convert the code from one number system to another number system. In the practical scenarios, binary-to-gray and gray-to-binary converters are used Binary-to-Gray Code Converter Base of binary number system is 2, for any multibit binary number one or more than one bit changes at a time. In gray code, only one bit changes at a time. if we compare two successive gray codes. The RTL description of 4-bit binary-to-gray code conversion is described in Example 2.11.

23 2.4 Code Converters 45 Example 2.11 Synthesizable VHDL code for 4-bit binary-to-gray code converter Note Gray codes are used in the multiple clock domain designs to transfer the control information from one of the clock domains to another clock domain. Synthesis result for the binary to gray code converter is shown in Fig Fig Synthesis result for the 4-bit binary-to-gray converter

24 46 2 Basic Logic Circuits and VHDL Description Gray-to-Binary Code Converter Gray-to-binary code converter is reverse of that of binary-to-gray, and the RTL description of 4-bit gray-to-binary code conversion is described in Example Example 2.12 Synthesizable VHDL code for 4-bit gray-to-binary code converter Note Gray codes are used in the gray counter implementation and also in the error correcting mechanism. Synthesis result for the 4-bit gray to binary code converter is shown in Fig

25 2.5 Summary 47 Fig Synthesis result for the 4-bit gray-to-binary converter 2.5 Summary As discussed already in this chapter, following are important points need to be considered while implementing combinational logic design using VHDL. 1. Use minimum area by using least number of logic gates; 2. NAND and NOR are universal logic gates and used to implement any combinational or sequential logic; 3. Use all the required signals in the sensitivity to avoid simulation and synthesis mismatch; 4. Avoid the usage of tri-state logic and implement the logic required using multiplexers with proper enable circuit. 5. Use less number of adders in design. Adders can be implemented using multiplexers; 6. Subtraction can be implemented using 2 s complement addition; 7. MUX can be used as universal logic to realize logic functions; 8. Parity can be checked by using the proper cascading of XOR and XNOR gates; 9. Gray codes are unique cyclic codes and can be used as error correcting codes.

26

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

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.

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

CONTENTS CHAPTER 1: NUMBER SYSTEM. Foreword...(vii) Preface... (ix) Acknowledgement... (xi) About the Author...(xxiii)

CONTENTS Foreword...(vii) Preface... (ix) Acknowledgement... (xi) About the Author...(xxiii) CHAPTER 1: NUMBER SYSTEM 1.1 Digital Electronics... 1 1.1.1 Introduction... 1 1.1.2 Advantages of Digital Systems...

Department of Technical Education DIPLOMA COURSE IN ELECTRONICS AND COMMUNICATION ENGINEERING. Fifth Semester. Subject: VHDL Programming

Department of Technical Education DIPLOMA COURSE IN ELECTRONICS AND COMMUNICATION ENGINEERING Fifth Semester Subject: VHDL Programming Contact Hours/Week : 04 Contact Hours/Semester : 64 CONTENTS No. Of

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

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

END-TERM EXAMINATION

(Please Write your Exam Roll No. immediately) END-TERM EXAMINATION DECEMBER 2006 Exam. Roll No... Exam Series code: 100919DEC06200963 Paper Code: MCA-103 Subject: Digital Electronics Time: 3 Hours Maximum

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

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

(ii) Simplify and implement the following SOP function using NOR gates:

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EE6301 DIGITAL LOGIC CIRCUITS UNIT I NUMBER SYSTEMS AND DIGITAL LOGIC FAMILIES PART A 1. How can an OR gate be

Lecture 12 VHDL Synthesis

CPE 487: Digital System Design Spring 2018 Lecture 12 VHDL Synthesis Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 1 What is Synthesis?

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)

VHDL. VHDL History. Why VHDL? Introduction to Structured VLSI Design. Very High Speed Integrated Circuit (VHSIC) Hardware Description Language

VHDL Introduction to Structured VLSI Design VHDL I Very High Speed Integrated Circuit (VHSIC) Hardware Description Language Joachim Rodrigues A Technology Independent, Standard Hardware description Language

VHDL for Complex Designs

ELEC 379 : DESIGN OF DIGITAL AND MICROCOMPUTER SYSTEMS 1998/99 WINTER SESSION, TERM 2 VHDL for Complex Designs This lecture covers VHDL features that are useful when designing complex logic circuits. After

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

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

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

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur-603 203 DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS YEAR / SEMESTER: II / III ACADEMIC YEAR: 2015-2016 (ODD

Two HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design

Two HDLs used today Introduction to Structured VLSI Design VHDL I VHDL and Verilog Syntax and ``appearance'' of the two languages are very different Capabilities and scopes are quite similar Both are industrial

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 Anurag Dwivedi Digital Design : Bottom Up Approach Basic Block - Gates Digital Design : Bottom Up Approach Gates -> Flip Flops Digital

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

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

REGISTER TRANSFER LANGUAGE

REGISTER TRANSFER LANGUAGE The operations executed on the data stored in the registers are called micro operations. Classifications of micro operations Register transfer micro operations Arithmetic micro

Written exam for IE1204/5 Digital Design Thursday 29/

Written exam for IE1204/5 Digital Design Thursday 29/10 2015 9.00-13.00 General Information Examiner: Ingo Sander. Teacher: William Sandqvist phone 08-7904487 Exam text does not have to be returned when

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

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:

Verilog. What is Verilog? VHDL vs. Verilog. Hardware description language: Two major languages. Many EDA tools support HDL-based design

Verilog What is Verilog? Hardware description language: Are used to describe digital system in text form Used for modeling, simulation, design Two major languages Verilog (IEEE 1364), latest version is

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATIONS ENGINEERING

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad - 00 0 ELECTRONICS AND COMMUNICATIONS ENGINEERING QUESTION BANK Course Name : DIGITAL DESIGN USING VERILOG HDL Course Code : A00 Class : II - B.

VHDL for Synthesis. Course Description. Course Duration. Goals

VHDL for Synthesis Course Description This course provides all necessary theoretical and practical know how to write an efficient synthesizable HDL code through VHDL standard language. The course goes

Contents. Appendix D Verilog Summary Page 1 of 16

Appix D Verilog Summary Page 1 of 16 Contents Appix D Verilog Summary... 2 D.1 Basic Language Elements... 2 D.1.1 Keywords... 2 D.1.2 Comments... 2 D.1.3 Identifiers... 2 D.1.4 Numbers and Strings... 3

FPGA BASED SYSTEM DESIGN. Dr. Tayab Din Memon Lecture 9 & 10 : Combinational and Sequential Logic

FPGA BASED SYSTEM DESIGN Dr. Tayab Din Memon tayabuddin.memon@faculty.muet.edu.pk Lecture 9 & 10 : Combinational and Sequential Logic Combinational vs Sequential Logic Combinational logic output depends

ENGIN 241 Digital Systems with Lab

ENGIN 241 Digital Systems with Lab (4) Dr. Honggang Zhang Engineering Department University of Massachusetts Boston 1 Introduction Hardware description language (HDL): Specifies logic function only Computer-aided

Arithmetic Operators There are two types of operators: binary and unary Binary operators:

Verilog operators operate on several data types to produce an output Not all Verilog operators are synthesible (can produce gates) Some operators are similar to those in the C language Remember, you are

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks

ECE 331: N0 ECE230 Review Professor Andrew Mason Michigan State University Spring 2013 1.1 Announcements Opening Remarks HW1 due next Mon Labs begin in week 4 No class next-next Mon MLK Day ECE230 Review

MLR Institute of Technology

MLR Institute of Technology Laxma Reddy Avenue, Dundigal, Quthbullapur (M), Hyderabad 500 043 Course Name Course Code Class Branch ELECTRONICS AND COMMUNICATIONS ENGINEERING QUESTION BANK : DIGITAL DESIGN

REGISTER TRANSFER AND MICROOPERATIONS

REGISTER TRANSFER AND MICROOPERATIONS Register Transfer Language Register Transfer Bus and Memory Transfers Arithmetic Microoperations Logic Microoperations Shift Microoperations Arithmetic Logic Shift

Systems Programming. Lecture 2 Review of Computer Architecture I

Systems Programming www.atomicrhubarb.com/systems Lecture 2 Review of Computer Architecture I In The Book Patt & Patel Chapter 1,2,3 (review) Outline Binary Bit Numbering Logical operations 2's complement

N-input EX-NOR gate. N-output inverter. N-input NOR gate

Hardware Description Language HDL Introduction HDL is a hardware description language used to design and document electronic systems. HDL allows designers to design at various levels of abstraction. It

Introduction to Verilog HDL. Verilog 1

Introduction to HDL Hardware Description Language (HDL) High-Level Programming Language Special constructs to model microelectronic circuits Describe the operation of a circuit at various levels of abstraction

Verilog for High Performance

Verilog for High Performance Course Description This course provides all necessary theoretical and practical know-how to write synthesizable HDL code through Verilog standard language. The course goes

Topics. Midterm Finish Chapter 7

Lecture 9 Topics Midterm Finish Chapter 7 ROM (review) Memory device in which permanent binary information is stored. Example: 32 x 8 ROM Five input lines (2 5 = 32) 32 outputs, each representing a memory

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

UNIT-III 1 KNREDDY UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT Register Transfer: Register Transfer Language Register Transfer Bus and Memory Transfers Arithmetic Micro operations Logic

Digital Design with FPGAs. By Neeraj Kulkarni

Digital Design with FPGAs By Neeraj Kulkarni Some Basic Electronics Basic Elements: Gates: And, Or, Nor, Nand, Xor.. Memory elements: Flip Flops, Registers.. Techniques to design a circuit using basic

UPY14602-DIGITAL ELECTRONICS AND MICROPROCESSORS Lesson Plan

UPY14602-DIGITAL ELECTRONICS AND MICROPROCESSORS Lesson Plan UNIT I - NUMBER SYSTEMS AND LOGIC GATES Introduction to decimal- Binary- Octal- Hexadecimal number systems-inter conversions-bcd code- Excess

structure syntax different levels of abstraction

This and the next lectures are about Verilog HDL, which, together with another language VHDL, are the most popular hardware languages used in industry. Verilog is only a tool; this course is about digital

Here is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this

This and the next lectures are about Verilog HDL, which, together with another language VHDL, are the most popular hardware languages used in industry. Verilog is only a tool; this course is about digital

Digital Design Using Digilent FPGA Boards -- Verilog / Active-HDL Edition

Digital Design Using Digilent FPGA Boards -- Verilog / Active-HDL Edition Table of Contents 1. Introduction to Digital Logic 1 1.1 Background 1 1.2 Digital Logic 5 1.3 Verilog 8 2. Basic Logic Gates 9

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

PLD (eg. PAL) Typically 8 logic elements Technology: AND-OR array. William Sandqvist

PLD (eg. PAL) Typically 8 logic elements Technology: AND-OR array CPLD (eg. MAX) Typically 64 Macrocells Technology : AND-OR array (larger MAX circuits uses MUX-tree technique) Gates with many inputs?

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES 1 Learning Objectives 1. Explain the function of a multiplexer. Implement a multiplexer using gates. 2. Explain the

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

BUILDING BLOCKS OF A BASIC MICROPROCESSOR Part PowerPoint Format of Lecture 3 of Book Decoder Tri-state device Full adder, full subtractor Arithmetic Logic Unit (ALU) Memories Example showing how to write

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital hardware modules that accomplish a specific information-processing task. Digital systems vary in

Computer Organization and Levels of Abstraction

Computer Organization and Levels of Abstraction Announcements Today: PS 7 Lab 8: Sound Lab tonight bring machines and headphones! PA 7 Tomorrow: Lab 9 Friday: PS8 Today (Short) Floating point review Boolean

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog

ECE 2300 Digital Logic & Computer Organization Spring 2018 More Sequential Logic Verilog Lecture 7: 1 Announcements HW3 will be posted tonight Prelim 1 Thursday March 1, in class Coverage: Lectures 1~7

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

14:332:231 DIGITAL LOGIC DESIGN. Hardware Description Languages

14:332:231 DIGITAL LOGIC DESIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 2013 Lecture #22: Introduction to Verilog Hardware Description Languages Basic idea: Language constructs

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

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) contents Memory: Introduction, Random-Access memory, Memory decoding, ROM, Programmable Logic Array, Programmable Array Logic, Sequential programmable

Injntu.com Injntu.com Injntu.com R16

1. a) What are the three methods of obtaining the 2 s complement of a given binary (3M) number? b) What do you mean by K-map? Name it advantages and disadvantages. (3M) c) Distinguish between a half-adder

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

Register Transfer Level in Verilog: Part I

Source: M. Morris Mano and Michael D. Ciletti, Digital Design, 4rd Edition, 2007, Prentice Hall. Register Transfer Level in Verilog: Part I Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National

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

REGISTER TRANSFER AND MICROOPERATIONS

1 REGISTER TRANSFER AND MICROOPERATIONS Register Transfer Language Register Transfer Bus and Memory Transfers Arithmetic Microoperations Logic Microoperations Shift Microoperations Arithmetic Logic Shift

A Brief Introduction to Verilog Hardware Definition Language (HDL)

www.realdigital.org A Brief Introduction to Verilog Hardware Definition Language (HDL) Forward Verilog is a Hardware Description language (HDL) that is used to define the structure and/or behavior of digital

Microcomputers. Outline. Number Systems and Digital Logic Review

Microcomputers Number Systems and Digital Logic Review Lecture 1-1 Outline Number systems and formats Common number systems Base Conversion Integer representation Signed integer representation Binary coded

Combinational Logic II

Combinational Logic II Ranga Rodrigo July 26, 2009 1 Binary Adder-Subtractor Digital computers perform variety of information processing tasks. Among the functions encountered are the various arithmetic

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT COE 202: Digital Logic Design Term 162 (Spring 2017) Instructor: Dr. Abdulaziz Barnawi Class time: U.T.R.: 11:00-11:50AM Class

Contents. Chapter 9 Datapaths Page 1 of 28

Chapter 9 Datapaths Page of 2 Contents Contents... 9 Datapaths... 2 9. General Datapath... 3 9.2 Using a General Datapath... 5 9.3 Timing Issues... 7 9.4 A More Complex General Datapath... 9 9.5 VHDL for

This tutorial gives a complete understanding on Computer Logical Organization starting from basic computer overview till its advanced architecture.

About the Tutorial Computer Logical Organization refers to the level of abstraction above the digital logic level, but below the operating system level. At this level, the major components are functional

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

INDEX Absorption law, 31, 38 Acyclic graph, 35 tree, 36 Addition operators, in VHDL (VHSIC hardware description language), 192 Algebraic division, 105 AND gate, 48 49 Antisymmetric, 34 Applicable input

Hardware Synthesis. References

Hardware Synthesis MidiaReshadi CE Department Science and research branch of Islamic Azad University Email: ce.srbiau@gmail.com 1 References 2 1 Chapter 1 Digital Design Using VHDL and PLDs 3 Some Definitions

VHDL: RTL Synthesis Basics. 1 of 59

VHDL: RTL Synthesis Basics 1 of 59 Goals To learn the basics of RTL synthesis. To be able to synthesize a digital system, given its VHDL model. To be able to relate VHDL code to its synthesized output.

Multi-valued Logic. Standard Logic IEEE 1164 Type std_ulogic is ( U, uninitialized

Multi-valued Logic Standard Logic IEEE 1164 Type std_ulogic is ( U, uninitialized X, unknown 0, logic 0 1, logic 1 Z, high impedance W, unknown L, logic 0 weak H, logic 1 weak - ); don t care Standard

Lecture 2 Hardware Description Language (HDL): VHSIC HDL (VHDL)

Lecture 2 Hardware Description Language (HDL): VHSIC HDL (VHDL) Pinit Kumhom VLSI Laboratory Dept. of Electronic and Telecommunication Engineering (KMUTT) Faculty of Engineering King Mongkut s University

Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis. Spring 2007 Lec #8 -- HW Synthesis 1

Verilog Synthesis Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis Spring 2007 Lec #8 -- HW Synthesis 1 Logic Synthesis Verilog and VHDL started out

Chapter 3 Part 2 Combinational Logic Design

University of Wisconsin - Madison ECE/Comp Sci 352 Digital Systems Fundamentals Kewal K. Saluja and Yu Hen Hu Spring 2002 Chapter 3 Part 2 Combinational Logic Design Originals by: Charles R. Kime and Tom

C-Based Hardware Design

LECTURE 6 In this lecture we will introduce: The VHDL Language and its benefits. The VHDL entity Concurrent and Sequential constructs Structural design. Hierarchy Packages Various architectures Examples

Speaker: Kayting Adviser: Prof. An-Yeu Wu Date: 2009/11/23

98-1 Under-Graduate Project Synthesis of Combinational Logic Speaker: Kayting Adviser: Prof. An-Yeu Wu Date: 2009/11/23 What is synthesis? Outline Behavior Description for Synthesis Write Efficient HDL

Verilog for Synthesis Ing. Pullini Antonio

Verilog for Synthesis Ing. Pullini Antonio antonio.pullini@epfl.ch Outline Introduction to Verilog HDL Describing combinational logic Inference of basic combinational blocks Describing sequential circuits

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

Assignment No. 1 1. State advantages of digital system over analog system. 2. Convert following numbers a. (138.56) 10 = (?) 2 = (?) 8 = (?) 16 b. (1110011.011) 2 = (?) 10 = (?) 8 = (?) 16 c. (3004.06)

Chapter 3. Gate-Level Minimization. Outlines

Chapter 3 Gate-Level Minimization Introduction The Map Method Four-Variable Map Five-Variable Map Outlines Product of Sums Simplification Don t-care Conditions NAND and NOR Implementation Other Two-Level

Lecture 2: Data Types, Modeling Combinational Logic in Verilog HDL. Variables and Logic Value Set. Data Types. Why use an HDL?

Why use an HDL? Lecture 2: Data Types, Modeling Combinational Logic in Verilog HDL Increase digital design engineer s productivity (from Dataquest) Behavioral HDL RTL HDL Gates Transistors 2K 10K gates/week

R07. Code No: V0423. II B. Tech II Semester, Supplementary Examinations, April

SET - 1 II B. Tech II Semester, Supplementary Examinations, April - 2012 SWITCHING THEORY AND LOGIC DESIGN (Electronics and Communications Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions

CHAPTER - 2 : DESIGN OF ARITHMETIC CIRCUITS

Contents i SYLLABUS osmania university UNIT - I CHAPTER - 1 : BASIC VERILOG HDL Introduction to HDLs, Overview of Digital Design With Verilog HDL, Basic Concepts, Data Types, System Tasks and Compiler

Verilog introduction. Embedded and Ambient Systems Lab

Verilog introduction Embedded and Ambient Systems Lab Purpose of HDL languages Modeling hardware behavior Large part of these languages can only be used for simulation, not for hardware generation (synthesis)

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

Basic Arithmetic (adding and subtracting)

Basic Arithmetic (adding and subtracting) Digital logic to show add/subtract Boolean algebra abstraction of physical, analog circuit behavior 1 0 CPU components ALU logic circuits logic gates transistors

Digital Fundamentals. Lab 6 2 s Complement / Digital Calculator

Richland College Engineering Technology Rev. 0. Donham Rev. 1 (7/2003) J. Horne Rev. 2 (1/2008) J. radbury Digital Fundamentals CETT 1425 Lab 6 2 s Complement / Digital Calculator Name: Date: Objectives:

Logic Synthesis. EECS150 - Digital Design Lecture 6 - Synthesis

Logic Synthesis Verilog and VHDL started out as simulation languages, but quickly people wrote programs to automatically convert Verilog code into low-level circuit descriptions (netlists). EECS150 - Digital

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad-500 014 Subject: Digital Design Using Verilog Hdl Class : ECE-II Group A (Short Answer Questions) UNIT-I 1 Define verilog HDL? 2 List levels of

Verilog Design Principles

16 h7fex // 16-bit value, low order 4 bits unknown 8 bxx001100 // 8-bit value, most significant 2 bits unknown. 8 hzz // 8-bit value, all bits high impedance. Verilog Design Principles ECGR2181 Extra Notes

Field Programmable Gate Array

Field Programmable Gate Array System Arch 27 (Fire Tom Wada) What is FPGA? System Arch 27 (Fire Tom Wada) 2 FPGA Programmable (= reconfigurable) Digital System Component Basic components Combinational

CS8803: Advanced Digital Design for Embedded Hardware

CS883: Advanced Digital Design for Embedded Hardware Lecture 2: Boolean Algebra, Gate Network, and Combinational Blocks Instructor: Sung Kyu Lim (limsk@ece.gatech.edu) Website: http://users.ece.gatech.edu/limsk/course/cs883

Digital System Design with SystemVerilog

Digital System Design with SystemVerilog Mark Zwolinski AAddison-Wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid Capetown Sydney Tokyo

CS211 Digital Systems/Lab. Introduction to VHDL. Hyotaek Shim, Computer Architecture Laboratory

CS211 Digital Systems/Lab Introduction to VHDL Hyotaek Shim, Computer Architecture Laboratory Programmable Logic Device (PLD) 2/32 An electronic component used to build reconfigurable digital circuits

QUESTION BANK FOR TEST

CSCI 2121 Computer Organization and Assembly Language PRACTICE QUESTION BANK FOR TEST 1 Note: This represents a sample set. Please study all the topics from the lecture notes. Question 1. Multiple Choice