国外数字FPGA设计书籍免费分享-FPGA CPLD资料源码分享论坛-FPGA CPLD-ChipDebug

国外数字FPGA设计书籍免费分享

该帖子部分内容已隐藏
付费阅读
已售 1
3积分
此内容为付费阅读,请付费后查看

01 Programming FPGAs Getting Started with Verilog

将获得众多项目的从头到尾的组装和编程说明,包括 LED 解码器、定时器、音调发生器,内存映射视频显示器。本书既是业余爱好者的指南,也是专业开发人员的介绍。

d23c8738d2205037

图1 Programming FPGAs Getting Started with Verilog (Simon Monk)

• 探索数字电子和数字逻辑的基础知识

• 检查 Mojo、Papilio One 和 Elbert 2 板的功能

• 设置您的计算机并深入了解 Verilog 编程

• 使用 ISE 设计套件和用户约束文件

• 了解并应用模块化 Verilog 编程方法

• 通过主板的 GPIO 端口生成电脉冲

• 控制伺服电机并创建自己的声音

• 连接 VGA 电视或计算机显示器并生成视频

目录如下:

Logic . . . . . . . . . . . . . . . .  . . . . . . . . . .1

Logic Gates . . . . . . . . . . . . . . . . . . . . . . . . . . .1

The NOT Gate . . . . . . . . .  . . . . . . . . . . . . . . . . . .2

The AND Gate . . . . . . . . . . . . . . . . . . . . . .3

The OR Gate . . . . . . . . . . . . . . . . . . . . . . . . .3

NAND and NOR Gates . . . . . . . . . . . . . . . . . .4

XOR Gates . . . . . . . . . . . . . . . . . . . . . . . . .5

Binary . . . . . . . . . .  . . . . . . . . . . . . . . . . .6

Adding with Logic . . . . . . . . . . . . . . . . . . . .7

Flip-Flops . . . . . . . .  . . . . . . . . . . . . . . . .9

Set-Reset Flip-Flop . . . . . . . . . . . . . . . . . .9

Shift Registers . . . . . . . . . .. . . . . . . . . . . . .11

Binary Counters . . . . . . . . .12

Summary . . . . . . . .. . . . . . . . . .12

2

FPGAs . . . . . . . . . . . . . .  . . . . . . . . . .13

How an FPGA Works . . . . . . . . . . . . . . . . . .13

The Elbert 2 . . . . . . . . . . . . . .15

The Mojo . . . .  . . . . . . . . . . . . . . .16

The Papilio . . . . . .  . . . . . . . . . . . . .18

Software Setup . . . . . . . . . . . . . . . .20

Installing ISE . . . . . . . . . . . . . . . . . . .20

Installing Elbert Software . . . . . . . .. . . . .22

Installing Mojo Software . . . . . . . . .  . . . . . . .23

Installing Papilio Software . . . . .  . . . . . . .24

Project Files . . . . . . . . . . . . . . .  . . . . . . .24

Summary . . . . . . .  . . . . . . .25

3

Drawing Logic . . . . . . . . . . . . . . . . .27

A Data Selector Example . . . .  . . . . . . . .27

Step 1: Create a New Project . . . . . . . . . . . . . . . .28

Step 2: Create a New Schematic Source . . . . . . . . . . . .31

Step 3: Add the Logic Symbols . . . . . . .  . . . . . . . .33

Step 4: Connect the Gates . . . . . . . .  . . . . .33

Step 5: Add the IO Markers . . . . . . . . . . . . . . . 35

Step 6: Create a User Constraints File . . .  . .36

Step 7: Generate the .bit File . . . . . . . .  . . . .39

Step 8: Program Your Board . . . . . . .  . . . . . .41

Testing the Result . . . . . . . . . . . . . . .41

A 4-Bit Counter Example . . . . . . . .. . . . . .44

Drawing the Schematic . . . . . . . . . . . . . .45

Implementation Constraints Files . . . .. . . . .46

Testing the Counter . . . . . . . . . .. .48

Summary . . . . . . . . . . . . . . .. . . . . . . .48

4

Introducing Verilog . . . . . . . .  . . . . . . .49

Modules . . . . . . . . . . . . . .. . . . . . . .49

Wires, Registers, and Buses . . . . . ..50

Parallel Execution . . . . . . . . . .50

Number Format . . . . . .  . .50

