Cover image for FSM-based digital design using Verilog HDL
Title:
FSM-based digital design using Verilog HDL
Personal Author:
Publication Information:
Chichester, England : J. Wiley & Sons, 2008
Physical Description:
1 CD-ROM ; 12 cm.
ISBN:
9780470060704
General Note:
Accompanies text of the same title : (TK7885.7 M564 2008)
Added Author:

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010161878 CP 013073 Computer File Accompanies Open Access Book Compact Disc Accompanies Open Access Book
Searching...

On Order

Summary

Summary

As digital circuit elements decrease in physical size, resulting in increasingly complex systems, a basic logic model that can be used in the control and design of a range of semiconductor devices is vital. Finite State Machines (FSM) have numerous advantages; they can be applied to many areas (including motor control, and signal and serial data identification to name a few) and they use less logic than their alternatives, leading to the development of faster digital hardware systems.

This clear and logical book presents a range of novel techniques for the rapid and reliable design of digital systems using FSMs, detailing exactly how and where they can be implemented. With a practical approach, it covers synchronous and asynchronous FSMs in the design of both simple and complex systems, and Petri-Net design techniques for sequential/parallel control systems. Chapters on Hardware Description Language cover the widely-used and powerful Verilog HDL in sufficient detail to facilitate the description and verification of FSMs, and FSM based systems, at both the gate and behavioural levels.

Throughout, the text incorporates many real-world examples that demonstrate designs such as data acquisition, a memory tester, and passive serial data monitoring and detection, among others. A useful accompanying CD offers working Verilog software tools for the capture and simulation of design solutions.

With a linear programmed learning format, this book works as a concise guide for the practising digital designer. This book will also be of importance to senior students and postgraduates of electronic engineering, who require design skills for the embedded systems market.


Author Notes

Peter D. Minns, Northumbria University, School of Computing, Engineering, and Information Sciences, Newcastle Upon Tyne
Dr Peter Minns has been at Northumbria University since 1984, now holding the position of Senior Lecturer in the School of Computing, Engineering and Information Sciences. He teaches courses on electrical circuit theory, electronics, programming and embedded system design to both undergraduates and post graduates, and is also involved in teaching company schemes in industry. Previous to this, he has worked for many years as a practising engineer specializing in both the telecommunications and embedded microprocessor fields. His current research interest is in the development of finite state machines (FSMs).

Ian David Elliott, Northumbria University, School of Computing, Engineering, and Information Sciences, Newcastle Upon Tyne
Ian Elliott has been a lecturer in further and higher education for over 20 years, currently holding the position of Senior Lecturer in the School of Computing, Engineering and Information Sciences, at Northumbria University. He has taught a wide range of subjects in the field of electronics, as well as working as a consultant in industry, carrying out research into integrated circuit testing. He now specializes in hardware description languages, specifically Verilog-HDL and Very High Speed Integrated Circuit (VHSIC) Hardware Description Language (VHDL). He was one of the first academics to introduce the topic of hardware description languages into the curriculum.


Table of Contents

