Digital Circuits II Lecture 6. Lab Demonstration 3 Using Altera Quartus II to Determine Simplified Equations & Entering Truth Table into VHDL

Similar documents
Logic Circuit Design

UNIVERSITI MALAYSIA PERLIS

Chapter 3 Describing Logic Circuits Dr. Xu

PE713 FPGA Based System Design

EASTERN MEDITERRANEAN UNIVERSITY COMPUTER ENGINEERING DEPARTMENT CMPE224 DIGITAL LOGIC SYSTEMS VHDL EXPERIMENT VII

Chapter 4 Combinational Logic Circuits

Chapter 4 Combinational Logic Circuits

Ring Counter. 4-bit Ring Counter using D FlipFlop. VHDL Code for 4-bit Ring Counter and Johnson Counter 1. Contents

Logic Design I (17.341) Fall Lecture Outline

Written exam IE1204/5 Digital Design Friday 13/

ECET 211 Electric Machines & Controls Lecture 7 Relays. Lecture 7 Relays

Arria V Timing Optimization Guidelines

Four-Way Traffic Light Controller Designing with VHDL

Lecture 2: Digital Logic Basis

CPE 100L LOGIC DESIGN I

CHAPTER FIVE - Flip-Flops and Related Devices

Topics. FPGA Design EECE 277. Combinational Logic Blocks. From Last Time. Multiplication. Dr. William H. Robinson February 25, 2005

Introduction to Simulation of Verilog Designs. 1 Introduction

Exercise 2: OR/NOR Logic Functions

CS/EE Homework 9 Solutions

Digital Fundamentals. Lab 4 EX-OR Circuits & Combinational Circuit Design

Odd-Prime Number Detector The table of minterms is represented. Table 13.1

Lab 1.1 PWM Hardware Design

In this lecture: Lecture 3: Basic Logic Gates & Boolean Expressions

Types of Control. Programmed Non-programmed. Program Counter Hardwired

2 Logic Gates THE INVERTER. A logic gate is an electronic circuit which makes logic decisions. It has one output and one or more inputs.

Gates and Circuits 1

DELD MODEL ANSWER DEC 2018

This Figure here illustrates the operation for a 2-input OR gate for all four possible input combinations.

CENG3430 RAPID PROTOTYPING OF DIGITAL SYSTEMS

Encoders. Lecture 23 5

Synthesis Minimizations and Mesh Algorithm Selection: An Extension of the Ultrasonic 3D Camera

EMT1250 LABORATORY EXPERIMENT. EXPERIMENT # 4: Combinational Logic Circuits. Name: Date:

Implementation of Full Adder using Cmos Logic

Function Table of an Odd-Parity Generator Circuit

Digital Electronic Concepts

EXPERIMENT 1: INTRODUCTION TO THE NEXYS 2. ELEC 3004/7312: Signals Systems & Controls EXPERIMENT 1: INTRODUCTION TO THE NEXYS 2

ECET 211 Electric Machines & Controls Lecture 7 Relays (1 of 2) Lecture 7 Relays

Combinational Logic Circuits. Combinational Logic

LOGIC GATES AND LOGIC CIRCUITS A logic gate is an elementary building block of a Digital Circuit. Most logic gates have two inputs and one output.

bus waveforms transport delta and simulation

Introduction to CMOS VLSI Design (E158) Lecture 5: Logic

ECET 211 Electric Machines & Controls Lecture 3-2 (Part 2 of 2) Motor Transformers and Distribution Systems

Exercise 1: AND/NAND Logic Functions

Daisy II. By: Steve Rothen EEL5666 Spring 2002

Quartus II Simulation with Verilog Designs

University of Technology

Subtractor Logic Schematic

Quartus II Simulation with Verilog Designs

Overview. This lab exercise requires. A windows computer running Xilinx WebPack A Digilent board. Contains material Digilent, Inc.

CSE 260 Digital Computers: Organization and Logical Design. Midterm Solutions

FPGA & Pulse Width Modulation. Digital Logic. Programing the FPGA 7/23/2015. Time Allotment During the First 14 Weeks of Our Advanced Lab Course

