Lecture #5 In this lecture we will introduce the sequential circuits.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Lecture 22: Sequential Circuits Today’s topic –Clocks and sequential circuits –Finite state machines 1.
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/27/20061 Sequence Detectors Lecture Notes – Lab 5 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
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.
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 3 Microcomputer Systems Design (Embedded Systems)
Sequencing and Control Mano and Kime Sections 8-1 – 8-7.
Finite State Machines Discussion D8.1 Example 36.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts,
Lecture #5 In this lecture we will introduce the sequential circuits.
4-bit Shift Register. 2-bit Register Serial-in-serial-out Shift Register.

Chapter 10 State Machine Design. 2 State Machine Definitions State Machine: A synchronous sequential circuit consisting of a sequential logic section.
VHDL in 1h Martin Schöberl. AK: JVMHWVHDL2 VHDL /= C, Java,… Think in hardware All constructs run concurrent Different from software programming Forget.
ENG241 Digital Design Week #8 Registers and Counters.
VHDL Discussion Finite State Machines IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
VHDL Discussion Sequential Sytems. Memory Elements. Registers. Counters IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology.
 Seattle Pacific University EE Logic System DesignCounters-1 Shift Registers DQ clk DQ DQ ShiftIn Q3Q3 Q2Q2 DQ Q1Q1 Q0Q0 A shift register shifts.
CEC 220 Digital Circuit Design VHDL in Sequential Logic Wednesday, March 25 CEC 220 Digital Circuit Design Slide 1 of 13.
Digital System Design using VHDL
VHDL 7: use of signals v.5a1 VHDL 7 Use of signals In processes and concurrent statements.
ECE DIGITAL LOGIC LECTURE 20: REGISTERS AND COUNTERS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 11/19/2015.
ECE DIGITAL LOGIC LECTURE 21: FINITE STATE MACHINE Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 11/24/2015.
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
1 Lecture 13: Sequential Circuits, FSM Today’s topics:  Sequential circuits  Finite state machines  Single-cycle CPU Reminder: midterm on Tue 10/20.
Sequential Logic Design
Sequential statements (1) process
Combinational logic circuit
Digital Design - Sequential Logic Design
LAB #6 Sequential Logic Design (Flip Flops, Shift Registers)
Finite State Machines (part 1)
Registers and Counters
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
Figure 7.1 Control of an alarm system
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Revision Name __________ Student number______
Part IV: VHDL CODING.
FIGURE 5.1 Block diagram of sequential circuit
Synchronous Sequential Circuit Design
Registers and Counters Register : A Group of Flip-Flops. N-Bit Register has N flip-flops. Each flip-flop stores 1-Bit Information. So N-Bit Register Stores.
VHDL 5 FINITE STATE MACHINES (FSM)
In processes and concurrent statements
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
Field Programmable Gate Array
Field Programmable Gate Array
Field Programmable Gate Array
Lecture 13: Sequential Circuits, FSM
Elec 2607 Digital Switching Circuits
ECE 434 Advanced Digital System L08
Excitation Vectors Input Combinational Logic Memory Output States.
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
VHDL VHSIC Hardware Description Language VHSIC
Lecture 13: Sequential Circuits, FSM
RTL Style در RTL مدار ترتيبي به دو بخش (تركيبي و عناصر حافظه) تقسيم مي شود. مي توان براي هر بخش يك پروسس نوشت يا براي هر دو فقط يك پروسس نوشت. مرتضي صاحب.
VHDL (VHSIC Hardware Description Language)
CSE 370 – Winter Sequential Logic - 1
ECE 448 Lecture 13 Multipliers Timing Parameters
CSE 370 – Winter Sequential Logic-2 - 1
Excitation Vectors Input Combinational Logic Memory Output States.
Behavioral Modeling of Sequential-Circuit Building Blocks
Topics Verilog styles for sequential machines. Flip-flops and latches.
Figure 8.1. The general form of a sequential circuit.
Finite State Machines (part 1)
The Verilog Hardware Description Language
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL code ECE 448 – FPGA and ASIC Design.
Sequential Digital Circuits
Sequntial-Circuit Building Blocks
(Sequential-Circuit Building Blocks)
Presentation transcript:

Lecture #5 In this lecture we will introduce the sequential circuits. We will overview various Latches and Flip Flops (30 min) Give Sequential Circuits design concept Go over several examples as time permits

Control Circuitry Binary information is either data or control. Data paths are responsible for processing the data, Control signals are responsible for generation and sequencing of events. Signals like “load” are used for example when and where to place a data item in a register or “select” signal on a MUX to select an item or “Enable” signal to put data on a bus …. The term sequential circuit is referred to circuits that sequence such events. Types of Control Programmed Non-programmed Program Counter Hardwired Memory Microcoded (As in microprocessor) Finite state Machines covered in this lecture Algorithmic State Machines covered in this lecture

Digital Design: Parameters to be considered Memory Data Path Control I/O

RS Latch Q+ = S + R’ Q Two Problems: R=S= 1 Not allowed, Data is transparent

The D Latch Problem: Level sensitive