Prefacep. xi
Acknowledgementsp. xv
1 Introduction to Finite-State Machines and State Diagrams for the Design of Electronic Circuits and Systemsp. 1
1.1 Introductionp. 1
1.2 Learning Materialp. 2
1.3 Summaryp. 21
2 Using State Diagrams to Control External Hardware Subsystemsp. 23
2.1 Introductionp. 23
2.2 Learning Materialp. 23
2.3 Summaryp. 38
3 Synthesizing Hardware from a State Diagramp. 39
3.1 Introduction to Finite-State Machine Synthesisp. 39
3.2 Learning Materialp. 40
3.3 Summaryp. 66
4 Synchronous Finite-State Machine Designsp. 67
4.1 Traditional State Diagram Synthesis Methodp. 67
4.2 Dealing with Unused Statesp. 69
4.3 Development of a High/Low Alarm Indicator Systemp. 71
4.3.1 Testing the Finite-State Machine using a Test-Bench Modulep. 75
4.4 Simple Waveform Generatorp. 76
4.4.1 Sampling Frequency and Samples per Waveformp. 78
4.5 The Dice Gamep. 79
4.5.1 Development of the Equations for the Dice Gamep. 81
4.6 Binary Data Serial Transmitterp. 83
4.6.1 The RE Counter Block in the Shift Register of Figure 4.15p. 87
4.7 Development of a Serial Asynchronous Receiverp. 88
4.7.1 Finite-State Machine Equationsp. 91
4.8 Adding Parity Detection to the Serial Receiver Systemp. 92
4.8.1 To Incorporate the Parityp. 92
4.8.2 D-Type Equations for Figure 4.26p. 94
4.9 An Asynchronous Serial Transmitter Systemp. 95
4.9.1 Equations for the Asynchronous Serial Transmitterp. 98
4.10 Clocked Watchdog Timerp. 100
4.10.1 D Flip-Flop Equationsp. 102
4.10.2 Output Equationp. 102
4.11 Summaryp. 103
5 The One Hot Technique in Finite-State Machine Designp. 105
5.1 The One Hot Techniquep. 105
5.2 A Data Acquisition Systemp. 110
5.3 A Shared Memory Systemp. 114
5.4 Fast Waveform Synthesizerp. 116
5.4.1 Specificationp. 117
5.4.2 A Possible Solutionp. 118
5.4.3 Equations for the d Inputs to D Flip-Flopsp. 119
5.4.4 Output Equationsp. 120
5.5 Controlling the Finite-State Machine from a Microprocessor/Microcontrollerp. 120
5.6 A Memory-Chip Testerp. 123
5.7 Comparing One Hot with the more Conventional Design Method of Chapter 4p. 126
5.8 A Dynamic Memory Access Controllerp. 127
5.8.1 Flip-Flop Equationsp. 131
5.8.2 Output Equationsp. 131
5.9 How to Control the Dynamic Memory Access from a Microprocessorp. 132
5.10 Detecting Sequential Binary Sequences using a Finite-State Machinep. 134
5.11 Summaryp. 143
6 Introduction to Verilog HDLp. 145
6.1 A Brief Background to Hardware Description Languagesp. 145
6.2 Hardware Modelling with Verilog HDL: the Modulep. 147
6.3 Modules within Modules: Creating Hierarchyp. 152
6.4 Verilog HDL Simulation: a Complete Examplep. 155
Referencesp. 162
7 Elements of Verilog HDLp. 163
7.1 Built-In Primitives and Typesp. 163
7.1.1 Verilog Typesp. 163
7.1.2 Verilog Logic and Numeric Valuesp. 167
7.1.3 Specifying Valuesp. 169
7.1.4 Verilog HDL Primitive Gatesp. 170
7.2 Operators and Expressionsp. 172
7.3 Example Illustrating the Use of Verilog HDL Operators: Hamming Code Encoderp. 185
7.3.1 Simulating the Hamming Encoderp. 188
Referencesp. 195
8 Describing Combinational and Sequential Logic using Verilog HDLp. 197
8.1 The Data-Flow Style of Description: Review of the Continuous Assignmentp. 197
8.2 The Behavioural Style of Description: the Sequential Blockp. 198
8.3 Assignments within Sequential Blocks: Blocking and Nonblockingp. 204
8.3.1 Sequential Statementsp. 204
8.4 Describing Combinational Logic using a Sequential Blockp. 209
8.5 Describing Sequential Logic using a Sequential Blockp. 217
8.6 Describing Memoriesp. 229
8.7 Describing Finite-State Machinesp. 240
8.7.1 Example 1: Chess Clock Controller Finite-State Machinep. 245
8.7.2 Example 2: Combination Lock Finite-State Machine with Automatic Lock Featurep. 252
Referencesp. 265
9 Asynchronous Finite-State Machinesp. 267
9.1 Introductionp. 267
9.2 Development of Event-Driven Logicp. 269
9.3 Using the Sequential Equation to Synthesize an Event Finite-State Machinep. 272
9.3.1 Short-cut Rulep. 275
9.4 Implementing the Design using Sum of Product as used in a Programmable Logic Devicep. 276
9.4.1 Dropping the Present State n and Next State n + 1 Notationp. 277
9.5 Development of an Event Version of the Single-Pulse Generator with Memory Finite-State Machinep. 277
9.6 Another Event Finite-State Machine Design from Specification through to Simulationp. 280
9.6.1 Important Note!p. 280
9.6.2 A Motor Controller with Fault Current Monitoringp. 281
9.7 The Hover Mower Finite-State Machinep. 285
9.7.1 The Specification and a Possible Solutionp. 285
9.8 An Example with a Transition without any Inputp. 289
9.9 Unusual Example: Responding to a Microprocessor-Addressed Locationp. 291
9.10 An Example that uses a Mealy Outputp. 293
9.10.1 Tank Water Level Control System with Solutionsp. 293
9.11 An Example using a Relay Circuitp. 296
9.12 Race Conditions in an Event Finite-State Machinep. 299
9.12.1 Race between Primary Inputsp. 300
9.12.2 Race between Secondary State Variablesp. 300
9.12.3 Race between Primary and Secondary Variablesp. 300
9.13 Wait-State Generator for a Microprocessor Systemp. 301
9.14 Development of an Asynchronous Finite-State Machine for a Clothes Spinner Systemp. 304
9.15 Caution when using Two-Way Branchesp. 309
9.16 Summaryp. 312
Referencesp. 312
10 Introduction to Petri Netsp. 313
10.1 Introduction to Simple Petri Netsp. 313
10.2 Simple Sequential Example using a Petri Netp. 318
10.3 Parallel Petri Netsp. 319
10.3.1 Another Example of a Parallel Petri Netp. 323
10.4 Synchronizing Flow in a Parallel Petri Netp. 324
10.4.1 Enabling and Disabling Arcsp. 325
10.5 Synchronization of Two Petri Nets using Enabling and Disabling Arcsp. 326
10.6 Control of a Shared Resourcep. 327
10.7 A Serial Receiver of Binary Datap. 329
10.7.1 Equations for the First Petri Netp. 333
10.7.2 Outputp. 333
10.7.3 Equations for the Main Petri Netp. 333
10.7.4 Outputsp. 333
10.7.5 The Shift Registerp. 334
10.7.6 Equations for the Shift Registerp. 334
10.7.7 The Divide-by-11 Counterp. 335
10.7.8 The Data Latchp. 335
10.8 Summaryp. 336
Referencesp. 336
Appendix A Logic Gates and Boolean Algebra Used in the Bookp. 337
A.1 Basic Gate Symbols Used in the Book with Boolean Equationsp. 337
A.2 The Exclusive OR and Exclusive NORp. 338
A.3 Laws of Boolean Algebrap. 338
A.3.1 Basic OR Rulesp. 339
A.3.2 Basic AND Rulesp. 339
A.3.3 Associative and Commutative Lawsp. 340
A.3.4 Distributive Lawsp. 340
A.3.5 Auxiliary Law for Static 1 Hazard Removalp. 341
A.3.5.1 Proof of Auxiliary Rulep. 341
A.3.6 Consensus Theoremp. 342
A.3.7 The Effect of Signal Delay in Logic Gatesp. 343
A.3.8 De Morgan's Theoremp. 343
A.4 Examples of Applying the Laws of Boolean Algebrap. 345
A.4.1 Example: Converting AND-OR to NANDp. 345
A.4.2 Example: Converting AND-OR to NORp. 345
A.4.3 Logical Adjacency Rulep. 345
A.5 Summaryp. 346
Appendix B Counting and Shifting Circuit Techniquesp. 347
B.1 Basic Up and Down Synchronous Binary Counter Developmentp. 347
B.2 Example for a 4-Bit Synchronous Up-Counter Using T-Type Flip-Flopsp. 349
B.3 Parallel-Loading Counters: Using T Flip-Flopsp. 352
B.4 Using D Flip-Flops to Build Parallel-Loading Counters with Cheap Programmable Logic Devicesp. 353
B.5 Simple Binary Up-Counter: with Parallel Inputsp. 354
B.6 Clock Circuit to Drive the Counter (And Finite-State Machines)p. 355
B.7 Counter Design using Don't Care Statesp. 355
B.8 Shift Registersp. 357
B.9 Asynchronous Receiver Details of Chapter 4p. 358
B.9.1 The 11-Bit Shift Registers for the Asynchronous Receiver Modulep. 360
B.9.2 Divide-by-11 Counterp. 362
B.9.3 Complete Simulation of the Asynchronous Receiver Module of Chapter 4p. 364
B.10 Summaryp. 365
Appendix C Tutorial on the Use of Verilog HDL to Simulate a Finite-State Machine Designp. 367
C.1 Introductionp. 367
C.2 The Single Pulse with Memory Synchronous Finite-State Machine Design: Using Verilog HDL to Simulatep. 367
C.2.1 Specificationp. 367
C.2.2 Block Diagramp. 367
C.2.3 State Diagramp. 368
C.2.4 Equations from the State Diagramp. 368
C.2.5 Translation into a Verilog Descriptionp. 369
C.3 Test-Bench Module and its Purposep. 372
C.4 Using SynaptiCAD's VeriLogger Extreme Simulatorp. 376
C.5 Summaryp. 378
Appendix D Implementing State Machines using Verilog Behavioural Modep. 379
D.1 Introductionp. 379
D.2 The Single-Pulse/Multiple-Pulse Generator with Memory Finite-State Machine Revisitedp. 379
D.3 The Memory Tester Finite-State Machine in Section 5.6p. 383
D.4 Summaryp. 386
Indexp. 387