Data Selector in Verilog . . . . . . . .. . . . . .51

A Counter in Verilog . . . . . . .. . . .55

Synchronous Logic . . .. . . . . .58

Summary . . . . . . . . . . .  . . . .58

5

Modular Verilog . . . . . . . . . . . . . . .59

A Seven-Segment Decoder . . .  . . .60

Button Debouncing . . . . . . . . .63

Multiplexed Seven-Segment Display and Counter . .  . .69

Project Structure . . . . . . . . . . . . . .. . .70

Display_7_seg . . . . . . . . . . . . . . . . .72

Counter_7_seg . . . . . . . .  . . . . . . . . .74

User Constraints File . . . . . . . . . . . . . . . . . .77

Importing Source Code for Modules . . .. . . . . . .77

Setting the Top-Level Module . . . . . . . . . . . .78

The Three-Digit Version . . . . . . . .. . . . . .79

Testing . . . . . . . . . . . . . . . . . . . . . . . . . . .79

Summary . . . . . . . . . . . . . . . . . . . . . .79

6

Timer Example . . . . . . . . . . . .. . . . . .81

State Machines . . . . . . . . . . . . . . .81

State Machine Design . . . . . . . . . . . . . . . .83

Hardware . . . . . . . . . . . . . . . . . . . . . . . .84

You Will Need . . . . .  . . . . . . . . . .84

Construction . . . . .  . . . . . . . . . . . . .84

Modules . . . . . . . . .. . . . . . . . . . . . . . .86

User Constraints File . . . . . . . . . . . . . . . . .87

The Timer Module . . . . . . . . . . . . . . . . . .88

Inputs and Outputs . . . . . . . . . .  . . . . . . . . .88

Push Buttons . . . . . . . . . . . . . . . . . . . . . . . . . .88

Alarm Module Instance . . . . . . . . . . . .88

Modeling Time and the Display . . . . . .89

State Machine Implementation . . . . .  . . . . .89

Tasks . . . . . . . . . . . . . . . . . . . . .. . . . . .91

Testing . . . . . . . .  . . . . . . . . . .94

Summary . . . . . . . . .  . . . . . . . . . . . . . .94

7

PWM and Servomotors . . . .  . . . . . . . . . .95

Pulse-Width Modulation . . . . . . . . . . . . . . . . . .95

A PWM Module . . . . . . . . . . . . . . . . . .96

PWM Module Inputs and Outputs . .  . . .96

A Tester of the PWM Module . . . . . . . . . .97

Trying It Out . . . . . . . .99

Servomotors . . . . . . . . . . 100

Hardware . . . . . . . . . . . . . . . . . . . 101

You Will Need . . . . . . . . . . . . 101

Construction . . . . . . . . . . . . . . . 101

A Servo Module . . . . . . . . 104

Summary . . . . . . .  . . . . . . . . 107

8

Audio . . . . . . . . . . . . . . . . . . 109

Simple Tone Generation . . . . . . .. . . . . 109

Audio Output from the Mojo . . .. . . . . . 110

A General-Purpose Tone/Frequency Generator . . . . . . 111

The Tone Module . . . . . . . . .. . . . . . . . . 112

The tone_tester Module . . . . .. . . . . . . . . . . 113

Testing . . . . . . . . . . . . . . . . . .  . . . . . . . . 114

Playing an Audio File . . . . . . . . . . . . . . . . 114

Audio Files . . . . . .. . . . . . . . . . . . . . . . . . . 116

RAM . . . . . . .  . . . . . . . . . . . . . . . . 117

The wav_player Module . . . . . .. . . . . . . . . . . . 118

Testing . . . . . . . . . . . . . . . . . . 120

Preparing Your Own Sounds . . . . .. . . . . 121

Summary . . . . . . . . . . . . . . . . . . . . . . . 123

9

Video . . . . . . . .  . . . . . 125

VGA . . . . . . . . . . . . . . . . . . . . . . . 125

VGA Timings . . . . . . . . . . . . . . . . . . . . 128

Drawing Rectangles . . . . .  . . . . . . . . . 129

A VGA Module . . . . . . . . .  . . . . . . 130

VGA and the Elbert 2 . . . . . . . . .  . . . . . . . 133

Making Things Move . . . . . . . . . . . . . . . 134

A Memory-Mapped Display . . . . . . . . . . 136

