ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700:

Similar documents
ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700:

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700:

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-378:

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 5

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

Written exam IE1204/5 Digital Design Friday 13/

Adder Comparator 7 segment display Decoder for 7 segment display D flip flop Analysis of sequential circuits. Sequence detector

DIGITAL DESIGN WITH SM CHARTS

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

Module-20 Shift Registers


UNIVERSITI MALAYSIA PERLIS

UNIT II: Clocked Synchronous Sequential Circuits. CpE 411 Advanced Logic Circuits Design 1

Chapter 9. sequential logic technologies

Computer Architecture: Part II. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

logic system Outputs The addition of feedback means that the state of the circuit may change with time; it is sequential. logic system Outputs

DELD MODEL ANSWER DEC 2018

Practical Workbook Logic Design & Switching Theory

Chapter 9. sequential logic technologies

Module -18 Flip flops

ICS 151 Final. (Last Name) (First Name)

Solutions. ICS 151 Final. Q1 Q2 Q3 Q4 Total Credit Score. Instructions: Student ID. (Last Name) (First Name) Signature

Gomoku Player Design

DIGITAL ELECTRONICS QUESTION BANK

Linear & Digital IC Applications (BRIDGE COURSE)

Chapter 5 Sequential Logic Circuits Part II Hiroaki Kobayashi 7/11/2011

CONTENTS Sl. No. Experiment Page No

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

Clock Signal Review Memory Elements

Laboratory Manual CS (P) Digital Systems Lab

Spec. Instructor: Center

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

Controller Implementation--Part I. Cascading Edge-triggered Flip-Flops

EECS-140/141 Introduction to Digital Logic Design Lecture 7:Sequential Logic Basics

Learning Outcomes. Spiral 2 3. DeMorgan Equivalents NEGATIVE (ACTIVE LO) LOGIC. Negative Logic One hot State Assignment System Design Examples

Fan in: The number of inputs of a logic gate can handle.

Chapter 5 Sequential Logic Circuits Part II Hiroaki Kobayashi 6/30/2008

Lecture 3: Logic circuit. Combinational circuit and sequential circuit

Winter 14 EXAMINATION Subject Code: Model Answer P a g e 1/28

Page 1. Last time we looked at: latches. flip-flop

CHAPTER FIVE - Flip-Flops and Related Devices

EE 330 Lecture 44. Digital Circuits. Ring Oscillators Sequential Logic Array Logic Memory Arrays. Final: Tuesday May 2 7:30-9:30

Sr. No. Instrument Specifications. TTL (Transistor-Transistor Logic) based on bipolar junction transistors

DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING, THE UNIVERSITY OF NEW MEXICO ECE-238L:

6.111 Lecture # 19. Controlling Position. Some General Features of Servos: Servomechanisms are of this form:

A-PDF Split DEMO : Purchase from to remove the watermark 114 FSM

Chapter 4: FLIP FLOPS. (Sequential Circuits) By: Siti Sabariah Hj. Salihin ELECTRICAL ENGINEERING DEPARTMENT EE 202 : DIGITAL ELECTRONICS 1

GATE Online Free Material

ENGG1015: lab 3. Sequential Logic

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

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

EC O4 403 DIGITAL ELECTRONICS

Lecture 20: Several Commercial Counters & Shift Register

COLLEGE OF ENGINEERING, NASIK

On Built-In Self-Test for Adders

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

CS/EE Homework 9 Solutions

High Speed Binary Counters Based on Wallace Tree Multiplier in VHDL

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) SUMMER-16 EXAMINATION Model Answer

Implementing Logic with the Embedded Array

1. The decimal number 62 is represented in hexadecimal (base 16) and binary (base 2) respectively as

Mixed Synchronous/Asynchronous State Memory for Low Power FSM Design

First Name: Last Name: Lab Cover Page. Teaching Assistant to whom you are submitting

Finite State Machines CS 64: Computer Organization and Design Logic Lecture #16

ENHANCING SPEED AND REDUCING POWER OF SHIFT AND ADD MULTIPLIER

COMPUTER ORGANIZATION & ARCHITECTURE DIGITAL LOGIC CSCD211- DEPARTMENT OF COMPUTER SCIENCE, UNIVERSITY OF GHANA

1 Q' 3. You are given a sequential circuit that has the following circuit to compute the next state:

IES Digital Mock Test

Brought to you by. Priti Srinivas Sajja. PS01CMCA02 Course Content. Tutorial Practice Material. Acknowldgement References. Website pritisajja.

Exercises: Fundamentals of Computer Engineering 1 PAGE: 1

