Comparators Combinational Design. Comparators Equality and Magnitude Comparators –CSE 171 (Designed using CUPL) TTL Comparators Comparator Networks Cascading.

Slides:



Advertisements
Similar presentations
ENGIN112 L15: Magnitude Comparator and Multiplexers October 6, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 15 Magnitude Comparators.
Advertisements

Digital Circuits. Review – Getting the truth table The first step in designing a digital circuit usually is to get the truth table. That is, for every.
Logic Circuits Design presented by Amr Al-Awamry
Comparators Combinational Design.
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices XOR, Parity Circuits, Comparators.
EELE 367 – Logic Design Module 4 – Combinational Logic Design with VHDL Agenda 1.Decoders/Encoders 2.Multiplexers/Demultiplexers 3.Tri-State Buffers 4.Comparators.
Magnitude Comparator Lecture L6.4 Section 6.1.
Comparator.
Combinational Logic and Verilog. XORs and XNORs XOR.
Lecture 3 Karnaugh Map Chapter 2 Jack Ou, Ph.D.. Home Alarm Logic.
CS 151 Digital Systems Design Lecture 15 Magnitude Comparators and Multiplexers.
Henry Hexmoor--SIUC One bit Equality Comparator XNOR X Y Z Z = !(X $ Y) X Y Z
1 Introduction Chapters 2 & 3: Introduced increasingly complex digital building blocks –Gates, multiplexors, decoders, basic registers, and controllers.
Equality Detector Lecture L6.1 Section 6.1. Equality Detector XNOR X Y Z Z = !(X $ Y) X Y Z
1 Comparators Discussion D A 1-Bit Comparator The variable Gout is 1 if x > y or if x = y and Gin = 1. The variable Eout is 1 if x = y and Gin =
WinCupl Module M2.2 Section 4.2. Experiment 2 CUPL Header.
Equality Detector Lecture L6.3 Section 6.1. Equality Detector XNOR X Y Z Z = !(X $ Y) X Y Z
Equality Detector Module M5.1 Section 6.1. Equality Detector XNOR X Y Z Z = !(X $ Y) X Y Z
1 Carry-Ripple Adder Using full-adder instead of half-adder for first bit, we can include a “carry in” bit in the addition –Will be useful later when we.
Lab 1 Structure of a PLD Module M1.4 Experiment 1 (p. 40)
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448.
COE 202: Digital Logic Design Combinational Circuits Part 4
1 Comparators: Procedures Discussion D9.2 Example 22.
Digital System Design EEE344 Lecture 2 Introduction to Verilog HDL Prepared by: Engr. Qazi Zia, Assistant Professor EED, COMSATS Attock1.
More Examples Dataflow/Behavioral Modeling Section 4.12.
Design Organization and Parameterization Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Data Flow Modeling of Combinational Logic Simple Testbenches
Digital Electronics.
A.7 Concurrent Assignment Statements Used to assign a value to a signal in an architecture body. Four types of concurrent assignment statements –Simple.
1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.
COE 202: Digital Logic Design Combinational Circuits Part 4
7/10/2007DSD,USIT,GGSIPU1 Basic concept of Sequential Design.
1/8/ L7 Project Step 3Copyright Joanne DeGroat, ECE, OSU1 Project Step 4 Step 1 in transitioning to behavioral modeling. We will wire behavioral.
VHDL for Combinational Circuits. VHDL We Know Simple assignment statements –f
ECE 3110: Introduction to Digital Systems Combinational-Circuit Synthesis.
M. Balakrishnan Dept of Computer Science & Engg. I.I.T. Delhi
2’s Complement 4-Bit Saturator Discussion D2.8 Lab 2.
Lecture #18 Page 1 ECE 4110– Sequential Logic Design Lecture #18 Agenda 1.MSI Demultiplexers 2.MSI Tri-State Buffers 3.MSI Comparators Announcements 1.HW.
CS/EE 3700 : Fundamentals of Digital System Design
ECE 2110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices XOR and parity check Circuits.
BR 8/99 Arithmetic Operations We will review the arithmetic building blocks we have previously used, and look at some new ones. –Addition –incrementer.
UNIT 8 COMBINATIONAL CIRCUIT DESIGN AND SIMULATION USING GATES
Lab 07 :Converting an older IC technology drill machine to VHDL: Slide 2 Slide 3 Generate a Truth Table from an Equation Generate a Truth Table from a.
1 CSE370, Lecture 7 Lecture 9 u Logistics n HW3 posted, due on Friday n Lab3 this week u Last lecture n Verilog u Last last lecture n K-maps examples n.
Lecture #18 Page 1 ECE 4110–5110 Digital System Design Lecture #18 Agenda 1.MSI Demultiplexers 2.MSI Tri-State Buffers 3.MSI Comparators Announcements.
ECE 2110: Introduction to Digital Systems
ECE 2110: Introduction to Digital Systems
CSC205 Jeffrey N. Denenberg Lecture #5
Magnitude Comparator Module M5.2 Section 6.1.
ECE 4110–5110 Digital System Design
Comparators Discussion DS-3.1.
Cascading 1-Bit Comparators
Logic Design Review – 2 Basic Combinational Circuits
XOR, XNOR, & Binary Adders
Lecture 8 Logistics Last lecture Last last lecture Today
Behavioral/RTL Description (HDL)
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Logic Gates.
Gates Type AND denoted by X.Y OR denoted by X + Y NOR denoted by X + Y
Lecture 9 Logistics Last lecture Last last lecture Today
Data Flow Description of Combinational-Circuit Building Blocks
CSE 370 – Winter 2002 – Comb. Logic building blocks - 1
Logic Gates.
XOR, XNOR, and Binary Adders
Data Flow Description of Combinational-Circuit Building Blocks
Copyright Joanne DeGroat, ECE, OSU
Magnitude Comparator Lecture L6.2 Section 6.1.
Single bit comparator Single bit comparator 4/10/2007 DSD,USIT,GGSIPU
2-2 Logic Part 2 Truth Tables.
Presentation transcript:

Comparators Combinational Design

Comparators Equality and Magnitude Comparators –CSE 171 (Designed using CUPL) TTL Comparators Comparator Networks Cascading 1-bit Comparators –Design using VHDL

Equality Comparator XNOR X Y Z Z = !(X $ Y) X Y Z

4-Bit Equality Comparator FIELD A = [A0..3]; FIELD B = [B0..3]; FIELD C = [C0..3];

4-bit Equality Detector Equality Detector A[3..0] B[3..0] A_EQ_B

4-bit Magnitude Comparator Magnitude Detector A[3..0] B[3..0] A_EQ_B A_LT_B A_GT_B

Magnitude Comparator How can we find A_GT_B? How many rows would a truth table have? 2 8 = 256!

Magnitude Comparator If A = 1001 and B = 0111 is A > B? Why? Because A3 > B3 i.e. A3 & !B3 = 1 Therefore, one term in the logic equation for A_GT_B is A3 & !B3 Find A_GT_B

Magnitude Comparator If A = 1101 and B = 1011 is A > B? Why? Because A3 = B3 and A2 > B2 i.e. C3 = 1 and A2 & !B2 = 1 Therefore, the next term in the logic equation for A_GT_B is C3 & A2 & !B2 A_GT_B = A3 & !B3 # …..

Magnitude Comparator If A = 1010 and B = 1001 is A > B? Why? Because A3 = B3 and A2 = B2 and A1 > B1 i.e. C3 = 1 and C2 = 1 and A1 & !B1 = 1 Therefore, the next term in the logic equation for A_GT_B is C3 & C2 & A1 & !B1 A_GT_B = A3 & !B3 # C3 & A2 & !B2 # …..

Magnitude Comparator If A = 1011 and B = 1010 is A > B? Why? Because A3 = B3 and A2 = B2 and A1 = B1 and A0 > B0 i.e. C3 = 1 and C2 = 1 and C1 = 1 and A0 & !B0 = 1 Therefore, the last term in the logic equation for A_GT_B is C3 & C2 & C1 & A0 & !B0 A_GT_B = A3 & !B3 # C3 & A2 & !B2 # C3 & C2 & A1 & !B1 # …..

Magnitude Comparator A_GT_B = A3 & !B3 # C3 & A2 & !B2 # C3 & C2 & A1 & !B1 # C3 & C2 & C1 & A0 & !B0

Magnitude Comparator A_LT_B = !A3 & B3 # C3 & !A2 & B2 # C3 & C2 & !A1 & B1 # C3 & C2 & C1 & !A0 & B0 Find A_LT_B

Comparators Equality and Magnitude Comparators –CSE 171 (Designed using CUPL) TTL Comparators Comparator Networks Cascading 1-bit Comparators –Design using VHDL - Lab 3

TTL Comparators

Cascading two 74LS85s

Comparators Equality and Magnitude Comparators –CSE 171 (Designed using CUPL) TTL Comparators Comparator Networks Cascading 1-bit Comparators –Design using VHDL - Lab 3

1-Bit Magnitude Comparator

4-Bit Magnitude Comparator X Y gt = 1 eq = 1 lt = 1

Tree comparator network

Comparators Equality and Magnitude Comparators –CSE 171 (Designed using CUPL) TTL Comparators Comparator Networks Comparator Design using VHDL

Lab 3c

comp4bit

Fill in the port maps U0U1U2U3