Preparing an Image . . . . .  . . . . . . . . 138

Summary . . . . . . . . . . . . . . . . . . . . . . . . 139

10

What Next . . . . . . .. . . . . . . . . . 141

Simulation . . . . . . . . . .. . . . . . . . . 141

Under the Hood . . . .142

Cores and Soft Processors . . .. . . . . . . . . . . . . 143

More on the Papilio . . . . . . . . .  . . . . . . . . . 144

More on the Mojo . . . . . . . . . . . . . . . . . . . . . . 146

Summary . . . . . . . . . . . . . . . . . . . . 146

A

Resources . . . . . . . . . . 149

Buying FPGA Boards . . . . . . . . . . . . . 149

Components . . . . . . . . . .. . . . . . . . . . . . . . . . . . 149

Other FPGA Boards . . . . . . .. . . . . . . . . . . 150

Web Resources . . . . . . . . . . . . . . . . . . . . . 151

B

Elbert 2 Reference . . . . .  . . . . . 153

ISE New Project Settings . . . . . . . . . . . . . . . 153

Prototype Net Mapping . . . . . . . . . . . . . . 153

LEDs . . . . . . . . . . . . . . . . . . . 153

Three-Digit Display . . . . . . . . . . . . . . 154

DIP Slide Switches . . . . . . . . . . . . . 155

Push Switches . . . . . . .. . . . . . . . . . . . . . . . 155

VGA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

Audio and Micro-SD . . . .  . . . . . . . . 157

GPIO Pins . . . . . . . . . . . .. . . . . . . . . . . . . 158

Header P1 . . . . . . . . . . . . . . . . . . . . . 158

Header P6 . . . . . . . . . .  . . . . . . . . . . . . 158

Header P2 . . . . . . . . . . . .  . . 159

Header P4 . . . . . . . . .. . . . . . . 159

Clock . . . . . . . . . . . . .. . 159

C

Mojo Reference . . . . . .  . . . . . 161

ISE New Project Settings . . . . . . . . . . 161

NET Mapping (IO Shield) . . . . . .. . . . 161

LEDs . . . . . . . . . . . . .. . . . . . . . 161

Four-Digit Display . . . . . . . . . . . . . . . . . . 162

Slide Switches . . . . . . . . . . . . . . 164

Push Buttons . . . . . . . . .  . . . 165

Clock Pin . . . . . . . . 165

Complete UCF for IO Shield . .  . . 165

D

Papilio One Reference . .  . . . . . . . . . . 167

ISE New Project Settings . . . . . . . . . . . . . . . 167

LogicStart MegaWing NET Mapping . . .. . . . 167

LEDs . . . . . . . . . . .  . . . . . . . 168

Four-Digit Display . . . . . . . . . . . 168

DIP Slide Switches . . . . . . . . . . . . . 169

Joystick Switches . . . . . . . . . . . . . . . 169

VGA . . . . . . . . . . . . . . . . . .. . . . 170

Audio . . .  . . . . . . . . . . . . . . 171

Analog-to-Digital Converter . . .  . . . . . . . 171

Clock Pin . . . .  . . . . . . . . . . . . . . . 172

GPIO Pins . . . . . . . . . . . . . . 172

FPGAs Fundamentals, advanced features, and applications in industrial electronics

02 FPGAs Fundamentals, advanced features, and applications in industrial electronics

本书为工程师以及更普遍的具有工业电子经验的读者提供对FPGA相关基础知识和最新趋势的良好理解。这项任务并不容易,因为自 30 年前创建以来,FPGA 一直处于数字电子领域的创新前沿,因此它们在不断发展。

zynq、Cylone V等SOC的出现更能证实这一点,一项深刻的技术变革影响了FPGA的世界,将它们从众所周知的常规FPGA结构转变为现场可编程的芯片系统上的系统,除了标准FPGA结构外,还包括多处理器内核及其生态系统。

因此,本书将能够更好地理解为什么这些设备可以满足下一代工业控制系统复杂性方面即将到来的挑战。在当今的 FPGA 中,人们可以同时对功能强大的处理器内核进行编程,并在 FPGA 结构中设计特定于应用的硬件加速器。

f784087221205127

图2 FPGAs Fundamentals, advanced features, and applications in industrial electronics