Digital Logic Circuits

Multiplier and Accumulator Using Csla

Electronics. Digital Electronics

Lab #10: Finite State Machine Design

Unit-6 PROGRAMMABLE INTERRUPT CONTROLLERS 8259A-PROGRAMMABLE INTERRUPT CONTROLLER (PIC) INTRODUCTION

CMOS Digital Integrated Circuits Lec 11 Sequential CMOS Logic Circuits

SRV ENGINEERING COLLEGE SEMBODAI RUKMANI VARATHARAJAN ENGINEERING COLLEGE SEMBODAI

JEFFERSON COLLEGE COURSE SYLLABUS ETC255 INTRODUCTION TO DIGITAL CIRCUITS. 6 Credit Hours. Prepared by: Dennis Eimer

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

ECOM 4311 Digital System Design using VHDL. Chapter 9 Sequential Circuit Design: Practice

POWER EFFICIENT DESIGN OF COUNTER ON.12 MICRON TECHNOLOGY

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING SEMESTER TWO EXAMINATION 2017/2018

2014 Paper E2.1: Digital Electronics II

Digital Circuits Laboratory LAB no. 12. REGISTERS

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) MODEL ANSWER


UC Berkeley CS61C : Machine Structures

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

CS302 - Digital Logic Design Glossary By

DS1075 EconOscillator/Divider

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

Computer Architecture and Organization:

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

Sequential Logic Circuits

DM74ALS169B Synchronous Four-Bit Up/Down Counters

Combinational Logic Circuits. Combinational Logic

UC Berkeley CS61C : Machine Structures

Analog to Digital Conversion

DS1073 3V EconOscillator/Divider

EXPERIMENT #5 COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