JK Latch : Universal, Level sensitive, Timing Constraints due to feed back. Other latches can be constructed using JK Latch

Master Slave Flip Flop Edge sensitive,Set up and Hold time

Edge triggered Flip Flop: Set up and Hold time Constraints

Combinational Logic Memory Input Output Excitation Vectors States

Example 1   Design a sequence detector that detects a sequence of 2 zeros or 3 ones on an incoming serial data line. Assume an asynchronous reset that initializes the machine. Let input be x, and output be z.

Example 2 When a minor road crosses a highway a traffic controller is installed to control the flow of traffic. Normally the highway is given the right of way and where is a demand on the minor road then the highway is interrupted to give access to the minor road. You are asked to design controller to work on this principals. The highway should be given the right of way. If any of the sensors on the minor road do not detect presence of a car or if the sensor does detect a car but an amount of time equal to or greater than Timer long=T30 seconds, has not elapsed since last change. If there was a car on the minor road and amount of time greater than Timer long has elapsed, then the traffic light should cycle through amber for Timer short=3 seconds and change to Red, while minor road changes to Green. The minor road now should have access of the road while there is car but never more than Timer long. The minor road then should cycle back to red through a Timer short=3 second. While the highway cycles back to green   Minor Road Sensor Highway  

Example 3[1] Design a Tool Booth Controller that controls the signal and the barrier of a toll booth on a highway. The Booth and Controller is shown in the figure. below and has the following components. A sensor on the driveway that shows presence of a car , ie signal S=1, S=0 otherwise. A coin machine receiving the exact coin. When coin is inserted, signal C =1, otherwise C=0 . T=1 traffic light is green and the barrier open. T=0 traffic light is red and the barrier is closed. At normal times the tollbooth is idle. Traffic signal is red and the barrier is closed. When a car enters the driveway of the booth, then the presence of the car is detected with S=1 from the sensor. The controller then waits for the right coin. When the coin is inserted, C=1, then the traffic light turns green T=1 and the barrier is raised. When the car passes all signals are reset and the barrier is lowered Assume there is room for one car only at the booth.     [1] Sequentaila circuits

Example Design a sequence detector that detects a sequence of 2 zeros or 3 ones on an incoming serial data line. Assume an asynchronous reset that initializes the machine. Let the input be x, and the output be z. We have the following state diagram 0/1 P1 0/0 (01) P0 ( 00 ) 1/0 1/0 0/0 0/0 P2 1/1 (10) P3 1/0 (11 )

Controller for a Shift and Add Multiplier

Multiplier Design Block Diagram

Controller FSM Diagram

Multiplier controller VHDL: Controller (COEN 6501) ------------------------------------------------------ -- -- Library Name : DSD -- Unit Name : Controller -- Date : Mon Oct 27 12:36:47 2003 -- Author : Giovanni D'Aliesio -- Description: Controller is a finite state machine -- that performs the following in each -- state: -- IDLE > samples the START signal -- INIT > commands the registers to be -- loaded -- TEST > samples the LSB -- ADD > indicates the Add result to be stored -- SHIFT > commands the register to be shifted . Cell Information

Interface library ieee; use ieee.std_logic_1164.all; ------------------------------------------------------ library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity Controller is port (reset : in std_logic ; clk : in std_logic ; START : in std_logic ; LSB : in std_logic ; ADD_cmd : out std_logic ; SHIFT_cmd : out std_logic ; LOAD_cmd : out std_logic ; STOP : out std_logic); end; Reset ADD Start SHIFT LSB LOAD clk STOP Controller

architecture rtl of Controller is signal temp_count : std_logic_vector(2 downto 0); -- declare states type state_typ is (IDLE, INIT, TEST, ADD, SHIFT); signal state : state_typ; begin process (clk, reset) begin if reset='0' then state <= IDLE; temp_count <= "000"; elsif (clk'event and clk='1') then case state is when IDLE => if START = '1' then state <= INIT; else state <= IDLE; end if; when INIT => state <= TEST; when TEST = if LSB = '0' then state <= SHIFT else state <= ADD; end if; when ADD => state <= SHIFT; when SHIFT =>if temp_count = "111" then -- verify if finished temp_count <= "000"; -- re-initialize counter state <= IDLE; -- ready for next multiply else temp_count <= temp_count + 1; -- increment counter state <= TEST; end if; end case; end if; end process; STOP <= '1' when state = IDLE else '0'; ADD_cmd <= '1‘ when state = ADD else '0'; SHIFT_cmd <= '1' when state = SHIFT else '0'; LOAD_cmd <= '1' when state = INIT else '0'; end rtl;

Controller Simulation Timing Diagram

TEST 010 IDLE 000 Stop command 0 START=? LOAD 1 001 STOP=1 Load command TEST 010 STOP=1 RA  Multiplicand RB  Multiplier C=0 , STOP=0 Q0 = ? C=C + 1 ADD 011 ACC <= ACC +RA ADD Commend C = C + 1 SHIFT 100 Shift Right C, ACC, RB Shift command /=8 =8 C= 8 ?