首先,本书简要介绍市场上的主要数字解决方案,并解释了为什么FPGA对工业电子应用感兴趣。然后,在接下来的四章中,详细描述了当今FPGA中的所有组成(FPGA结构,软硬微处理器内核,数字信号处理器单元以及模拟接口和传感器)。

接下来是重要的一章,解释了在FPGA上实现新应用时应遵循的设计过程。同样,作者将基于寄存器传输级综合和硬件描述语言验证的标准设计方法与新的SOPC开发链和高级综合方法区分开来。

接下来是关于FPGA提供的动态重新配置可能性的有趣章节,这些可能性在工业控制系统中仍未得到充分开发。

最后,简要回顾了基于FPGA的电力系统控制器、机器人、实时仿真和电子仪器仪表的最新研究工作,目录如下:

1. FPGAs and Their Role in the Design of Electronic Systems…1

1.1 Introduction …1

1.2 Embedded Control Systems: A Wide Concept …2

1.3 Implementation Options for Embedded Systems …4

1.3.1 Technological Improvements and Complexity Growth…4

1.3.2 Toward Energy-Efficient Improved Computing

Performance…6

1.3.3 A Battle for the Target Technology?..7

1.3.4 Design Techniques and Tools for the Different

Technologies …8

1.3.4.1 General-Purpose Processors and

Microcontrollers …9

1.3.4.2 DSP Processors … 10

1.3.4.3 Multicore Processors and GPGPUs … 11

1.3.4.4 FPGAs …12

1.3.4.5 ASICs…12

1.4 How Does Configurable Logic Work?.. 13

1.5 Applications and Uses of FPGAs… 18

References … 19

2. Main Architectures and Hardware Resources of FPGAs … 21

2.1 Introduction … 21

2.2 Main FPGA Architectures …22

2.3 Basic Hardware Resources …25

2.3.1 Logic Blocks …25

2.3.2 I/O Blocks …29

2.3.2.1 SerDes Blocks… 31

2.3.2.2 FIFO Memories … 32

2.3.3 Interconnection Resources … 32

2.4 Specialized Hardware Blocks …34

2.4.1 Clock Management Blocks …34

2.4.2 Memory Blocks… 41

2.4.3 Hard Memory Controllers…45

2.4.4 Transceivers …47

2.4.4.1 PCIe Blocks… 51

2.4.5 Serial Communication Interfaces …53

References …56

3. Embedded Processors in FPGA Architectures…59

3.1 Introduction …59

3.1.1 Multicore Processors … 61

3.1.1.1 Main Hardware Issues … 61

3.1.1.2 Main Software Issues…64

3.1.2 Many-Core Processors …66

3.1.3 FPSoCs…66

3.2 Soft Processors… 67

3.2.1 Proprietary Cores…69

3.2.2 Open-Source Cores… 76

3.3 Hard Processors …78

3.4 Other “Configurable” SoC Solutions …85

3.4.1 Sensor Hubs…85

3.4.2 Customizable Processors …90

3.5 On-Chip Buses… 91

3.5.1 AMBA…92

3.5.1.1 AHB…92

3.5.1.2 Multilayer AHB …94

3.5.1.3 AXI…95

3.5.2 Avalon… 100

3.5.3 CoreConnect… 108

3.5.4 WishBone … 109

References … 111

4. Advanced Signal Processing Resources in FPGAs … 115

4.1 Introduction … 115

4.2 Embedded Multipliers… 117

4.3 DSP Blocks … 118

4.4 Floating-Point Hardware Operators… 121

References …125

5. Mixed-Signal FPGAs … 127

5.1 Introduction … 127

5.2 ADC Blocks … 128

5.3 Analog Sensors… 133

5.4 Analog Data Acquisition and Processing Interfaces … 134

5.5 Hybrid FPGA–FPAA Solutions … 138

References … 142

6. Tools and Methodologies for FPGA-Based Design… 143

6.1 Introduction … 143

6.2 Basic Design Flow Based on RTL Synthesis and

Implementation Tools… 145

6.2.1 Design Entry… 147

6.2.2 Simulation Tools… 149

6.2.2.1 Interactive Simulation… 152

6.2.2.2 Mixed-Mode Simulation … 152

6.2.2.3 HIL Verification … 152

6.2.3 RTL Synthesis and Back-End Tools … 153

6.2.3.1 RTL Synthesis … 153

6.2.3.2 Translation… 156

6.2.3.3 Placement and Routing … 156

