1 EE24C Digital Electronics Project Theory: Sequential Logic (part 2)

Slides:



Advertisements
Similar presentations
CWRU EECS 317 EECS 317 CAD Computer Aided Design LECTURE 2: Delay models, std_ulogic and with-select-when Instructor: Francis G. Wolff
Advertisements

ADDER, HALF ADDER & FULL ADDER
Tutorial 2 Sequential Logic. Registers A register is basically a D Flip-Flop A D Flip Flop has 3 basic ports. D, Q, and Clock.
Adders and Subtractors
©2004 Brooks/Cole FIGURES FOR CHAPTER 20 VHDL FOR DIGITAL SYSTEM DESIGN Click the mouse to move to the next page. Use the ESC key to exit this chapter.
L23 – Adder Architectures. Adders  Carry Lookahead adder  Carry select adder (staged)  Carry Multiplexed Adder  Ref: text Unit 15 9/2/2012 – ECE 3561.
VHDL in digital circuit synthesis (tutorial) dr inż. Miron Kłosowski EA 309
Sequential Design ELEC 311 Digital Logic and Circuits Dr. Ron Hayne
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
Sequential Circuits Storage elements
1 Introduction to VHDL (Continued) EE19D. 2 Basic elements of a VHDL Model Package Declaration ENTITY (interface description) ARCHITECTURE (functionality)
Lecture #28 Page 1 ECE 4110– Sequential Logic Design Lecture #28 Agenda 1.Counters Announcements 1.HW #13 assigned 2.Next: Test #2 Review.
Registers and Counters
Digital Logic with VHDL EE 230 Digital Systems Fall 2006 (10/17/2006)
LECTURE 4: The VHDL N-bit Adder
8085 processor. Bus system in microprocessor.
VHDL Structural Architecture ENG241 Week #5 1. Fall 2012ENG241/Digital Design2 VHDL Design Styles Components and interconnects structural VHDL Design.
VHDL revision 15a1 VHDL revision. VHDL revision 15a2 Q1 A clocked 4-to-2-bit encoder circuit (with synchronous reset) has the following interfaces: RESET:
6/12/20151 Sequence Detectors Lecture Notes – Lab 4 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
The Logic Machine We looked at programming at the high level and at the low level. The question now is: How can a physical computer be built to run a program?
Combinational circuits
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
KU College of Engineering Elec 204: Digital Systems Design
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’.
Registers CPE 49 RMUTI KOTAT.
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
Rabie A. Ramadan Lecture 3
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
1/8/ L11 Project Step 5Copyright Joanne DeGroat, ECE, OSU1 Project Step 5 Step 2 in behavioral modeling. Use of procedures.
EKT 221/4 DIGITAL ELECTRONICS II  Registers, Micro-operations and Implementations - Part3.
ENG241 Digital Design Week #8 Registers and Counters.
Computer Science 101 Circuit Design - Examples. Sum of Products Algorithm Identify each row of the output that has a 1. Identify each row of the output.
Abdullah Said Alkalbani University of Buraimi
Final Project. System Overview Description of Inputs reset: When LOW, a power on reset is performed. mode: When LOW, NORMal mode selected When HIGH,
ARITHMETIC MICRO OPERATIONS
Number Systems and Circuits for Addition Lecture 5 Section 1.5 Thu, Jan 26, 2006.
Universal college of engineering & technology. .By Harsh Patel)
1 Ethics of Computing MONT 113G, Spring 2012 Session 5 Binary Addition.
 Seattle Pacific University EE Logic System DesignCounters-1 Shift Registers DQ clk DQ DQ ShiftIn Q3Q3 Q2Q2 DQ Q1Q1 Q0Q0 A shift register shifts.
VHDL Project I: Serial Adder Matthew Murach Slides Available at:
CompSci Today’s topics Computer Hardware Electric Circuits Designing an Adder Upcoming Computer Communications ( Great Ideas Chapter 10) Reading.
Counters and registers Eng.Maha Alqubali. Registers Registers are groups of flip-flops, where each flip- flop is capable of storing one bit of information.
Discrete Systems I Lecture 10 Adder and ALU Profs. Koike and Yukita.
Explain Half Adder and Full Adder with Truth Table.
Finite Automata (FA) with Output FA discussed so far, is just associated with R.Es or language. Is there exist an FA which generates an output string corresponding.
Appendix C Basics of Logic Design. Appendix C — Logic Basic — 2 Logic Design Basics §4.2 Logic Design Conventions Objective: To understand how to build.
Combinational logic circuit
Dr.Ahmed Bayoumi Dr.Shady Elmashad
Registers and Counters
Revision Name __________ Student number______
Behavioral Style Combinational Design with VHDL
Combinational Circuits
Multipliers Multipliers play an important role in today’s digital signal processing and various other applications. The common multiplication method is.
Digital System Design Review.
Hakim Weatherspoon CS 3410 Computer Science Cornell University
ECE 301 – Digital Electronics
Week 7: Gates and Circuits: PART II
Number Systems and Circuits for Addition
Logic Gates.
DIGITAL ELECTRONICS B.SC FY
ECE 331 – Digital System Design
Step 2 in behavioral modeling. Use of procedures.
Figure 8.1. The general form of a sequential circuit.
Sequential Design Example
Electronics for Physicists
XOR Function Logic Symbol  Description  Truth Table 
Step 2 in behavioral modeling. Use of procedures.
Computer Architecture
Digital Logic with VHDL
Presentation transcript:

1 EE24C Digital Electronics Project Theory: Sequential Logic (part 2)

2 Design example 1: EE19D Exam Q5 A serial binary adder adds two binary numbers X1 and X2 of arbitrary length, producing the numerical sum Z = X 1 + X 2. The input numbers are entered into the adder serially, i.e., bit by bit, and the result is also sent out serially. In one clock cycle corresponding to time t, the adder can receive 2 bits x 1 (t) and x 2 (t) of X 1 and X 2 and compute 1 bit z(t) of Z. Clearly each 1-bit addition can produce a carry signal c(t) which affect the addition to be done in the next clock period. Thus the two possible circuit states can exist: S 0 meaning no carry signal was produced in the preceding clock cycle, i.e., c(t-1) = 0; and S 1, meaning c(t-1) = 1. The addition performed at each step must then take the form x 1 (t) + x 2 (t) + c(t-1), where c(t-1) is determined from the present state at time t.

3 StateInput x 1 x S0S0 S0,0S0,1 S1,1 S1S1 S0,1S1,0 S1,1 State Table

4 State Diagram

5 entity serial_adder is Port ( Clk : in std_logic; X : in std_logic; Y : in std_logic; Z : out std_logic); end serial_adder;

6 architecture Behavioral of serial_adder is type stateM is (S0, S1); signal pstate, nstate: stateM; signal val: std_logic_vector (1 downto 0); begin process(pstate, nstate, X, Y) begin val <= X&Y; case pstate is when S0 => case val is when "00" => nstate <= S0; Z <= ‘0’; when "01" => nstate <= S0; Z <= ‘1’; when "10" => nstate <= S0; Z <=’1’; when "11" => nstate <= S1; Z<= ‘0’; when others => NULL; end case;

7 when S1 => case val is when "00" => nstate <= S0; Z<= ‘1’; when "01" => nstate <= S1; Z<= ‘0’; when "10" => nstate <= S1; Z <= ‘0’; when "11" => nstate <= S1; Z <= ‘1’; when others => NULL; end case; when others => NULL; end case; end process;

8 process begin wait until Clk'event and Clk='1'; pstate <= nstate; end process; end Behavioral;

9 Design Example 2 We want to implement the logic circuit of a sequential serial comparator that determines which of the two serial multi-bit numbers, X and Y, of equal length, is larger. Assume X and Y are unsigned, and the least significant bit is present first. The circuit has three output signals: XEQY (X equal to Y), XLTY (X less than Y), and XGTY (X greater than Y). For example, assume that: The input sequence for X for the first four clock cycles is 0,1,0,0 The input sequence for Y for the first four clock cycles is 0,0,1,0 Then: - The output for XEQY should be 1,0,0,0 - The output for XLTY should be 0,0,1,1 - The output for XGTY should be 0,1,0,0

10 Moore State Machine

11 State/Output Table PSNS: Q1*Q0*Outputs Q1Q0XY=00XY=01XY=10XY=11XEQYXLTYXGTY

12 entity statecomp is Port ( Clk : in std_logic; X : in std_logic; Y : in std_logic; XeqY : out std_logic; XltY : out std_logic; XgtY : out std_logic); end statecomp;

13 architecture Behavioral of statecomp is type stateM is (S0, S1, S2); signal pstate, nstate: stateM; signal val: std_logic_vector (1 downto 0); begin process(pstate, nstate, X, Y) begin val <= X&Y; case pstate is

14 when S0 => XeqY <= '1'; XltY <= '0'; XgtY <= '0'; case val is when "00" => nstate <= S0; when "01" => nstate <= S1; when "10" => nstate <= S0; when "11" => nstate <= S2; when others => NULL; end case;

15 when S1 => XeqY <= '0'; XltY <= '1'; XgtY <= '0'; case val is when "00" => nstate <= S1; when "01" => nstate <= S1; when "10" => nstate <= S2; when "11" => nstate <= S1; when others => NULL; end case;

16 when S2 => XeqY <= '0'; XltY <= '0'; XgtY <= '1'; case val is when "00" => nstate <= S2; when "01" => nstate <= S1; when "10" => nstate <= S2; when "11" => nstate <= S2; when others => NULL; end case; when others => NULL; end case; end process;

17 process begin wait until Clk'event and Clk='1'; pstate <= nstate; end process; end Behavioral