案例中设计的消抖有一个缺陷,当开关转换状态的时候会有一个反应延迟的问题。替代方 案要实现在转换的第一个边沿即作出反应,在等待一个很小的时间段后(至少 20ms)和输 入信号进行计算。替换方案要求当由 输入信号由 0 0 变为 1 1 时 时,有限状态机立即作出反应并根据 20ms 时间内的输入消除抖动,在这个过程之后系统开始检查输入信号的下降沿。根据案例 中的设计步骤设计一个替代方案。 1. 根据电路画出状态图和 ASM 图。 2. 写出 HDL 代码。 3. 依据状态图和 ASM 图写出 HDL 代码。 4. 写出 testbench 并对代码仿真验证。 5. 将代替方案替换原来的消抖电路并验证。
2021-12-18 17:41:24 143KB FPGA Verilog HDL
1
verilog hdl程序设计实例详解+书中详细代码,难得的资源。
2021-12-16 14:48:23 43.13MB verilog +实例+详解
1
2007年五星书 英文版 Digital Design (Verilog): An Embedded Systems Approach Using Verilog Product Description Digital Design: An Embedded Systems Approach Using Verilog provides a foundation in digital design for students in computer engineering, electrical engineering and computer science courses. It takes an up-to-date and modern approach of presenting digital logic design as an activity in a larger systems design context. Rather than focus on aspects of digital design that have little relevance in a realistic design context, this book concentrates on modern and evolving knowledge and design skills. Hardware description language (HDL)-based design and verification is emphasized--Verilog examples are used extensively throughout. By treating digital logic as part of embedded systems design, this book provides an understanding of the hardware needed in the analysis and design of systems comprising both hardware and software components. Includes a Web site with links to vendor tools, labs and tutorials. Presents digital logic design as an activity in a larger systems design context. Features extensive use of Verilog examples to demonstrate HDL usage at the abstract behavioural level and register transfer level, as well as for low-level verification and verification environments. Includes worked examples throughout to enhance the reader's understanding and retention of the material. Companion Web site includes links to CAD tools for FPGA design from Synplicity, Mentor Graphics, and Xilinx, Verilog source code for all the examples in the book, lecture slides, laboratory projects, and solutions to exercises. Paperback: 584 pages Publisher: Morgan Kaufmann (September 14, 2007) Language: English ISBN-10: 0123695279 ISBN-13: 978-0123695277 contents c h a p t e r 1 Introduction and Methodology . . . . . . . . . . . 1 1.1 Digital Systems and Embedded Systems . . . . . . . . . . . . . . . . . 1 1.2 Binary Representation and Circuit Elements . . . . . . . . . . . . . 4 1.3 Real-World Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.3.1 Integrated Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.3.2 Logic Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.3.3 Static Load Levels . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.3.4 Capacitive Load and Propagation Delay . . . . . . . . . 15 1.3.5 Wire Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.3.6 Sequential Timing . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.3.7 Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.3.8 Area and Packaging . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.4 Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.5 Design Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 1.5.1 Embedded Systems Design . . . . . . . . . . . . . . . . . . . 31 1.6 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 1.7 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 c h a p t e r 2 Combinational Basics . . . . . . . . . . . . . . . . . . 39 2.1 Boolean Functions and Boolean Algebra . . . . . . . . . . . . . . . . 39 2.1.1 Boolean Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2.1.2 Boolean Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 2.1.3 Verilog Models of Boolean Equations . . . . . . . . . . . 51 2.2 Binary Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 2.2.1 Using Vectors for Binary Codes . . . . . . . . . . . . . . . . 56 2.2.2 Bit Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 2.3 Combinational Components and Circuits . . . . . . . . . . . . . . . 62 2.3.1 Decoders and Encoders . . . . . . . . . . . . . . . . . . . . . . 62 2.3.2 Multiplexers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 2.3.3 Active-Low Logic . . . . . . . . . . . . . . . . . . . . . . . . . . 71 2.4 Verification of Combinational Circuits . . . . . . . . . . . . . . . . . . 74 2.5 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 2.6 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 c h a p t e r 3 Numeric Basics . . . . . . . . . . . . . . . . . . . . . . . 87 3.1 Unsigned Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 3.1.1 Coding Unsigned Integers . . . . . . . . . . . . . . . . . . . . 87 3.1.2 Operations on Unsigned Integers . . . . . . . . . . . . . . 92 3.1.3 Gray Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 3.2 Signed Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 3.2.1 Coding Signed Integers . . . . . . . . . . . . . . . . . . . . . . 119 3.2.2 Operations on Signed Integers . . . . . . . . . . . . . . . . . 122 3.3 Fixed-Point Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 3.3.1 Coding Fixed-Point Numbers . . . . . . . . . . . . . . . . . 131 3.3.2 Operations on Fixed-Point Numbers . . . . . . . . . . . . 136 3.4 Floating-Point Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 3.4.1 Coding Floating-Point Numbers . . . . . . . . . . . . . . . 138 3.5 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 3.6 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 c h a p t e r 4 Sequential Basics . . . . . . . . . . . . . . . . . . . . . . 151 4.1 Storage Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 4.1.1 Flip-flops and Registers . . . . . . . . . . . . . . . . . . . . . . 151 4.1.2 Shift Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 4.1.3 Latches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 4.2 Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 4.3 Sequential Datapaths and Control . . . . . . . . . . . . . . . . . . . . . 175 4.3.1 Finite-State Machines . . . . . . . . . . . . . . . . . . . . . . . 179 4.4 Clocked Synchronous Timing Methodology . . . . . . . . . . . . . . 187 4.4.1 Asynchronous Inputs . . . . . . . . . . . . . . . . . . . . . . . . 192 4.4.2 Verification of Sequential Circuits . . . . . . . . . . . . . . 196 4.4.3 Asynchronous Timing Methodologies . . . . . . . . . . . 200 4.5 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 4.6 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 c h a p t e r 5 Memories . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 5.1 General Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 5.2 Memory Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 5.2.1 Asynchronous Static RAM . . . . . . . . . . . . . . . . . . . 220 5.2.2 Synchronous Static RAM . . . . . . . . . . . . . . . . . . . . . 222 5.2.3 Multiport Memories . . . . . . . . . . . . . . . . . . . . . . . . 229 5.2.4 Dynamic RAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 5.2.5 Read-Only Memories . . . . . . . . . . . . . . . . . . . . . . . 235 5.3 Error Detection and Correction . . . . . . . . . . . . . . . . . . . . . . . 240 5.4 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 5.5 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 c h a p t e r 6 Implementation Fabrics . . . . . . . . . . . . . . . . . 249 6.1 Integrated Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 6.1.1 Integrated Circuit Manufacture . . . . . . . . . . . . . . . . 250 6.1.2 SSI and MSI Logic Families . . . . . . . . . . . . . . . . . . . 252 6.1.3 Application-Specific Integrated Circuits (ASICs) . . . 255 6.2 Programmable Logic Devices . . . . . . . . . . . . . . . . . . . . . . . . . 258 6.2.1 Programmable Array Logic . . . . . . . . . . . . . . . . . . . 258 6.2.2 Complex PLDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 6.2.3 Field-Programmable Gate Arrays . . . . . . . . . . . . . . 263 6.3 Packaging and Circuit Boards . . . . . . . . . . . . . . . . . . . . . . . . 269 6.4 Interconnection and Signal Integrity . . . . . . . . . . . . . . . . . . . . 272 6.4.1 Differential Signaling . . . . . . . . . . . . . . . . . . . . . . . . 276 6.5 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 6.6 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 c h a p t e r 7 Processor Basics . . . . . . . . . . . . . . . . . . . . . . 281 7.1 Embedded Computer Organization . . . . . . . . . . . . . . . . . . . . 281 7.1.1 Microcontrollers and Processor Cores . . . . . . . . . . . 283 7.2 Instructions and Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 7.2.1 The Gumnut Instruction Set . . . . . . . . . . . . . . . . . . 287 7.2.2 The Gumnut Assembler . . . . . . . . . . . . . . . . . . . . . . 296 7.2.3 Instruction Encoding . . . . . . . . . . . . . . . . . . . . . . . . 298 7.2.4 Other CPU Instruction Sets . . . . . . . . . . . . . . . . . . . 300 7.3 Interfacing with Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 7.3.1 Cache Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 7.4 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 7.5 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 c h a p t e r 8 I/O Interfacing . . . . . . . . . . . . . . . . . . . . . . . 315 8.1 I/O Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 8.1.1 Input Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 8.1.2 Output Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 8.2 I/O Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 8.2.1 Simple I/O Controllers . . . . . . . . . . . . . . . . . . . . . . 331 8.2.2 Autonomous I/O Controllers . . . . . . . . . . . . . . . . . 335 8.3 Parallel Buses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 8.3.1 Multiplexed Buses . . . . . . . . . . . . . . . . . . . . . . . . . . 338 8.3.2 Tristate Buses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 8.3.3 Open-Drain Buses . . . . . . . . . . . . . . . . . . . . . . . . . . 348 8.3.4 Bus Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 8.4 Serial Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 8.4.1 Serial Transmission Techniques . . . . . . . . . . . . . . . . 353 8.4.2 Serial Interface Standards . . . . . . . . . . . . . . . . . . . . 357 8.5 I/O Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 8.5.1 Polling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 8.5.2 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 8.5.3 Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 8.6 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 8.7 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 c h a p t e r 9 Accelerators . . . . . . . . . . . . . . . . . . . . . . . . . 379 9.1 General Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 9.2 Case Study: Video Edge-Detection . . . . . . . . . . . . . . . . . . . . . 386 9.3 Verifying an Accelerator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 9.4 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 9.5 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 c h a p t e r 1 0 Design Methodology . . . . . . . . . . . . . . . . . . 423 10.1 Design Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 10.1.1 Architecture Exploration . . . . . . . . . . . . . . . . . . . . . 425 10.1.2 Functional Design . . . . . . . . . . . . . . . . . . . . . . . . . . 427 10.1.3 Functional Verification . . . . . . . . . . . . . . . . . . . . . . 429 10.1.4 Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 10.1.5 Physical Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 10.2 Design Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 10.2.1 Area Optimization . . . . . . . . . . . . . . . . . . . . . . . . . 442 10.2.2 Timing Optimization . . . . . . . . . . . . . . . . . . . . . . . . 443 10.2.3 Power Optimization . . . . . . . . . . . . . . . . . . . . . . . . 448 10.3 Design for Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 10.3.1 Fault Models and Fault Simulation . . . . . . . . . . . . . 452 10.3.2 Scan Design and Boundary Scan . . . . . . . . . . . . . . . 454 10.3.3 Built-In Self Test (BIST) . . . . . . . . . . . . . . . . . . . . . 458 10.4 Nontechnical Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 10.5 In Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 10.6 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 10.7 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
2021-12-16 13:32:38 2.05MB Digital Design (Verilog) HDL
1
提出了一种基于FPGA并利用Verilog HDL实现的CMI编码设计方法。研究了CMI码型的编码特点,提出了利用Altera公司CycloneⅡ系列EP2C5Q型号FPGA完成CMI编码功能的方案。在系统程序设计中,首先产生m序列,然后程序再对m序列进行CMI码型变换。在CMI码型变换过程中,采用专用寄存器对1码的状态进行了存储,同时利用m序列的二倍频为CMI编码进程提供时钟激励,最后输出CMI码型。实验结果表明,采用FPGA完成CMI编码的设计,编码结果完全正确,能够达到预期要求。利用这种方法实现CMI编码功能,具有效率高、可扩展性强、升级方便等特点,方便嵌入到大规模设计中,具有广泛的应用前景。
2021-12-15 22:04:27 1.17MB FPGA Verilog HDL
1
华为内部verilog系列文档,包括 verilog 语法,代码规范,fpga 开发流程,以及 代码风格
2021-12-15 19:18:35 2.16MB verilog
1
里面有夏宇闻老师的课件ppt,及语法详解和应用
2021-12-15 16:08:10 1.24MB verilog hdl语言
1
IEEE发布的verilog HDL标准,verilog HDL的权威参考
2021-12-14 21:26:07 3.22MB IEEE verilog HDL
1
假设停车场只有一个入口和一个出口,利用两对光电传感器检测车辆的进出情况,如图所示。 当有车辆处在接收器与发射器中间时,红外光线被遮挡,相应的输出置为有效即置 1。通过 检查光电传感器可以确定是否有车辆进出活动或者只是行人穿过。例如,车辆进入会发生如 下事件: 1.最开始两个传感器都未被遮挡(ab 值为”00”) 2.传感器 a 被遮挡(ab 值为”10”) 3.两个传感器都被遮挡(ab 值为”11”) 4.传感器 a 未被遮挡(ab 值为”01”) 5.两个传感器都未被遮挡(ab 值为”00”) 因此,可以按一下步骤设计一个停车场计时器: 1.设计一个带有输 2 输入(a、b)、2 输出(enter、exit)的有限状态机。当车辆进入、开出停车 场时,分别将 enter、exit 置一个周期的有效电平。 2.根据有限状态机写出 HDL 代码。 3.设计一个带有两个控制信号(inc、dec)的计数器,当信号有效时加 1 或减 1。写出 HDL 代码 结合计数器、有限状态机和 LED 复用显示电路,用两个带去抖电路的按键代替光电传感器的输入
2021-12-13 17:15:36 192KB FPGA Verilog HDL
1
Verilog HDL数字设计与综合 夏宇闻译(第二版).rar Verilog HDL数字设计与综合 夏宇闻译(第二版).rar
2021-12-12 16:24:32 91KB Verilog HDL数字设计与综合
1
基于verilog hdl 语言的出租车计费,在veek-dec实验箱上实现计费,直流电机模拟车速
2021-12-12 15:07:07 6KB verilog hdl 出租车计费
1