Transcription:

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 SYNCHRONOUS SUNTIAL CIRCUITS Notes - Unit 6 ASYNCHRONOUS CIRCUITS: LATCHS SR LATCH: R S R t+ t t+ t S restricted SR Latch S R S R SR LATCH WITH NABL: R R' S R t+ t t+ t t t S S' LATCH WITH NABL: This is essentially an SR Latch, where R = not(), S = R' t+ t S' Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 SYNCHRONOUS CIRCUITS: FLIP FLOPS Flip flops are made out of: o A Latch with an enable input. o An dge detector circuit. The figure depicts an SR Latch, where the enable is connected to the output of an dge etector Circuit. The input to the dge etector is a signal called ''. A signal is a square wave with a fied frequency. R T Period Frequency = /T R' SR Flip Flop dge etector S or S' The edge detector circuit generates short-duration pulses during rising (or falling) edges. These pulses act as short-time enables of the Latch. The behavior of the flip flops can be described as that of a Latch that is only enabled during rising (or falling edges). epeng on what type of edge we are detecting, flip flops can be classified as: o Positive-edge triggered flip flop: The edge detector circuit generates pulses during rising edges. o Negative-edge triggered flip flop: The edge detector circuit generates pulses during falling edges. o ual-edge triggered flip flop: The edge detector circuit generates pulses during both rising and falling edges. Current FPGA technology does not support dual-edge triggered flip flops. S S R Positive edge-triggered R Negative edge-triggered FLIP FLOP TYPS SR Flip Flop S R t+ t+ t t S R citation quation: t+ = SR + t S R = R (S + t S ) = R (S + S )(S + t ) = R S + R t (on the edge) 2 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 Flip Flop t+ Flip Flop dge etector citation quation: t+ = (on the edge) T Flip Flop T T T t+ t t citation quation: t+ = T t (on the edge) JK Flip Flop J K J K J K t+ t citation quation: t+ = J t + K t (on the edge) t SYNCHRONOUS AN ASYNCHRONOUS INPUTS Synchronous Inputs Typically, flip flops only change their outputs on the rising (or falling edge). Usually, a change on the inputs forces a change on the outputs. These inputs are known as synchronous inputs, as the inputs' state is only checked on the rising (or falling) edges. ample: Input of a flip flop, Inputs J, K of a JK flip flop. Asynchronous Inputs However, in many instances, it is useful to have inputs that force the outputs to a value immediately, disregarg the rising (or falling edges). These inputs are known as asynchronous inputs. Common asynchronous inputs are prn and (they can be active-low or active high) The figure depicts a Flip Flop with two asynchronous inputs: o prn: Preset (active low). When prn = =. o (sometimes called ): Clear (active low). When = =. o If prn and are both, usually is given priority. A Flip flop can have more than one asynchronous inputs, or none. prn 3 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 PRACTIC XRCISS. Complete the timing diagram of the circuit shown below: 2. Complete the VHL description of the circuit shown below: library ieee; use ieee.std_logic_64.all; entity circ is port ( a, b, s,, : in std_logic; q: out std_logic); end circ; architecture a of circ is a b s begin --??? end a; 3. Complete the timing diagram of the circuit shown below. If the frequency of the signal is 25 MH, what is the frequency (in MH) of the signal? '' T 4. Complete the timing diagram of the circuit whose VHL description is shown below: library ieee; use ieee.std_logic_64.all; entity circ is port (,, : in std_logic; q: out std_logic); end circ; architecture a of circ is signal qt: std_logic; begin process (,, ) begin if = then qt <= ; elsif ( event and = ) then if = then qt <= not (qt); end if; end if; end process; q <= qt end a; 4 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 5. Complete the timing diagram of the circuit shown below: a b Full Adder s y FA cin cout s a b s 6. Complete the VHL description of the synchronous sequential circuit whose truth table is shown below. What is the ecitation equation for t+? library ieee; use ieee.std_logic_64.all; entity circ is port ( A, B, C: in std_logic;, : in std_logic; q: out std_logic); end circ; architecture a of circ is begin --??? end a; X A B t+ C t t X X 7. Complete the timing diagram of the circuit shown below. What is the ecitation equation for t+? J K y y 8. Complete the timing diagram of the circuit shown below: Latch L L 5 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 SYNCHRONOUS CIRCUITS: RGISTRS n-bit RGISTR: This is a collection of 'n' -type flip flops, where each flip flop independently stores one bit. The flip flops are connected in parallel. They also share the same and signals. n n n- n-2 n- n-2 n-bit SHIFT RGISTR: This is a collection of 'n' -type flip flops, connected serially. The flip flops share the same and signals. The serial input is called '', and the serial output is called ''. The flip flop outputs (also called the parallel output) are called = n n 2. epeng on how we label the bits, we can have: Right shift register: The input bit moves from the MSB to the LSB, and Left shift register: The input bit moves from the LSB to the MSB. RIGHT SHIFT RGISTR: n- n-2 n-3 n- n-2 n-3 LFT SHIFT RGISTR: 2 n- 2 n- Timing iagram eample: 3 2 3 2 6 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 PARALLL ACCSS SHIFT RGISTR: This is a shift register in which we can write data on the flip flops in parallel. s_l = shifting operation, s_l = parallel load. The figure below shows a 4-bit parallel access shift register. 3 2 3 s_l 2 s_l AING AN NABL INPUT TO FLIP FLOPS: In many instances, it is very useful to have a signal that controls whether the value of the flip flop is kept. The following circuit represent a flip flop with synchronous enable. When =, the flip flop keeps its value. When =, the flip flop grabs the value at the input. We can thus create n-bit registers and n-bit shift registers with enable. Here, all the flip flops share the same enable input. RGISTR: RIGHT SHIFT RGISTR: LFT SHIFT RGISTR: n n n- n-2 n-3 2 n- 7 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 Parallel access shift register with enable All the flip flops share the same enable input. 3 2 3 s_l 2 s_l AING A SYNCHRONOUS CLAR INPUT TO FLIP FLOPS In many instances, it is very useful to have a signal that can clear the value of the flip flop but only on the rising (or falling edges): synchronous clear (sclr). Typically, all synchronous signals are validated by enable. For eample, for a flip flop, the table show how the output state changes (on the rising edge): sclr (output state) X sclr We can thus create n-bit registers and n-bit shift registers with enable and sclr. Here, all the flip flops share the same enable and sclr inputs. RGISTR: RIGHT SHIFT RGISTR: LFT SHIFT RGISTR: sclr sclr sclr sclr sclr n- n-2 n-3 2 n- 8 Instructor: aniel Llamocca

