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

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

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

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

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

UNIVERSITI MALAYSIA PERLIS

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


DIGITAL DESIGN WITH SM CHARTS

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

Module-20 Shift Registers

Chapter 9. sequential logic technologies

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

DELD MODEL ANSWER DEC 2018

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

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

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

Chapter 9. sequential logic technologies

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

Practical Workbook Logic Design & Switching Theory

Module -18 Flip flops

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

CONTENTS Sl. No. Experiment Page No

DIGITAL ELECTRONICS QUESTION BANK

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

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

Gomoku Player Design

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

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

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

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

Spec. Instructor: Center

Linear & Digital IC Applications (BRIDGE COURSE)

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

CHAPTER FIVE - Flip-Flops and Related Devices

Clock Signal Review Memory Elements

Laboratory Manual CS (P) Digital Systems Lab

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

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

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

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

Mixed Synchronous/Asynchronous State Memory for Low Power FSM Design

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

ENGG1015: lab 3. Sequential Logic

Lecture 3: Logic circuit. Combinational circuit and sequential circuit

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

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

EC O4 403 DIGITAL ELECTRONICS

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

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

CS/EE Homework 9 Solutions

COLLEGE OF ENGINEERING, NASIK

Lecture 20: Several Commercial Counters & Shift Register

GATE Online Free Material

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

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

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

Digital Logic Circuits

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

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

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

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

High Speed Binary Counters Based on Wallace Tree Multiplier in VHDL

CMOS Digital Integrated Circuits Lec 11 Sequential CMOS Logic Circuits

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

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

Implementing Logic with the Embedded Array

The counterpart to a DAC is the ADC, which is generally a more complicated circuit. One of the most popular ADC circuit is the successive

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

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

POWER EFFICIENT DESIGN OF COUNTER ON.12 MICRON TECHNOLOGY

Digital Circuits Laboratory LAB no. 12. REGISTERS

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

CS302 - Digital Logic Design Glossary By

a8259 Features General Description Programmable Interrupt Controller

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

Sequential Logic Circuits

SRV ENGINEERING COLLEGE SEMBODAI RUKMANI VARATHARAJAN ENGINEERING COLLEGE SEMBODAI

ENHANCING SPEED AND REDUCING POWER OF SHIFT AND ADD MULTIPLIER

Analog to Digital Conversion

Electronics. Digital Electronics

EE 42/100 Lecture 24: Latches and Flip Flops. Rev A 4/14/2010 (8:30 PM) Prof. Ali M. Niknejad

On Built-In Self-Test for Adders

Multiplier and Accumulator Using Csla

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

Lab #10: Finite State Machine Design

Lecture 02: Digital Logic Review

EITF35: Introduction to Structured VLSI Design

IES Digital Mock Test

Theory of Logic Circuits. Laboratory manual. Exercise 4

CHAPTER 5 DESIGNS AND ANALYSIS OF SINGLE ELECTRON TECHNOLOGY BASED MEMORY UNITS

Chapter 10 Counter modules

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

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

USB4. Encoder Data Acquisition USB Device Page 1 of 8. Description. Features

We ve looked at timing issues in combinational logic Let s now examine timing issues we must deal with in sequential circuits

Logic 0 Logic To provide an output load (or two) 5 Voltage Measurement Point V CC +5 74LS00 GND


Transcription:

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Fall 27 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 Fall 27 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 enable 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). Flip flops classification: 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. S S R Positive edge-triggered R Negative edge-triggered SR Flip Flop S R t+ t+ t t S R 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 Fall 27 Flip Flop t+ Flip Flop dge etector T Flip Flop t+ = (on the edge) T T T t+ t t t+ = T t (on the edge) JK Flip Flop J K J K J K t+ t t+ = J t + K t (on the edge) t Synchronous/Asynchronous Inputs So far, the flip flops can only change their outputs on the rising (or falling edge). The outputs are usually changed due to a change in the inputs. These inputs are known as synchronous inputs, as the inputs' state is only checked on the rising (or falling) edges. However, in many instances, it is useful to have inputs that force the outputs to a value prn immediately, disregarg the rising (or falling edges). These inputs are known as asynchronous inputs. In the eample, we see a Flip Flop with two asynchronous inputs: o prn: Preset (active low). When prn='', the output q becomes. o : Clear (active low). When ='', the output q becomes. If prn and are both, usually is given priority. A Flip flop could have more than one asynchronous inputs, or none. 3 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Fall 27 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 Fall 27 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: 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: 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 Fall 27 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 'dout'. 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: dout dout n- n-2 n-3 dout n- n-2 n-3 LFT SHIFT RGISTR: dout dout 2 n- dout 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 Fall 27 Parallel access shift register: 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 Adg enable 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 dout dout dout dout n- n-2 n-3 2 n- 7 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Fall 27 Parallel access shift register with enable All the flip flops share the same enable input. 3 2 3 s_l 2 s_l 8 Instructor: aniel Llamocca

prn LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Fall 27 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. They are usually designed using Finite State Machines (FSM). 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 Fall 27 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. reset wr_rd _in[3..] 4 2 address[2..] wr_rd 3 ecoder 3 4 4 ecoder: HX to 7 segments 5 3 7 6 7 Instructor: aniel Llamocca

LCTRICAL AN COMPUTR NGINRING PARTMNT, OAKLAN UNIVRSITY C-27: igital Logic esign Fall 27 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 Fall 27 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 Fall 27 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 Fall 27 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 Fall 27 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 Fall 27 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 Fall 27 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