6.2.3.4 Bitstream Generation… 158

6.3 Design of SoPC Systems… 160

6.3.1 Hardware Design Tools for SoPCs … 160

6.3.2 Software Design Tools for SoPCs … 164

6.3.3 Core Libraries and Core Generation Tools… 167

6.4 HLS Tools … 169

6.5 Design of HPC Multithread Accelerators… 171

6.6 Debugging and Other Auxiliary Tools… 173

6.6.1 Hardware/Software Debugging for SoPC Systems… 173

6.6.1.1 Software Debugging… 174

6.6.1.2 Hardware Debugging… 175

6.6.1.3 Hardware/Software Co-Debugging … 177

6.6.2 Auxiliary Tools… 177

6.6.2.1 Pin Planning Tools … 177

6.6.2.2 FPGA Selection Advisory Tools … 178

6.6.2.3 Power Estimation Tools … 178

References … 179

7. Off-Chip and In-Chip Communications for FPGA Systems … 181

7.1 Introduction … 181

7.2 Off-Chip Communications … 182

7.2.1 Low-Speed Interfaces … 182

7.2.2 High-Speed Interfaces… 183

7.3 In-Chip Communications … 185

7.3.1 Point-to-Point Connections… 185

7.3.2 Bus-Based Connections… 186

7.3.3 Networks on Chip… 192

References … 195

8. Building Reconfigurable Systems Using Commercial FPGAs … 197

8.1 Introduction … 197

8.2 Main Reconfiguration-Related Concepts… 198

8.2.1 Reconfigurable Architectures … 201

8.3 FPGAs as Reconfigurable Elements … 202

8.3.1 Commercial FPGAs with Reconfiguration Support…203

8.3.2 Setting Up an Architecture for Partial Reconfiguration… 204

8.3.3 Scalable Architectures…206

8.3.4 Tool Support for Partial Reconfiguration…208

8.3.5 On-Chip Communications for Reconfigurable

System Support … 210

8.4 RTR Support… 211

8.4.1 Self-Managing Systems… 213

8.4.2 Adaptive Multithread Execution with

Reconfigurable Hardware Accelerators… 216

8.4.3 Evolvable Hardware … 219

References …227

9. Industrial Electronics Applications of FPGAs …229

9.1 Introduction …229

9.2 FPGA Application Domains in Industrial Electronics … 231

9.2.1 Digital Real-Time Simulation of Power Systems … 231

9.2.2 Advanced Control Techniques… 232

9.2.2.1 Power Systems … 232

9.2.2.2 Robotics and Automotive Electronics …233

9.2.2.3 Use of Floating-Point Operations…233

9.2.3 Electronic Instrumentation…234

9.3 Conclusion…234

References …235

Index … 241

Programming FPGAs Getting Started with Verilog (Simon Monk)

03 Principles and Structures of FPGAs

这本关于现场可编程门阵列(FPGA)的综合教科书,涵盖了其历史、基础知识、架构、器件技术、计算机辅助设计技术、设计工具、应用示例和未来趋势。以FPGA为代表的可编程逻辑器件近年来发展迅速,成为大多数IT产品使用的关键电子设备。

7d4a128b09205107

图3 Principles and Structures of FPGAs

与通常的集成电路不同,FPGA具有独特的结构、设计方法和应用技术。该器件允许用户编程,可以大大降低先进半导体芯片不断上升的开发成本。FPGA 现在正在推动最先进的半导体工艺,是一个结合了存储器、CPU 和各种外设接口的一体化平台,部分目录如下:

1 Basic Knowledge to Understand FPGAs … 1
Toshinori Sueyoshi
2 What Is an FPGA? … 23
Masahiro Iida
3 FPGA Structure … 47
Motoki Amagasaki and Yuichiro Shibata
4 Design Flow and Design Tools … 87
Tomonori Izumi and Yukio Mitsuyama
5 Design Methodology … 117
Masahiro Iida
6 Hardware Algorithms … 137
Kentaro Sano and Hiroki Nakahara
7 Programmable Logic Devices (PLDs) in Practical
Applications … 179
Tsutomu Maruyama, Yoshiki Yamaguchi and Yasunori Osana
8 Advanced Devices and Architectures … 207
Masato Motomura, Masanori Hariyama and Minoru Watanab

Principles and Structures of FPGAs

请登录后发表评论