prn LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 SYNCHRONOUS COUNTRS Counters are useful for: counting the number of occurrences of a certain event, generate time intervals for task control, track elapsed time between two events, etc. Counters are made of flip flops and combinatorial logic. Common design techniques include using the Finite State Machine (FSM) method of a synchronous accumulator. Synchronous counters change their output on the edge (rising or falling). ach flip flop shares the same input signal. If the initial count is ero, each flip flop shares the input signal. COUNTR CLASSIFICATION: a) Binary counter: An n bit counter counts from to 2 n. The figure depicts a 2-bit counter. b) Modulus counter: A counter modulo N counts from to N-. Special case: BC (or decade) counter: Counts from to 9. 4 BC counter c) Up/down counter: Counts both up and down, under command of a control input. d) Parallel load counter: The count can be given an arbitrary value. e) Counter with enable: If enable =, the count stops. If enable =, the counter counts. This is usually done by connecting the enable inputs of the flip flops to a single enable. f) Ring counter: Also called one-hot counter (only one bit is at a time). It can be constructed using a shift register. The output of the last stage is fed back to the input to the first stage, which creates a ring-like structure. The asynchronous signal startn sets the initial count to (first bit set to ). ample (4-bits):,,,,, The figure below depicts an n bit ring counter. n- n-2 n-3 startn g) Johnson counter: Also called twisted ring counter. It can be constructed using a shift register, where the output of the last flip flop is fed back to the first stage. The result is a counter where only a single bit has a different value for two consecutive counts. All the flip flops share the asynchronous signal, which sets the initial count to. ample (4 bits):,,,,,,,,, The figure below depicts an n bit Johnson counter. n- n-2 n-3 9 Instructor: aniel Llamocca