Asst. Prof. Thavatchai Tayjasanant, PhD. Power System Research Lab 12 th Floor, Building 4 Tel: (02)

KEYWORDS: Current mode gates, Current - mode logic, VHDL models, Mixed analogue digital system

Combinational logic. ! Regular logic: multiplexers, decoders, LUTs and FPGAs. ! Switches, basic logic and truth tables, logic functions

I hope you have completed Part 2 of the Experiment and is ready for Part 3.

Positive and Negative Logic

Lecture 15 Analysis of Combinational Circuits

Senior Capstone Project Proposal Reconfigurable FPGA Implementation Of Digital Communication System

Subject: Analog and Digital Electronics Code:15CS32

Generation of Digital System Test Patterns Based on VHDL Simulations

CSE 260 Digital Computers: Organization and Logical Design. Lab 4. Jon Turner Due 3/27/2012

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 5

Digital Fundamentals A Systems Approach Thomas L. Floyd First Edition

HDL CODE TO REALIZE ALL THE LOGIC GATES

ENGG1015: lab 3. Sequential Logic

Larger 5 & 6variable Karnaugh maps

Chapter 2 Introduction to Logic Circuits

ECET 211 Electric Machines & Controls Lecture 9-1 Adjustable-Speed Drives and PLC Installations (1 of 2)

Power Optimization in Stratix IV FPGAs

Objective Questions. (a) Light (b) Temperature (c) Sound (d) all of these

Name: Class: Date: 1. As more electronic systems have been designed using digital technology, devices have become smaller and less powerful.

Introduction to Simulation of Verilog Designs. 1 Introduction. For Quartus II 11.1

MODULE-4 Memory and programmable logic

Design of FPGA- Based SPWM Single Phase Full-Bridge Inverter

Introduction to Simulation of Verilog Designs. 1 Introduction. For Quartus II 13.0

Number system: the system used to count discrete units is called number. Decimal system: the number system that contains 10 distinguished

Digital Fundamentals 9/4/2017. Summary. Summary. Floyd. Chapter 3. The Inverter

SRV ENGINEERING COLLEGE SEMBODAI RUKMANI VARATHARAJAN ENGINEERING COLLEGE SEMBODAI

Combinational Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

THE UNIVERSITY OF TRINIDAD & TOBAGO

Digital Systems Design

Digital Fundamentals

EECS 150 Homework 4 Solutions Fall 2008

Lecture 3, Handouts Page 1. Introduction. EECE 353: Digital Systems Design Lecture 3: Digital Design Flows, Simulation Techniques.

DO NOT COPY DO NOT COPY

LOGIC DIAGRAM: HALF ADDER TRUTH TABLE: A B CARRY SUM. 2012/ODD/III/ECE/DE/LM Page No. 1

Digital Systems Principles and Applications TWELFTH EDITION. 3-3 OR Operation With OR Gates. 3-4 AND Operations with AND gates

Digital Systems Design

Efficient Parallel Real-Time Upsampling with Xilinx FPGAs

LIST OF EXPERIMENTS. KCTCET/ /Odd/3rd/ETE/CSE/LM

Introduction to Digital Signal Processing

Digital Logic Design ELCT 201

FPGA Based System Design

Introduction to Simulation of Verilog Designs Using ModelSim Graphical Waveform Editor. 1 Introduction. For Quartus II 13.1

Logic diagram: a graphical representation of a circuit

Understanding FLEX 8000 Timing

JDT LOW POWER FIR FILTER ARCHITECTURE USING ACCUMULATOR BASED RADIX-2 MULTIPLIER

Lecture 0: Introduction

DELD UNIT 3. Question Option A Option B Option C Option D Correct Option A B C

Transcription:

Digital Circuits II Lecture 6 Lab Demonstration 3 Using Altera Quartus II to Determine Simplified Equations & Entering Truth Table into VHDL References (Text Book): 1) Digital Electronics, 9 th editon, by William Kleitz, published by Pearson Spring 2015 Paul I-Hai Lin, Professor Dept. of Computer, Electrical and Information Technology Indiana University-Purdue University Fort Wayne Prof. Paul Lin 1 Lab Demo 3 Extra Features of Altera Quartus II Analysis & Synthesis Messages (no used input) Simplification Equations through Altera Quartus II Processing > Compilation Report Tools > Netlist Viewer Block Symbol file (*.bdf) creation Using VHDL features to enter truth table: SIGNAL, vector (bit array) WITH, SELECT, WHEN Prof. Paul Lin 2 1

VHDL Code for Example 5-9 The Boolean Equation X = A + B B + C B --ex5_9.vhd LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY ex5_9 IS PORT( a,b,c : IN std_logic; x : OUT std_logic); END ex5_9; ARCHITECTURE arc OF ex5_9 IS BEGIN x <=((a OR NOT b) AND (b OR c))and b; END arc; Prof. Paul Lin 3 Altera Quartus II Simplified Equation and Form of the Circuit Before Synthesize the Circuit Create New Project Assignments > Devices (EP3C16F484C6) File > New File > VHDL file (save as ex5_9.vhd) Assignments > Settings > Simulator Settings (Functional) Processing > Start Compilation Processing > Compilation Report ( to see Analysis & Synthesis Messages) Warning: Design contains 1 input pin(s) that do not drive logic No output dependent on input pin (a) Node Finder > List (to show a, b, c, and x) Create ex5_9.vwf file Processing > Generate Functional Simulation Netlist Processing > Start Simulation Prof. Paul Lin 4 2

Altera Quartus II Simplified Equation and Form of the Circuit Before Synthesize the Circuit Simulation Result X is HIGH for a AND b, regardless of c Prof. Paul Lin 5 Altera Quartus II Simplified Equation and Form of the Circuit Before Synthesize the Circuit Create Block Symbol file File > New > Other Files > Block Symbol File Ex5_9.bdf Connect inputs: a, b, c; and output x ex5_9 a b c x inst Prof. Paul Lin 6 3

Altera Quartus II Simplified Equation and Form of the Circuit Before Synthesize the Circuit View Simplified Equation Tools > Chip Planner > Edit > find > Find What: x > Find Next > Cancel In the Fan-In column click [< GoTo] See the equation listed: A Prof. Paul Lin 7 Altera Quartus II Simplified Equation and Form of the Circuit Before Synthesize the Circuit Quartus II Operators: & AND operator,! NOT Operator, # OR Operator, $ EX-OR operator Tools > Netlist Viewers > technology Map Viewer Post Mapping Prof. Paul Lin 8 4

VHDL Code with Simplified Equation Click on Hide Content/Display Content to see Gates Prof. Paul Lin 9 VHDL Code with Simplified Equation The Boolean Equation X = A + B B + C B The simplified equation Y = AB --ex5_9.vhd LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY ex5_9 IS PORT( a,b,c : IN std_logic; x, y : OUT std_logic); END ex5_9; ARCHITECTURE arc OF ex5_9 IS BEGIN x <=((a OR NOT b) AND (b OR c))and b; y <= a AND b; -- added to show the result after the simplification END arc; Prof. Paul Lin 10 5

