Preface21
About the Authors28
Chapter 1Boolean Algebra, Boolean Functions, VHDL, and Gates1
1.1Introduction1
1.2Basics of Boolean Algebra1
1.2.1Venn Diagrams2
1.2.2Black Boxes for Boolean Functions3
1.2.3Basic Logic Symbols4
1.2.4Boolean Algebra Postulates7
1.2.5Boolean Algebra Theorems8
1.2.6Proving Boolean Algebra Theorems9
1.3Deriving Boolean Functions from Truth
Tables10
1.3.1Deriving Boolean Functions Using the 1s of the Functions10
1.3.2Deriving Boolean Functions Using the 0s of the Functions11
1.3.3Deriving Boolean Functions Using Minterms and Maxterms12
1.4Writing VHDL Designs for Simple Gate Functions15
1.4.1VHDL Design for a NOT Function15
1.4.2VHDL Design for an AND Function17
1.4.3VHDL Design for an OR Function18
1.4.4VHDL Design for an XOR Function19
1.4.5VHDL Design for a NAND Function21
1.4.6VHDL Design for a NOR Function22
1.4.7VHDL Design for an XNOR Function24
1.4.8VHDL Design for a BUFFER
Function26
1.4.9VHDL Design for any Boolean Function Written in Canonical Form27
1.5More about Logic Gates30
1.5.1Equivalent Gate Symbols30
1.5.2Functionally Complete Gates31
1.5.3Equivalent Gate Circuits32
1.5.4Compact Description Names for Gates32
1.5.5International Logic Symbols for Gates32
Problems34
数字逻辑与计算机设计——VHDL语言描述
Chapter 2Number Conversions, Codes, and Function Minimization37
2.1Introduction37
2.2Digital Circuits versus Analog Circuits37
2.2.1Digitized Signal for the Human Heart37
2.2.2Discrete Signals versus Continuous
Signals38
2.3Binary Number Conversions38
2.3.1Decimal, Binary, Octal, and Hexadecimal Numbers38
2.3.2 Conversion Techniques40
2.4Binary Codes45
2.4.1Minimum Number of Bits for Keypads and Keyboards45
2.4.2Commonly Used Codes: BCD, ASCII, and Others45
2.4.3Modulo2 Addition and Conversions between Binary and Reflective Gray
Code48
2.4.47Segment Code51
2.4.5VHDL Design for a Letter Display
System52
2.5Karnaugh Map Reduction Method54
2.5.1 The Karnaugh Map Explorer55
2.5.2 Using a 2Variable KMap56
2.5.3 Using a 3Variable KMap58
2.5.4 Using a 4Variable KMap60
2.5.5 Don’tCare Outputs61
Problems63
Chapter 3Introduction to Logic Circuit Analysis and Design67
3.1Introduction67
3.2Integrated Circuit Devices67
3.3Analyzing and Designing Logic Circuits69
3.3.1Analyzing and Designing Relay Logic Circuits69
3.3.2Analyzing IC Logic Circuits70
3.3.3Designing IC Logic Circuits71
3.4Generating Detailed Schematics74
3.5Designing Circuits in NAND/NAND and NOR/NOR Form76
3.6Propagation Delay Time78
3.7Decoders79
3.7.1Designing Logic Circuits with Decoders and Single Gates82
3.8Multiplexers85
3.8.1Designing Logic Circuits with MUXs87
3.9Hazards88
3.9.1Function Hazards88
3.9.2Logic Hazards89
Problems91
Chapter 4Combinational Logic Circuit Design with VHDL94
4.1Introduction94
4.2VHDL94
4.3The Library Part95
4.4The Entity Declaration96
4.5The Architecture Declaration97
4.5.1Comments about a Dataflow Design
Style98
4.5.2Comments about a Behavioral Design
Style98
4.5.3Comments about a Structural Design
Style98
4.6Dataflow Design Style99
4.7Behavioral Design Style102
4.8Structural Design Style106
4.9Implementing with Wires and Buses112
4.10VHDL Examples116
4.10.1Design with Scalar Inputs and
Outputs117
4.10.2Design with Vector Inputs and
Outputs118
4.10.3Common VHDL Constructs120
Problems121
Chapter 5Bistable Memory Device Design with VHDL125
5.1Introduction125
5.2Analyzing an SR NOR Latch125
5.2.1Simple On/Off Light Switch125
5.2.2Circuit Delay Model for an SR NOR Latch127
5.2.3Characteristic Table for an SR NOR Latch128
5.2.4Characteristic Equation for an SR NOR Latch129
5.2.5PS/NS Table for an SR NOR Latch129
5.2.6Timing Diagram for an SR NOR
Latch130
5.3Analyzing an SR NAND Latch132
5.3.1Circuit Delay Model for an SR NAND Latch132
5.3.2Characteristic Table for an SR NAND Latch132
5.3.3Characteristic Equation for an SR NAND Latch133
5.3.4PS/NS Table for an SR NAND
Latch133
5.3.5Timing Diagram for an SR NAND
Latch133
5.4Designing a Simple Clock134
5.5Designing a D Latch137
5.5.1Gated SR Latch Circuit Design137
5.5.2D Latch Circuit Design with SR
Latches138
5.5.3D Latch Circuit Design via the Characteristic Table for a D Latch139
5.5.4Timing Diagram for a D Latch140
5.5.5Creating a Clock via a D Latch141
5.5.6Creating an8bit D Latch142
5.6Designing D FlipFlop Circuits143
5.6.1Designing Master–Slave D FlipFlop Circuits143
5.6.2Designing D FlipFlop Circuits with SR NAND Latches146
5.6.3Timing Diagram for Positive EdgeTriggered D FlipFlop149
Problems150
Chapter 6Simple Finite State Machine Design with VHDL156
6.1Introduction156
6.2Synchronous Circuits156
6.3Creating Dtype FlipFlops in VHDL157
6.4Designing Simple Synchronous Circuits158
6.5Counter Design Using the Algorithmic Equation Method159
6.6Nonconventional Counter Design Using the Algorithmic Equation Method167
6.7Counter Design Using the Arithmetic
Method170
6.8Frequency Division (Slowing Down a Fast Clock Frequency)171
6.9Counter Design Using the PS/NS Tabular Method174
6.10Nonconventional Counter Design Using the PS/NS Tabular Method177
Problems178
Chapter 7Computer Circuits184
7.1Introduction184
7.2ThreeState Outputs and the Disconnected
State184
7.3Data Bus Sharing for a Microcomputer
System187
7.4More about XOR and XNOR Symbols and Functions190
7.4.1Odd and Even Functions191
7.4.2SingleBit Error Detection System192
7.4.3Comparators and Greater Than
Circuits194
7.5Adder Design197
7.5.1Designing a Half Adder Module197
7.5.2Designing a Full Adder Module198
7.6Designing and Using RippleCarry Adders and Subtractors200
7.7Propagation Delay Time for RippleCarry Adders203
7.8Designing Carry LookAhead Adders203
7.9Propagation Delay Time for Carry LookAhead Adders206
Problems206
Chapter 8Circuit Implementation
Techniques210
8.1Introduction210
8.2Programmable Logic Devices210
8.2.1PROMs and LUTs212
8.2.2PLAs213
8.2.3PALs or GALs213
8.2.4Designing with PROMs or LUTs214
8.2.5Designing with PLAs215
8.2.6Designing with PALs or GALs216
8.3Positive Logic Convention and Direct Polarity Indication217
8.3.1Signal Names217
8.3.2Analyzing Equivalent Circuits for the PLC and the DPI Systems218
8.4More about MUXs and DMUXs221
8.4.1Designing MUX Trees223
8.4.2Designing DMUX Trees223
Problems224
Chapter 9Complex Finite State Machine Design with VHDL227
9.1Introduction227
9.2Designing with the TwoProcess PS/NS
Method228
9.3Explanation of CPLDs and FPGAs and State Machine Encoding Styles231
9.4Summary of Finite State Machine Models234
9.5Designing Compact Encoded State Machines with Moore Outputs235
9.6Designing OneHot Encoded State Machines with Moore Outputs237
9.7Designing Compact Encoded State Machines with Moore and Mealy Outputs241
9.8Designing OneHot Encoded State Machines with Moore and Mealy Outputs243
9.9Using the Algorithmic Equation Method to Design Complex State Machines245
9.10Improving the Reliability of Complex State Machine Designs251
9.11Additional State Machine Design
Methods255
9.11.1TwoAssignment PS/NS Method256
9.11.2Hybrid PS/NS Method259
Problems262
Chapter 10Basic Computer Architectures279
10.1Introduction279
10.2Generic DataProcessing System or
Computer279
10.3HarvardType Computer and RISC Architecture280
10.4Princeton (von Neumann)Type Computer and CISC Architecture282
10.5Overview of VBC1 (Very Basic
Computer 1)283
10.6Design Philosophy of VBC1283
10.7Programmer’s Register Model for VBC1286
10.8Instruction Set Architecture for VBC1287
10.9Format for Writing Assembly Language
Programs289
Problems290
Chapter 11Assembly Language Programming for VBC1292
11.1Introduction292
11.2Instruction Set for VBC1292
11.3The IN Instruction293
11.4The OUT Instruction296
11.5The MOV Instruction298
11.6The LOADI Instruction300
11.7The ADDI Instruction301
11.8The ADD Instruction303
11.9The SR0 Instruction304
11.10The JNZ Instruction306
11.11Programming Examples and Techniques for VBC1308
11.11.1Unconditional Jump308
11.11.2Labels308
11.11.3Loop Counter309
11.11.4Program Runs Amuck310
11.11.5Subtraction Instruction310
11.11.6Multiply Instruction312
11.11.7Divide Instruction312
Problems312
Chapter 12Designing Input/Output
Circuits316
12.1Introduction316
12.2Designing Steering Circuits316
12.3Designing Bus Steering Circuits318
12.4Designing Loadable Register Circuits319
12.5Designing Input Circuits321
12.5.1Designing an Input Circuit Driven by Four Slide Switches323
12.6Designing Output Circuits324
12.6.1Designing an Output Circuit to Drive Four LEDs325
12.6.2Designing an Output Circuit to Drive a 7Segment Display326
12.6.3A Closer Look at the Circuitry for Display 0328
12.7Combining Input and Output Circuits to Form a Simple I/O System329
12.8Alternate VHDL Design Styles332
Problems333
Chapter 13Designing Instruction Memory, Loading Program Counter, and Debounced Circuit335
13.1Introduction335
13.2Designing an Instruction Memory335
13.2.1Coding Alterations for Instruction Memory337
13.2.2Initializing Instruction Memory for VBC1 at Startup339
13.3Designing a Loading Program Counter342
13.4Designing a Debounced OnePulse
Circuit345
13.5Design Verification for a Debounced OnePulse Circuit348
Problems355
Chapter 14Designing Multiplexed Display Systems357
14.1Introduction357
14.2Multiplexed Display System for Four 7Segment LED Displays357
14.3Designing a Multiplexed Display System Using VHDL360
14.3.1Designing Module 1: A 4to1 MUX Array360
14.3.2Designing Module 2: A HEX Display Decoder361
14.3.3Designing Module 3: A 2bit Counter and a Frequency Divider362
14.3.4Designing Module 4: A 2to4
Decoder364
14.4Complete Design of a Multiplexed Display System Using a Flat Design Approach364
14.5Complete Design of a Multiplexed Display System Using a Hierarchal Design
Approach367
14.6Designing a Word Display System Using a Flat Design Approach372
Problems377
Chapter 15Designing Instruction Decoders379
15.1Introduction379
15.2Purpose of the Instruction Decoder379
15.3Instruction Decoder Truth Tables for the IN, OUT, and MOV Instructions380
15.4Designing an Instruction Decoder for the IN Instruction382
15.5Designing an Instruction Decoder for the OUT and MOV Instructions383
15.6Instruction Decoder Truth Table for the LOADI Instruction384
15.7Instruction Decoder Truth Table for the ADDI Instruction385
15.8Instruction Decoder Truth Table for the ADD Instruction386
15.9Instruction Decoder Truth Table for the SR0 Instruction387
15.10Designing an Instruction Decoder for the SR0 Instruction388
15.11Instruction Decoder Truth Table for the JNZ Instruction389
15.12Designing an Instruction Decoder for the JNZ Instruction391
15.13Designing an Instruction Decoder for
VBC1393
Problems393
Chapter 16Designing Arithmetic Logic
Units398
16.1Introduction398
16.2Utilization of the Arithmetic Logic Unit398
16.3Designing the LOADI Instruction Part of the ALU399
16.4Designing the ADDI Instruction Part of the ALU400
16.5Designing the ADD Instruction Part of the ALU401
16.6Designing the SR0 Instruction Part of the ALU401
16.7Designing an ALU for VBC1402
16.8Additional Circuit Designs with VHDL403
16.8.1Designing Additional ALU
Circuits403
16.8.2Designing Shifter Circuits406
16.8.3Designing Barrel Shifter Circuits409
16.8.4Designing Shift Register Circuits412
Problems414
Chapter 17Completing the Design for
VBC1416
17.1Introduction416
17.2Designing a Running Program Counter416
17.3Combining a Loading and a Running Program Counter419
17.4Designing a Run Frequency Circuit and a Speed Circuit421
17.5Designing Circuits to Provide a Loader for Instruction Memory for VBC1423
Problems424
Chapter 18Assembly Language Programming for VBC1E425
18.1Introduction425
18.2Instruction Summary425
18.3Input, Output, and Interrupt
Instructions427
18.4Data Memory Instructions432
18.5Arithmetic and Logic Instructions434
18.6Shift and Rotate Instructions437
18.7Jump, Jump Relative, and Halt
Instructions439
18.8More about Interrupts and Assembler Directives443
18.9Complete Instruction Set Summary for
VBC1E448
Problems449
Chapter 19Designing Input/Output Circuits for VBC1E458
19.1Introduction458
19.2Designing the Input Circuit for VBC1E458
19.3Instruction Decoder Truth Table for the Modifi ed IN Instruction for VBC1E460
19.4Designing the Output Circuit for
VBC1E462
19.5Instruction Decoder Truth Table for the Modifi ed OUT Instruction for VBC1E464
19.6Designing an Instruction Decoder for the Modifi ed IN and OUT Instructions for
VBC1E466
19.7Designing an Instruction Decoder for the LOADI, ADDI, and JNZ Instructions for VBC1E467
Problems468
Chapter 20Designing the Data Memory Circuit for VBC1E471
20.1Introduction471
20.2Designing the Data Memory for VBC1E471
20.3Designing Circuits to Select the Registers and Data for VBC1E475
20.4Instruction Decoder Truth Tables for the STORE and FETCH Instructions for
VBC1E475
20.5Designing an Instruction Decoder for the STORE and FETCH Instructions for
VBC1E478
20.6Designing an Instruction Decoder for the MOV Instruction for VBC1E479
Problems480
Chapter 21Designing the Arithmetic, Logic, Shift, Rotate, and Unconditional Jump Circuits for VBC1E482
21.1Introduction482
21.2Designing the Arithmetic and Logic Instructions Part of the ALU for
VBC1E482
21.3Designing the Instruction Decoder for the Arithmetic and Logic Instructions for
VBC1E484
21.4Designing the Shift and Rotate Instructions Part of the ALU for VBC1E485
21.5Designing the Instruction Decoder for the Shift and Rotate Instructions for VBC1E486
21.6Designing the JMP and JMPR Circuits for VBC1E488
21.7Designing the Instruction Decoder for the JMP and JMPR Instructions for VBC1E489
Problems490
Chapter 22Designing a Circuit to Prevent Program Execution During Manual Loading for VBC1E493
22.1Introduction493
22.2Designing a Circuit to Modify Manual Loading for VBC1E493
22.3Modifying the Instruction Decoder for Manual Loading for VBC1E495
Problems495
Chapter 23Designing Extended Instruction Memory for VBC1E496
23.1Introduction496
23.2Modifying the Instruction Memory to Add Extended Instruction Memory for
VBC1E496
23.3Modifying the Running Program Counter Circuit for VBC1E500
23.4Modifying the Proper Address Circuit for VBC1E501
23.5Modifying the Loading Program Counter Circuit for VBC1E501
23.6Modifying the JMPR Circuit for VBC1E502
Problems502
Chapter 24Designing the Software Interrupt Circuits for VBC1E504
24.1Introduction504
24.2Designing the Modified Circuit for the Running Program Counter and the Select Circuit for VBC1E504
24.3Designing the Circuit to Store PCPLUS1 for VBC1E509
24.4Instruction Decoder Truth Tables for the INT and IRET Instructions for VBC1E510
24.5Designing the Instruction Decoder for the INT and IRET Instructions for VBC1E511
Problems513
Chapter 25Completing the Design for
VBC1E516
25.1Introduction516
25.2Designing a Debounced OnePulse Trigger Interrupt Circuit and Modifying the RPC Circuit for VBC1E516
25.3Designing Circuits for Displaying the Signal RETAfor VBC1E521
25.4Designing Circuits to Provide a Loader for Instruction Memory for VBC1E525
Problems525
Appendices
ALaboratory Experiments528
Experiment 1A: Designing and Simulating Gates528
Experiment 1B: Completing the Design Cycle534
Experiment 2: Designing and Testing a Keypad Encoder System539
Experiment 3: Designing and Testing a Check Gates System542
Experiment 4: Designing and Testing a Custom Decimal Display Decoder System546
Experiment 5A: Designing and Testing a D Latch and a D FlipFlop with a CLR Input549
Experiment 5B: Designing and Testing an 8bit Register and a D FlipFlop with a PRE
Input553
Experiment 6A: Designing and Testing a Simple Counter System—A OneHot Up Counter with 8 Bits558
Experiment 6B: Designing and Testing a Simple Counter System—A Gray Code Counter with 2 Bits562
Experiment 6C: Designing and Testing a Simple Nonconventional Counter System—A Robot Eye Circuit565
Experiment 6D: Designing and Testing a Simple Nonconventional Counter—A Smiley Face Circuit569
Experiment 7A: Designing and Testing a Simple Error Detection System Using a Flat Design Approach572
Experiment 7B: Designing and Testing a 4bit Simple AdderSubtractor System Using a Hierarchal Design Approach577
Experiment 8: Designing and Testing a LUT Design System Using a Flat Design
Approach580
Experiment 9A: Designing and Testing a OneHot Up/ Down Counter System Using a Flat Design Approach584
Experiment 9B: Designing and Testing a 10State Counter System Using a Hierarchal Design Approach589
Experiment 10: Working with EASY1 (Editor/Assembler/ Simulator) for VBC1593
Experiment 11: Writing and Simulating Programs for VBC1 with EASY1598
Experiment 12: Designing and Testing VBC1 (Data Path Unit)600
Experiment 13: Designing and Testing VBC1 (Instruction Memory Unit)605
Experiment 14: Designing and Testing VBC1 (Monitor System)609
Experiment 15: Designing and Testing VBC1 (Instruction Decoder )613
Experiment 16: Designing and Testing VBC1 (Arithmetic Logic Unit)617
Experiment 17: Designing and Testing VBC1 (Final Hardware Design for VBC1)621
Experiment 17L: Designing a Loader for Instruction Memory for VBC1626
Experiment 18: Writing Assembly Language Programs and Running Them on VBC1632
Experiment 19: Designing and Testing VBC1E (IN, OUT, and Unchanged
Instructions)635
Experiment 20: Designing and Testing VBC1E (MOV and Data Memory Instructions)640
Experiment 21: Designing and Testing VBC1E (Almost All Instructions)645
Experiment 22: Designing and Testing VBC1E (Modifi ed Manual Loading)651
Experiment 23: Designing and Testing VBC1E (Add Extended Instruction Memory)654
Experiment 24: Designing and Testing VBC1E (INT and IRET Instructions)658
Experiment 25: Designing and Testing VBC1E (Final Hardware Design for VBC1E)663
Experiment 25L: Designing a Loader for Instruction Memory for VBC1E668
BObtaining Simulations via the VHDL TestBench Program675
B.1Introduction675
B.2Example 1—Combinational Logic Design (project: AND_3)675
B.3Example 2—Synchronous Sequential Logic Design (project: DFF)679
CFPGA Pin Connections—Handy Reference683
C.1BASYS 2 Board683
C.2NEXYS 2 Board684
C.3Memory Loader I/O Pin Connections for the FPGAs on the BASYS 2 and NEXYS 2
Board685
C.4FX2 MIB (Module Interface Board)—Addon Board for NEXYS 2686
DEASY1 Tutorial687
D.1Introduction687
D.2EASY1 Screen or GUI687
D.3EASY1 Layout687
D.4How to Use EASY1689
D.5Example 1—A Simple Input/Output
Program689
D.6Example 2—Input/Output Program Modified to Run Continuously695
D.7Example 3—A Simple State Machine
Program696
D.8Example 4—A Complex State Machine
Program696
D.9Example 5—Generating Time Delays698
D.10Using EASY1 to Generate Machine Code for VBC1699
EThree Methods for Loading Instructionsinto Memory701
E.1Loading Memory Manually701
E.2Initializing Memory at Startup702
E.3Loading Memory via the Memory Loader Program703
Index705
第1章布尔代数、布尔函数、VHDL和门1
1.1引言1
1.2布尔代数基础1
1.2.1维恩图2
1.2.2布尔函数的黑盒子3
1.2.3基本逻辑符号4
1.2.4布尔代数公理7
1.2.5布尔代数定理8
1.2.6布尔代数定理的证明9
1.3从真值表推出布尔函数10
1.3.1用函数的1值推出布尔函数10
1.3.2用函数的0值推出布尔函数11
1.3.3用最小项和最大项推出布尔函数12
1.4简单门函数的VHDL设计15
1.4.1NOT函数的VHDL设计15
1.4.2AND函数的VHDL设计17
1.4.3OR函数的VHDL设计18
1.4.4XOR函数的VHDL设计19
1.4.5NAND函数的VHDL设计21
1.4.6NOR函数的VHDL设计22
1.4.7XNOR函数的VHDL设计24
1.4.8BUFFER函数的VHDL设计26
1.4.9用标准形式给出的任意布尔函数的VHDL设计27
1.5有关逻辑门的更多内容30
1.5.1等价门符号30
1.5.2全功能门31
1.5.3等价门电路32
1.5.4门的简化描述名称32
1.5.5门的国际逻辑符号32
习题34
第2章数制转换、码制和函数最简化37
2.1引言37
2.2数字电路与模拟电路37
2.2.1人类心脏的数字化信号37
2.2.2离散信号与连续信号38
2.3二进制数制转换38
2.3.1十进制数、二进制数、八进制数和十六进制数38
2.3.2转换技术40
2.4二进制码制45
2.4.1小键盘和键盘的最少比特表示45
2.4.2常见码制: BCD,ASCII,以及其他45
2.4.3二进制和反射格雷码之间的模2加法和转换48
2.4.4七段码51
2.4.5字母显示系统的VHDL设计52
2.5卡诺图化简方法54
2.5.1卡诺图资源管理器55
2.5.2使用两变量卡诺图56
2.5.3使用三变量卡诺图58
2.5.4使用四变量卡诺图60
2.5.5无关的输出61
习题63
第3章逻辑电路分析和设计简介67
3.1引言67
3.2集成电路器件67
3.3分析和设计逻辑电路69
3.3.1分析和设计继电器逻辑电路69
3.3.2分析IC逻辑电路70
3.3.3设计IC逻辑电路71
3.4生成详细的原理图74
3.5用与非/与非和或非/或非形式设计电路76
3.6传输延时78
3.7译码器79
3.7.1用译码器和单个门设计逻辑电路82
3.8多路选择器85
3.8.1用多路选择器设计逻辑电路87
3.9险象88
3.9.1功能险象88
3.9.2逻辑险象89
习题91
第4章组合逻辑电路的VHDL设计94
4.1引言94
4.2VHDL94
4.3库组成95
4.4实体声明96
4.5结构体声明97
4.5.1数据流设计风格评价98
4.5.2行为设计风格评价98
4.5.3结构设计风格评价98
4.6数据流设计风格99
4.7行为设计风格102
4.8结构设计风格106
4.9用连线和总线实现112
4.10VHDL设计实例116
4.10.1用标量输入和输出设计117
4.10.2用向量输入和输出设计118
4.10.3通用VHDL体系结构120
习题121
第5章双稳态存储器件的VHDL设计125
5.1引言125
5.2SR NOR锁存器分析125
5.2.1简单的电灯开关125
5.2.2SR NOR锁存器的电路延迟模型127
5.2.3SR NOR锁存器的特性表128
5.2.4SR NOR锁存器的特征方程129
5.2.5SR NOR 锁存器的PS/NS表129
5.2.6SR NOR锁存器的时序图130
5.3SR NAND锁存器分析132
5.3.1SR NAND锁存器电路延迟模型132
5.3.2SR NAND锁存器的特性表132
5.3.3SR NAND锁存器的特征方程133
5.3.4SR NAND锁存器的PS/NS表133
5.3.5SR 与非锁存器的时序图133
5.4设计一个简单的时钟134
5.5设计一个D锁存器137
5.5.1门控SR锁存器电路设计137
5.5.2用SR锁存器设计D锁存器电路138
5.5.3利用D锁存器的特性表来设计D锁存器电路139
5.5.4D锁存器的时序图140
5.5.5用D锁存器构造一个时钟141
5.5.6构造一个8比特的D锁存器142
5.6设计D触发器电路143
5.6.1设计主从型D触发器电路143
5.6.2用SR与非锁存器设计D触发器146
5.6.3上升沿触发的D触发器的时序图149
习题150
第6章简单有限状态机的VHDL设计156
6.1引言156
6.2同步电路156
6.3用VHDL构造一个D型触发器157
6.4设计简单的同步电路158
6.5用算法公式法设计计数器159
6.6用算法公式法设计非传统计数器167
6.7用算术法设计计数器170
6.8分频(降低一个快时钟的频率)171
6.9用PS/NS表格法设计计数器174
6.10用PS/NS表格法设计非传统计数器177
习题178
第7章计算机电路184
7.1引言184
7.2三态输出与断开状态184
7.3微计算机系统的数据总线共享187
7.4深入了解XOR和XNOR符号及功能190
7.4.1奇函数和偶函数191
7.4.2单比特错误检测系统192
7.4.3比较器和大于电路194
7.5加法器设计197
7.5.1半加器模块的设计197
7.5.2全加器模块的设计198
7.6设计及使用行波进位加法器和减法器200
7.7行波进位加法器的传播延迟时间203
7.8设计超前进位加法器203
7.9超前进位加法器的传播延迟时间206
习题206
第8章电路实现技术210
8.1引言210
8.2可编程逻辑器件210
8.2.1可编程只读存储器(PROM)和查找表(LUT)212
8.2.2可编程逻辑阵列(PLA)213
8.2.3可编程阵列逻辑(PAL)或者通用阵列逻辑(GAL)213
8.2.4使用PROM或者LUT进行
电路设计214
8.2.5使用PLA进行电路设计215
8.2.6使用PAL或者GAL进行电路设计216
8.3正逻辑规则和直接极性标志217
8.3.1信号名称217
8.3.2PLC和DPI系统的等效电路分析218
8.4更多关于多路选择器(MUX)和数据分路器(DMUX)的内容221
8.4.1MUX树设计223
8.4.2DMUX树设计223
习题224
第9章复杂有限状态机的VHDL设计227
9.1引言227
9.2基于双进程PS/NS方法的设计228
9.3CPLD、FPGA和状态机编码风格浅析231
9.4有限状态机模型总结 234
9.5利用摩尔输出设计紧凑编码状态机 235
9.6利用摩尔输出设计单热点编码状态机 237
9.7利用摩尔和米利输出设计紧凑编码
状态机 241
9.8利用摩尔和米利输出设计单热点编码
状态机 243
9.9利用算法公式法设计复杂状态机 245
9.10提高复杂状态机的可靠性 251
9.11其他状态机设计方法 255
9.11.1双分配PS/NS方法256
9.11.2混合PS/NS方法259
习题262
第10章基本的计算机体系结构279
10.1引言279
10.2通用数据处理系统或计算机279
10.3哈佛型计算机和RISC体系结构280
10.4普林斯顿(冯·诺依曼)型计算机和CISC体系结构282
10.5VBC1概述283
10.6VBC1设计原理283
10.7VBC1编程器寄存器模型286
10.8VBC1指令集体系结构287
10.9汇编语言程序的编写格式289
习题290
第11章VBC1的汇编语言编程292
11.1引言292
11.2VBC1指令集292
11.3IN指令293
11.4OUT指令296
11.5MOV指令298
11.6LOADI指令300
11.7ADDI指令301
11.8ADD指令303
11.9SR0指令304
11.10JNZ指令306
11.11VBC1编程实例和技术308
11.11.1无条件跳转308
11.11.2标签308
11.11.3循环计数器309
11.11.4程序“横行”310
11.11.5减法指令310
11.11.6乘法指令312
11.11.7除法指令312
习题312
第12章设计输入/输出电路316
12.1引言316
12.2设计仲裁电路316
12.3设计总线仲裁电路318
12.4设计可加载寄存器电路319
12.5设计输入电路321
12.5.1设计由4个滑动开关驱动的输入
电路323
12.6设计输出电路324
12.6.1设计驱动4个LED的输出电路325
12.6.2设计一个可以驱动7段显示器的输出电路326
12.6.3仔细观察显示0的电路328
12.7结合输入输出电路搭建一个简单I/O
系统329
12.8可选的VHDL设计风格332
习题333
第13章设计指令存储器、加载程序计数器和去抖动电路335
13.1引言335
13.2设计一个指令存储器335
13.2.1指令存储器的代码变形337
13.2.2在启动阶段初始化VBC1的指令
存储器339
13.3设计一个加载程序计数器342
13.4设计一个去抖动单脉冲电路345
13.5设计去抖动单脉冲电路的验证电路348
习题355
第14章设计多路显示系统357
14.1引言357
14.2四个7段LED显示器构成的多路显示
系统357
14.3用VHDL设计多路显示系统360
14.3.1设计模块一: 四选一MUX阵列360
14.3.2设计模块二: 十六进制显示
译码器361
14.3.3设计模块三: 2比特计数器和
分频器362
14.3.4设计模块四: 24线译码器364
14.4用平面设计方法设计多路显示系统364
14.5用层次化设计方法设计多路显示系统367
14.6利用平面设计方法设计一个字符显示
系统372
习题377
第15章设计指令译码器379
15.1引言379
15.2指令译码器设计目标379
15.3指令IN、OUT和MOV的指令译码器
真值表380
15.4设计指令IN的指令译码器382
15.5设计指令OUT和MOV的指令译码器383
15.6指令LOADI的指令译码器真值表384
15.7指令ADDI的指令译码器真值表385
15.8指令ADD的指令译码器真值表386
15.9指令SR0的指令译码器真值表387
15.10设计指令SR0的指令译码器388
15.11指令JNZ的指令译码器真值表389
15.12设计指令JNZ的指令译码器391
15.13设计VBC1的指令译码器393
习题393
第16章设计算术逻辑单元398
16.1引言398
16.2算术逻辑单元的使用398
16.3设计ALU的LOADI指令部分399
16.4设计ALU的ADDI指令部分400
16.5设计ALU的ADD指令部分401
16.6设计ALU的SR0指令部分401
16.7为VBC1设计一个ALU402
16.8用VHDL设计的附加电路403
16.8.1设计额外的ALU电路403
16.8.2设计移位电路406
16.8.3设计桶形移位电路409
16.8.4设计移位寄存器电路412
习题414
第17章完成VBC1的设计416
17.1引言416
17.2设计一个运行程序计数器416
17.3将载入程序计数器与运行程序计数器结合起来419
17.4设计运行频率电路和速度电路421
17.5设计VBC1的指令存储器的载入电路423
习题424
第18章VBC1E的汇编语言编程425
18.1引言425
18.2指令总结425
18.3输入、输出与中断指令427
18.4数据存储指令432
18.5算术指令与逻辑指令434
18.6移位指令与循环移位指令437
18.7跳转指令、相对跳转指令与暂停指令439
18.8关于中断与汇编器命令的更多内容443
18.9VBC1E完整指令集总结448
习题449
第19章设计VBC1E的输入/输出电路458
19.1引言458
19.2VBC1E的输入电路设计458
19.3VBC1E的修改后IN指令的指令译码
真值表460
19.4VBC1E的输出电路设计462
19.5VBC1E的修改后OUT指令的指令译码
真值表464
19.6VBC1E的修改后IN和OUT指令的指令译码器设计4664
19.7VBC1E的LOADI、ADDI和JNZ指令的指令译码器设计467
习题468
第20章设计VBC1E的数据存储器电路471
20.1引言471
20.2设计VBC1E的数据存储器471
20.3设计VBC1E的寄存器和数据选择
电路475
20.4VBC1E的STORE和FETCH指令的指令译码器真值表475
20.5设计VBC1E的STORE和FETCH指令的指令译码器478
20.6设计VBC1E的MOV指令的指令
译码器479
习题480
第21章设计VBC1E的算术、逻辑、移位、旋转和无条件跳转电路482
21.1引言482
21.2VBC1E ALU的算术和逻辑指令部分
设计 482
21.3VBC1E的算术和逻辑指令译码器
设计 484
21.4VBC1E ALU的移位和旋转指令部分
设计 485
21.5VBC1E的移位和旋转指令译码器
设计 486
21.6VBC1E的JMP和JMPR电路设计 488
21.7VBC1E的JMP和JMPR指令译码器
设计489
习题490
第22章设计VBC1E中手动载入时阻止程序执行的电路493
22.1引言493
22.2设计VBC1E中修改手动载入的电路493
22.3修改手动载入时VBC1E中的指令
译码器495
习题495
第23章设计VBC1E的扩展指令存储器496
23.1引言496
23.2为VBC1E修改指令存储器以增加扩展指令存储器496
23.3为VBC1E修改运行程序计数器电路500
23.4为VBC1E修改合理地址电路501
23.5为VBC1E修改加载程序计数器电路501
23.6为VBC1E修改JMPR电路502
习题502
第24章设计VBC1E的软件中断电路504
24.1引言504
24.2设计VBC1E的运行程序计数器与选择电路的改进电路504
24.3设计VBC1E的存储PCPLUS1的电路509
24.4VBC1E的INT和IRET指令的指令译码器真值表510
24.5设计VBC1E的INT和IRET指令的指令译码器511
习题513
第25章完成VBC1E的设计516
25.1引言516
25.2设计VBC1E的去抖动单脉冲触发
中断电路并修改RPC电路516
25.3设计VBC1E的RETA信号的显示
电路521
25.4设计VBC1E的提供指令存储器的
加载器功能的电路525
习题525
附录
附录A实验案例528
实验1A: 门电路的设计与仿真528
实验1B: 完成设计流程534
实验2: 键盘编码系统的设计与测试539
实验3: 门电路检验系统的设计与测试542
实验4: 自定义十进制显示译码系统的设计与
测试546
实验5A: D锁存器与带CLR输入的D触发器的
设计与测试549
实验5B: 8位寄存器与带PRE输入的D触发器
的设计与测试553
实验6A: 简单计数系统的设计与测试——8位单热递增计数器558
实验6B: 简单计数器系统的设计与测试——两位格雷码计数器562
实验6C: 简单非常规计数系统的设计与测试——机器眼电路565
实验6D: 简单非常规计数系统的设计与测试——笑脸电路569
实验7A: 用平面设计方法进行简单错误检测系统的设计与测试572
实验7B: 用层次化设计方法进行简单4位加减系统的设计与测试577
实验8: 利用平面设计方法进行LUT系统的设计与测试580
实验9A: 用平面设计方法进行单热递增/递减计数系统的设计与测试584
实验9B: 用层次化设计方法进行十状态计数系统的设计与测试589
实验10: VBC1系统EASY1(编辑器/汇编器/仿真器)的使用593
实验11: 用EASY1编写和仿真VBC1程序598
实验12: VBC1的设计与测试(数据通路单元)600
实验13: VBC1的设计与测试(指令存储单元)605
实验14: VBC1的设计与测试(显示系统)609
实验15: VBC1的设计与测试(指令译码器)613
实验16: VBC1的设计与测试(算术逻辑单元)617
实验17: VBC1的设计与测试(最终硬件设计)621
实验17L: 设计VBC1的指令存储器加载器626
实验18: 在VBC1上编写并运行汇编程序632
实验19: VBC1E的设计与测试(IN、OUT和未修改的指令)635
实验20: VBC1E的设计与测试(MOV和数据存储器指令)640
实验21: VBC1E的设计与测试(大部分指令)645
实验22: VBC1E的设计与测试(修改后的手动
加载)651
实验23: VBC1E的设计与测试(添加扩展指令
存储器)654
实验24: VBC1E的设计与测试(INT和IRET
指令)658
实验25: VBC1E的设计与测试(最终硬件
设计)663
实验25L: 设计VBC1E的指令存储器加载器668
附录B用VHDL测试平台程序进行仿真675
B.1简介675
B.2例1: 组合逻辑设计(工程AND_3)675
B.3例2: 同步时序逻辑设计(工程DFF)679
附录CFPGA管脚连接关系查询手册683
C.1BASYS 2开发板683
C.2NEXYS 2开发板684
C.3BASYS 2及NEXYS 2开发板上FPGA存储加载器的I/O引脚接口685
C.4FX2MIB(模块转接板): NEXYS 2外加
电路板686
附录DEASY1 教程687
D.1简介687
D.2EASY1用户界面687
D.3EASY1界面布局687
D.4如何使用EASY1689
D.5例1: 简单输入输出程序689
D.6例2: 修改后能够一直执行的输入/输出
程序695
D.7例3: 简单状态机程序696
D.8例4: 复杂状态机程序696
D.9例5: 产生延时698
D.10用EASY1产生VBC1平台的机器码699
附录E将指令加载到存储器中的三种方法701
E.1手动载入存储器701
E.2在启动时初始化存储器内容702
E.3通过存储器加载程序载入存储器703
索引705