MUX LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 COUNTR SIGN USING AN ACCUMULATOR: The figure shows a counter modulo-2 that uses a register, and adder, a comparator, and logic gates. : count. : output signal asserted only when the maimum count (99) is reached. 8 8 a 7 b 7 4 + a 6 b 6 a 5 b 5 sclr sclr 8 B a 4 b 4 a 3 b 3 A=B sclr: synchronous clear If =sclr=, then = 8 A = 99? A=B a 2 b 2 a b a RANOM ACCSS MMORY MULATOR The following sequential circuit represents a memory with 8 addresses, where each address holds a 4-bit data. The memory positions are implemented by 4-bit registers. The reset and signals are shared by all the registers. ata is written or read onto/from one of the registers (selected by the signal address). Writing onto memory (wr_rd = ): The 4-bit input data (_in) is written into one of the 8 registers. The address signal selects which register is to be written. Here, the 7-segment display must show. For eample: if address =, then _in is written into register 5. Reag from memory (wr_rd = ): The MUX output appears on the 7-segment display (headecimal value). The address signal selects the register from which data is read. For eample: If address =, then data in register 2 must appear on the 7-segment display. If data in register 2 is, then the symbol A appears on the 7-segment display. b in 4 4 wr_rd 2 3 address wr_rd ecoder 3 4 4 ecoder: HX to 7 segments 5 3 7 6 7 4 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 FINIT STAT MACHINS: Sequential circuits are also called Finite State Machines (FSMs), because the functional behavior of these circuits can be represented using a finite number of states (flip flop outputs). The signal sets the flip flops to an initial state. Classification: - Moore machine: Outputs depend solely on the current state of the flip flops. - Mealy machine: Outputs depend on the current state of the flip flops as well as on the input to the circuit. Only for Mealy Machine Inputs Combinatorial Circuit Flip Flops n (states) Combinatorial Circuit Outputs Any general sequential circuit can be represented by the figure above (Finite State Machine model). A sequential circuit with certain behavior and/or specification can be formally designed using the Finite State Machine method: drawing a State iagram and coming up the citation Table. esigning sequential circuits using Finite State Machines is a powerful method in igital Logic esign. ample: 2-bit gray-code counter with enable and output:,,,,, The output is when the present count is. The count is the same as the states encoded in binary. First step: raw the State iagram and State Table. If we were to implement the state machine in VHL, this is the only step we need. = / / / S S4 / Second step: State Assignment. We assign unique flip flop states to our state labels (S, S2, S3, S4). Notice that this is arbitrary. However, we can save resources if we assign each state to the count that we desire. Then, the output count is just the flip flops outputs. S: = S2: = S3: = S4: = / / S2 / S3 / / PRSNT STAT S S2 S3 S4 S S2 S3 S4 NXT NXT STAT COUNT S S2 S3 S4 S2 S3 S4 S Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 Third step: citation table. Here, we replace the state labels by the flip flop states: PRSNT STAT NXTSTAT (t) (t) (t+) (t+) Fourth step: citation equations and minimiation. (t + ) and (t + ) are the net state of the flip flops, i.e. these signals are to be connected to the inputs of the flip flops. (t+) (t+) (t + ) = + (t + ) = + = Output only depends on the present state. Outputs, are the states and they only depend (in terms of the combinational output circuit) on the present state. Thus, this is a Moore FSM. Fifth step: Circuit implementation. state S S S2 S3 S3 S4 S4 S S2 S2 ample: 2-bit counter with enable and output. The output is when the present count is. The count is the same as the states encoded in binary. First step: raw the State iagram and State Table. If we were to implement the state machine in VHL, this is the only step we need. / PRSNT NXT NXT = / STAT STAT COUNT / / S S4 / / / S2 / S3 / S S2 S3 S4 S S2 S3 S4 S S2 S3 S4 S2 S3 S4 S 2 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 Second step: State Assignment. We assign unique flip flop states to our state labels (S, S2, S3, S4). Notice that this is arbitrary. However, we can save resources if we assign each state to the count that we desire. Then, the output count is just the flip flops outputs. S: = S2: = S3: = S4: = Third step: citation table. Here, we replace the state labels by the flip flop states: PRSNT STAT NXTSTAT (t) (t) (t+) (t+) Fourth step: citation equations and minimiation. (t + ) and (t + ) are the net state of the flip flops, i.e. these signals are to be connected to the inputs of the flip flops. (t+) (t+) (t + ) = + + (t + ) = + = Output only depends on the present state. Outputs, are the states and they only depend (in terms of the combinational output circuit) on the present state. Thus, this is a Moore FSM. Fifth step: Circuit implementation. state S S S2 S3 S3 S4 S4 S S2 S2 Note: In these 2-bit counters, the states are represented by the outputs of the flip flops:,. They also happen to be the outputs of the FSM. This is common in counters, as the count is usually the same as the flip flop outputs. 3 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 ample: BC counter. Outputs: (3..),. When the count reaches, becomes. Moore FSM = '' S =,= S2 =,= S3 =2,= S4 =3,= S5 =4,= S =9,= S9 =8,= S8 =7,= S7 =6,= S6 =5,= ample: FSM. Input: w. Output:. This is a Moore FSM as only depends on the present state. = w= w= w= w= w= S = S2 = w= S3 w= S4 w= = = S5 = w= w= w= w= w= w= w= S9 = w= S8 = w= S7 = w= S6 = rstn w state S S S2 S9 S8 S9 S S2 S3 S2 S3 S4 S5 S4 S3 S4 4 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 ALGORITHMIC STAT MACHIN (ASM) CHARTS: Gray counter, = when = Sequence etector (with overlap) = / / = / / / / S / S2 S / S2 / S3 / / S4 / / S3 / / S6 / / / S5 / / S4 / / S = S = S2 S2 S3 S3 S4 S4 S5 S6 5 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 XAMPL: ARBITR CIRCUIT Three devices can request access to a certain resource at any time (eample: access to a bus made of tri-state buffers, only one tri-state buffer can be enabled at a time). The FSM can only grant access to one device at a time.there should be a priority level among devices. If the FSM grants access to one device, one must wait until the request signal to that device is deasserted (i.e. set to ero) before granting access to a different device. VIC req priority grant VIC 2 grant2 req2 r r2 r3 FINIT STAT MACHIN g g2 g3 VIC 3 req3 CONTROL CIRCUIT grant3 Algorithmic State Machine (ASM) chart: S = g,g2,g3 r r 2 r 3 S2 S3 S4 g g2 g3 r r 2 r 3 6 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Winter 28 Modifying the rate of change of a Finite State Machine: We usually would like to reduce the rate at which FSM transitions occur. A straightforward option is to reduce the frequency of the input. But this is a very complicated problem when a high precision is required. Alternatively, we can reduce the rate at which FSM transitions occur by inclug an enable signal in our FSM: this means inclug an enable to every flip flop in the FSM. For any FSM transition to occur, the enable signal has to be. Then we assert the enable signal only when we need it. The effect is the same as reducing the frequency of the input. The figure below depicts a counter modulo-n (from to N-) connected to a comparator that generates a pulse (output signal ) of one period every time we hit the count N-. The number of bits the counter is given by n = log 2 N. The effect is the same as reducing the frequency of the FSM to f N, where f is the frequency of the. A modulo-n counter is better designed using VHL behavioral description, where the count is increased by every cycle and is generated by comparing the count to N-. A modulo-n counter could be designed by the State Machine method, but this can be very cumbersome if N is a large number. For eample, if N =, we need states. n Inputs FSM Outputs comparator counter to N- =N-? As an eample, we provide the timing diagram of the counter from to N-, when N=. Notice that is only activated when the count reaches. This signal controls the enable of a state machine, so that the FSM transitions only occur every cycles, thereby having the same effect as reducing the frequency by. We can apply the same technique not only to FSMs, but also to any sequential circuit. This way, we can reduce the rate of any sequential circuit (e.g. another counter) by inclug an enable signal of every flip flop in the circuit. 7 Instructor: aniel Llamocca