VHDL Code with Simplified Equation The Boolean Equation X = A + B B + C B The simplified equation Y = AB Observed identical outputs at x and y Prof. Paul Lin 11 Simplified Boolean Equation using Altera Quartus II - Example 5-17 Example 5-17 (pages 184-185): simplify the two equations X = ((AB + (B + C)) and Y = (AB) + (B+C) --ex5_17.vhd LIBRARY ieee; --Using VHDL to Simplify Equations USE ieee.std_logic_1164.all; ENTITY ex5_17 IS PORT( a,b,c : IN std_logic; x, y : OUT std_logic); END ex5_17; ARCHITECTURE arc OF ex5_17 IS BEGIN x<=not((a AND b) OR (NOT b OR c)); y<=(a NAND b) OR (b NOR c); END arc; Prof. Paul Lin 12 6

Simplified Boolean Equation using Altera Quartus II - Example 5-17 Tools > Netlist Viewers > technology Map Viewer Post Mapping Prof. Paul Lin 13 Simplified Boolean Equation using Altera Quartus II - Example 5-17 Tools > Netlist Viewers > technology Map Viewer Post Mapping Click on Hide Content/Display Content to see Gates Write the equations from Netlist Viewer X = ((AB + (B + C)) = A BC Y = (AB) + (B+C) = A + B = (AB) Prof. Paul Lin 14 7

Entering a Truth Table in VHDL using a Vector Signal - Example 5-22 Example 5-22 (page 194): Design a logic circuit that can be used to tell when a 3-bit binary number is within the range of 2 (010) to 6 (110). Also test the logic using the DE0 board. Prof. Paul Lin 15 Entering a Truth Table in VHDL using a Vector Signal - Example 5-22 LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY ex5_22 IS PORT( a,b,c : IN std_logic; x : OUT std_logic); END ex5_22; ARCHITECTURE arc OF ex5_22 IS SIGNAL input : std_logic_vector(2 DOWNTO 0); BEGIN input(2)<=a; --move a to element 2 of the internal vector signal input(1)<=b; --move b to element 1 of the internal vector signal input(0)<=c; --move c to element 0 of the internal vector signal. Prof. Paul Lin 16 8

Entering a Truth Table in VHDL using a Vector Signal - Example 5-22 ARCHITECTURE arc OF ex5_22 IS SIGNAL input : std_logic_vector(2 DOWNTO 0); BEGIN input(2)<=a; --move a to element 2 of the internal vector signal input(1)<=b; --move b to element 1 of the internal vector signal input(0)<=c; --move c to element 0 of the internal vector signal WITH input SELECT x <= '0' WHEN "000", -- x equals 0 when input equals "000" '0' WHEN "001", -- x equals 0 when input equals "001" '1' WHEN "010", -- x equals 1 when input equals "010" '1' WHEN "011", -- x equals 1 when input equals "011" '1' WHEN "100", -- x equals 1 when input equals "100" '1' WHEN "101", -- x equals 1 when input equals "101" '1' WHEN "110", -- x equals 1 when input equals "110" '0' WHEN "111", -- x equals 0 when input equals "111" '0' WHEN others; END arc; Prof. Paul Lin 17 Entering a Truth Table in VHDL using a Vector Signal - Example 5-22 Simulation Output X is HIGH for 2, 3, 4, 5, and 6 Prof. Paul Lin 18 9

Entering a Truth Table in VHDL using a Vector Signal - Example 5-22 Tools > Netlist Viewers > technology Map Viewer Post Mapping Prof. Paul Lin 19 Overflow sensing for a Water reclamation plant Example 5-23 Example 5-23 (page 195): A water reclamation plans needs to have warning system to monitor the three water overflow holding tanks. Each tank has a HIGH/LOW level sensor. Design a system that activates a warming alarm whenever two or more tanks levels are HIGH. Also test the logic using the DE0 board. Prof. Paul Lin 20 10

Overflow sensing for a Water reclamation plant Example 5-23 -- ex5_23.vhd -- Chemical Tank Monitoring -- Alarm is high for any combination of two or more tanks high LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY ex5_23 IS PORT( tank : IN std_logic_vector(2 downto 0); alarm : OUT std_logic); END ex5_23; Prof. Paul Lin 21 Overflow sensing for a Water reclamation plant Example 5-23 ARCHITECTURE arc OF ex5_23 IS BEGIN WITH tank SELECT alarm <= '0' WHEN "000", '0' WHEN "001", '0' WHEN "010", '1' WHEN "011", '0' WHEN "100", '1' WHEN "101", '1' WHEN "110", '1' WHEN "111", '0' WHEN others; END arc; Prof. Paul Lin 22 11

Overflow sensing for a Water reclamation plant Example 5-23 Prof. Paul Lin 23 Reference: DEO Board I/Os Prof. Paul Lin 24 12

Reference: DEO Board I/Os Prof. Paul Lin 25 Summary & Conclusion Prof. Paul Lin 26 13