没有合适的资源?快使用搜索试试~ 我知道了~
首页2005年Verilog硬件描述语言IEEE标准详解
2005年Verilog硬件描述语言IEEE标准详解
5星 · 超过95%的资源 需积分: 50 45 下载量 181 浏览量
更新于2024-07-19
收藏 6.18MB PDF 举报
IEEE Standard for Verilog 2005 是一个由设计自动化标准委员会支持的 IEEE 标准,正式名称为 "IEEE Std 1364-2005 (Revision of IEEE Std 1364-2001)",它定义了 Verilog®硬件描述语言。该标准是在 2006 年 4 月 7 日发布的,旨在为电子工程师提供一套高级且功能强大的硬件描述语言,用于系统级、逻辑综合、验证以及电路设计和仿真。
Verilog 是 Cadence Design Systems 公司拥有的注册商标,它在 2005 年的这个修订版中进一步完善和扩展了先前的规范,如 IEEE Std 1364-2001,以适应不断发展的集成电路设计需求。这个标准对于电子设计自动化(EDA)行业至关重要,因为它提供了一种标准化的方式来描述和设计复杂的数字和混合信号系统。
在 IEEE Std 1364-2005 中,涵盖了以下几个关键知识点:
1. **语言特性**:该标准详细定义了 Verilog 的语法、数据类型、结构化编程元素(如任务、函数、模块、包和接口等)、并行处理以及条件语句和循环控制。
2. **行为模型**:用户可以使用组合逻辑(combining logic)和时序逻辑(sequential logic)来描述硬件行为,包括事件驱动和数据驱动的设计模式。
3. **仿真与验证**:标准定义了如何编写测试bench,以及如何使用仿真器进行功能和时序验证,包括覆盖率分析和断言(assertions)的使用。
4. **硬件描述层次**:从顶层的系统级描述到底层的门级描述,都提供了明确的指导,允许设计师在不同抽象级别上工作。
5. **接口和模块化**:标准支持模块间的连接和交互,包括参数化、门级网表输入/输出以及复用设计组件。
6. **兼容性和互操作性**:尽管是修订版,但 IEEE Std 1364-2005 还考虑了向前兼容性,确保新版本的 Verilog 设计能够在旧版工具中正确编译和仿真。
7. **文档和版权信息**:出版物包含详细的版权和使用限制,强调了对知识产权的尊重,同时也提供了印刷版和PDF格式的ISBN编号供用户获取。
IEEE Standard for Verilog 2005 是电子设计工程师必备的参考文献,它为硬件描述语言的开发、实现和验证提供了清晰的规范,促进了整个电子行业的发展和协作。学习和遵循这个标准对于确保设计的准确性和一致性至关重要。
xiv Copyright © 2006 IEEE. All rights reserved.
17.7.3 $realtime ...................................................................................................................... 310
17.8 Conversion functions ................................................................................................................. 310
17.9 Probabilistic distribution functions............................................................................................ 311
17.9.1 $random function......................................................................................................... 311
17.9.2 $dist_ functions............................................................................................................ 312
17.9.3 Algorithm for probabilistic distribution functions....................................................... 313
17.10 Command line input................................................................................................................... 320
17.10.1 $test$plusargs (string)..................................................................................................320
17.10.2 $value$plusargs (user_string, variable) ....................................................................... 321
17.11 Math functions ........................................................................................................................... 323
17.11.1 Integer math functions ................................................................................................. 323
17.11.2 Real math functions ..................................................................................................... 323
18. Value change dump (VCD) files ......................................................................................................... 325
18.1 Creating four-state VCD file...................................................................................................... 325
18.1.1 Specifying name of dump file ($dumpfile).................................................................. 325
18.1.2 Specifying variables to be dumped ($dumpvars) ........................................................ 326
18.1.3 Stopping and resuming the dump ($dumpoff/$dumpon)............................................. 327
18.1.4 Generating a checkpoint ($dumpall)............................................................................ 328
18.1.5 Limiting size of dump file ($dumplimit) ..................................................................... 328
18.1.6 Reading dump file during simulation ($dumpflush).................................................... 328
18.2 Format of four-state VCD file ................................................................................................... 329
18.2.1 Syntax of four-state VCD file...................................................................................... 330
18.2.2 Formats of variable values........................................................................................... 331
18.2.3 Description of keyword commands ............................................................................. 332
18.2.4 Four-state VCD file format example ........................................................................... 337
18.3 Creating extended VCD file ...................................................................................................... 338
18.3.1 Specifying dump file name and ports to be dumped ($dumpports)............................. 338
18.3.2 Stopping and resuming the dump ($dumpportsoff/$dumpportson)............................. 339
18.3.3 Generating a checkpoint ($dumpportsall).................................................................... 340
18.3.4 Limiting size of dump file ($dumpportslimit) ............................................................. 340
18.3.5 Reading dump file during simulation ($dumpportsflush)............................................ 341
18.3.6 Description of keyword commands ............................................................................. 341
18.3.7 General rules for extended VCD system tasks ............................................................ 341
18.4 Format of extended VCD file .................................................................................................... 342
18.4.1 Syntax of extended VCD file....................................................................................... 342
18.4.2 Extended VCD node information ................................................................................ 344
18.4.3 Value changes .............................................................................................................. 346
18.4.4 Extended VCD file format example ............................................................................ 347
19. Compiler directives.............................................................................................................................. 349
19.1 `celldefine and `endcelldefine.................................................................................................... 349
19.2 `default_nettype ......................................................................................................................... 349
19.3 `define and `undef...................................................................................................................... 350
19.3.1 `define .......................................................................................................................... 350
19.3.2 `undef ........................................................................................................................... 352
19.4 `ifdef, `else, `elsif, `endif, `ifndef .............................................................................................. 352
19.5 `include ...................................................................................................................................... 356
19.6 `resetall....................................................................................................................................... 356
19.7 `line ............................................................................................................................................ 357
19.8 `timescale ................................................................................................................................... 358
19.9 `unconnected_drive and `nounconnected_drive ........................................................................ 360
19.10 `pragma ...................................................................................................................................... 360
19.10.1 Standard pragmas.........................................................................................................361
Authorized licensed use limited to: University of Florida. Downloaded on March 15,2013 at 14:57:42 UTC from IEEE Xplore. Restrictions apply.
Copyright © 2006 IEEE. All rights reserved. xv
19.11 `begin_keywords, `end_keywords.............................................................................................361
20. Programming language interface (PLI) overview ............................................................................... 366
20.1 PLI purpose and history............................................................................................................. 366
20.2 User-defined system task/function names ................................................................................. 367
20.3 User-defined system task/function types ................................................................................... 367
20.4 Overriding built-in system task/function names ........................................................................ 367
20.5 User-supplied PLI applications.................................................................................................. 367
20.6 PLI mechanism .......................................................................................................................... 368
20.7 User-defined system task/function arguments ........................................................................... 368
20.8 PLI include files......................................................................................................................... 368
21. PLI TF and ACC interface mechanism (deprecated)........................................................................... 369
22. Using ACC routines (deprecated)........................................................................................................ 370
23. ACC routine definitions (deprecated).................................................................................................. 371
24. Using TF routines (deprecated) ........................................................................................................... 372
25. TF routine definitions (deprecated) ..................................................................................................... 373
26. Using Verilog procedural interface (VPI) routines.............................................................................. 374
26.1 VPI system tasks and functions ................................................................................................. 374
26.1.1 sizetf VPI application routine ...................................................................................... 374
26.1.2 compiletf VPI application routine................................................................................ 374
26.1.3 calltf VPI application routine....................................................................................... 375
26.1.4 Arguments to sizetf, compiletf, and calltf application routines................................... 375
26.2 VPI mechanism.......................................................................................................................... 375
26.2.1 VPI callbacks ............................................................................................................... 375
26.2.2 VPI access to Verilog HDL objects and simulation objects........................................ 376
26.2.3 Error handling .............................................................................................................. 376
26.2.4 Function availability .................................................................................................... 376
26.2.5 Traversing expressions ................................................................................................ 377
26.3 VPI object classifications........................................................................................................... 377
26.3.1 Accessing object relationships and properties ............................................................. 378
26.3.2 Object type properties.................................................................................................. 379
26.3.3 Object file and line properties...................................................................................... 380
26.3.4 Delays and values ........................................................................................................ 380
26.3.5 Object protection properties......................................................................................... 381
26.4 List of VPI routines by functional category............................................................................... 381
26.5 Key to data model diagrams ...................................................................................................... 383
26.5.1 Diagram key for objects and classes ........................................................................... 384
26.5.2 Diagram key for accessing properties.......................................................................... 384
26.5.3 Diagram key for traversing relationships .................................................................... 385
26.6 Object data model diagrams ...................................................................................................... 386
26.6.1 Module ......................................................................................................................... 387
26.6.2 Instance arrays ............................................................................................................. 388
26.6.3 Scope............................................................................................................................ 389
26.6.4 IO declaration .............................................................................................................. 389
26.6.5 Ports ............................................................................................................................. 390
26.6.6 Nets and net arrays.......................................................................................................391
26.6.7 Regs and reg arrays...................................................................................................... 393
26.6.8 Variables ...................................................................................................................... 395
Authorized licensed use limited to: University of Florida. Downloaded on March 15,2013 at 14:57:42 UTC from IEEE Xplore. Restrictions apply.
xvi Copyright © 2006 IEEE. All rights reserved.
26.6.9 Memory........................................................................................................................ 396
26.6.10 Object range................................................................................................................. 396
26.6.11 Named event ................................................................................................................ 397
26.6.12 Parameter, specparam .................................................................................................. 398
26.6.13 Primitive, prim term.....................................................................................................399
26.6.14 UDP ............................................................................................................................. 400
26.6.15 Module path, path term................................................................................................ 401
26.6.16 Intermodule path .......................................................................................................... 401
26.6.17 Timing check ............................................................................................................... 402
26.6.18 Task, function declaration............................................................................................ 402
26.6.19 Task/function call ........................................................................................................ 403
26.6.20 Frames.......................................................................................................................... 404
26.6.21 Delay terminals ............................................................................................................ 405
26.6.22 Net drivers and loads ................................................................................................... 405
26.6.23 Reg drivers and loads................................................................................................... 406
26.6.24 Continuous assignment ................................................................................................ 406
26.6.25 Simple expressions ...................................................................................................... 407
26.6.26 Expressions .................................................................................................................. 408
26.6.27 Process, block, statement, event statement ................................................................. 409
26.6.28 Assignment .................................................................................................................. 410
26.6.29 Delay control................................................................................................................ 410
26.6.30 Event control................................................................................................................ 410
26.6.31 Repeat control .............................................................................................................. 411
26.6.32 While, repeat, wait ....................................................................................................... 411
26.6.33 For................................................................................................................................ 411
26.6.34 Forever ......................................................................................................................... 411
26.6.35 If, if-else....................................................................................................................... 412
26.6.36 Case.............................................................................................................................. 412
26.6.37 Assign statement, deassign, force, release .................................................................. 413
26.6.38 Disable ......................................................................................................................... 413
26.6.39 Callback ....................................................................................................................... 414
26.6.40 Time queue .................................................................................................................. 414
26.6.41 Active time format .......................................................................................................414
26.6.42 Attributes ..................................................................................................................... 415
26.6.43 Iterator.......................................................................................................................... 416
26.6.44 Generates ..................................................................................................................... 417
27. VPI routine definitions......................................................................................................................... 418
27.1 vpi_chk_error() .......................................................................................................................... 418
27.2 vpi_compare_objects()............................................................................................................... 420
27.3 vpi_control() .............................................................................................................................. 420
27.4 vpi_flush().................................................................................................................................. 421
27.5 vpi_free_object()........................................................................................................................ 421
27.6 vpi_get()..................................................................................................................................... 422
27.7 vpi_get_cb_info()....................................................................................................................... 422
27.8 vpi_get_data() .............................................................................................................
............... 423
27.9 vpi_get_delays()......................................................................................................................... 424
27.10 vpi_get_str()............................................................................................................................... 426
27.11 vpi_get_systf_info()................................................................................................................... 427
27.12 vpi_get_time()............................................................................................................................ 428
27.13 vpi_get_userdata() ..................................................................................................................... 429
27.14 vpi_get_value() .......................................................................................................................... 429
27.15 vpi_get_vlog_info() ................................................................................................................... 435
27.16 vpi_handle() ............................................................................................................................... 436
Authorized licensed use limited to: University of Florida. Downloaded on March 15,2013 at 14:57:42 UTC from IEEE Xplore. Restrictions apply.
Copyright © 2006 IEEE. All rights reserved. xvii
27.17 vpi_handle_by_index() .............................................................................................................. 437
27.18 vpi_handle_by_multi_index().................................................................................................... 438
27.19 vpi_handle_by_name() .............................................................................................................. 438
27.20 vpi_handle_multi()..................................................................................................................... 439
27.21 vpi_iterate()................................................................................................................................ 439
27.22 vpi_mcd_close()......................................................................................................................... 440
27.23 vpi_mcd_flush()......................................................................................................................... 441
27.24 vpi_mcd_name() ........................................................................................................................ 441
27.25 vpi_mcd_open() ......................................................................................................................... 442
27.26 vpi_mcd_printf()........................................................................................................................ 443
27.27 vpi_mcd_vprintf()...................................................................................................................... 444
27.28 vpi_printf()................................................................................................................................. 444
27.29 vpi_put_data()............................................................................................................................ 445
27.30 vpi_put_delays() ........................................................................................................................ 447
27.31 vpi_put_userdata() ..................................................................................................................... 450
27.32 vpi_put_value().......................................................................................................................... 450
27.33 vpi_register_cb()........................................................................................................................ 453
27.33.1 Simulation event callbacks .......................................................................................... 454
27.33.2 Simulation time callbacks............................................................................................ 458
27.33.3 Simulator action or feature callbacks........................................................................... 460
27.34 vpi_register_systf() .................................................................................................................... 461
27.34.1 System task/function callbacks.................................................................................... 462
27.34.2 Initializing VPI system task/function callbacks........................................................... 463
27.34.3 Registering multiple system tasks and functions......................................................... 464
27.35 vpi_remove_cb()........................................................................................................................ 465
27.36 vpi_scan()................................................................................................................................... 465
27.37 vpi_vprintf()............................................................................................................................... 466
28. Protected envelopes ............................................................................................................................. 467
28.1 General....................................................................................................................................... 467
28.2 Processing protected envelopes ................................................................................................. 467
28.2.1 Encryption.................................................................................................................... 468
28.2.2 Decryption ................................................................................................................... 469
28.3 Protect pragma directives........................................................................................................... 469
28.4 Protect pragma keywords........................................................................................................... 471
28.4.1 begin............................................................................................................................. 471
28.4.2 end................................................................................................................................ 471
28.4.3 begin_protected............................................................................................................ 471
28.4.4 end_protected............................................................................................................... 472
28.4.5 author ........................................................................................................................... 472
28.4.6 author_info................................................................................................................... 473
28.4.7 encrypt_agent............................................................................................................... 473
28.4.8 encrypt_agent_info ...................................................................................................... 473
28.4.9 encoding....................................................................................................................... 474
28.4.10 data_keyowner ............................................................................................................. 475
28.4.11 data_method................................................................................................................. 475
28.4.12 data_keyname .............................................................................................................. 476
28.4.13 data_public_key ........................................................................................................... 477
28.4.14 data_decrypt_key .........................................................................................................477
28.4.15 data_block.................................................................................................................... 478
28.4.16 digest_keyowner ..........................................................................................................478
28.4.17 digest_key_method ...................................................................................................... 478
28.4.18 digest_keyname ...........................................................................................................479
28.4.19 digest_public_key ........................................................................................................479
Authorized licensed use limited to: University of Florida. Downloaded on March 15,2013 at 14:57:42 UTC from IEEE Xplore. Restrictions apply.
xviii Copyright © 2006 IEEE. All rights reserved.
28.4.20 digest_decrypt_key ...................................................................................................... 480
28.4.21 digest_method.............................................................................................................. 480
28.4.22 digest_block ................................................................................................................. 481
28.4.23 key_keyowner.............................................................................................................. 482
28.4.24 key_method.................................................................................................................. 482
28.4.25 key_keyname ............................................................................................................... 482
28.4.26 key_public_key............................................................................................................ 483
28.4.27 key_block..................................................................................................................... 483
28.4.28 decrypt_license ............................................................................................................ 484
28.4.29 runtime_license............................................................................................................ 484
28.4.30 comment....................................................................................................................... 485
28.4.31 reset.............................................................................................................................. 485
28.4.32 viewport ....................................................................................................................... 486
Annex A (normative) Formal syntax definition .......................................................................................... 487
A.1 Source text ....................................................................................................................... 487
A.1.1 Library source text ............................................................................................. 487
A.1.2 Verilog source text ............................................................................................. 487
A.1.3 Module parameters and ports ............................................................................. 487
A.1.4 Module items...................................................................................................... 488
A.1.5 Configuration source text ................................................................................... 489
A.2 Declarations ..................................................................................................................... 489
A.2.1 Declaration types................................................................................................ 489
A.2.2 Declaration data types ........................................................................................ 490
A.2.3 Declaration lists.................................................................................................. 491
A.2.4 Declaration assignments..................................................................................... 491
A.2.5 Declaration ranges.............................................................................................. 492
A.2.6 Function declarations ......................................................................................... 492
A.2.7 Task declarations................................................................................................ 492
A.2.8 Block item declarations...................................................................................... 493
A.3 Primitive instances........................................................................................................... 493
A.3.1 Primitive instantiation and instances.................................................................. 493
A.3.2 Primitive strengths.............................................................................................. 494
A.3.3 Primitive terminals ............................................................................................. 494
A.3.4 Primitive gate and switch types.......................................................................... 494
A.4 Module instantiation and generate construct ................................................................... 495
A.4.1 Module instantiation........................................................................................... 495
A.4.2 Generate construct.............................................................................................. 495
A.5 UDP declaration and instantiation ................................................................................... 496
A.5.1 UDP declaration ................................................................................................. 496
A.5.2 UDP ports........................................................................................................... 496
A.5.3 UDP body........................................................................................................... 496
A.5.4 UDP instantiation ............................................................................................... 497
A.6 Behavioral statements ...................................................................................................... 497
A.6.1 Continuous assignment statements..................................................................... 497
A.6.2 Procedural blocks and assignments.................................................................... 497
A.6.3 Parallel and sequential blocks ............................................................................ 497
A.6.4 Statements .......................................................................................................... 498
A.6.5 Timing control statements .................................................................................. 498
A.6.6 Conditional statements ....................................................................................... 499
A.6.7 Case statements .................................................................................................. 499
A.6.8 Looping statements ............................................................................................ 499
A.6.9 Task enable statements....................................................................................... 499
A.7 Specify section................................................................................................................. 500
Authorized licensed use limited to: University of Florida. Downloaded on March 15,2013 at 14:57:42 UTC from IEEE Xplore. Restrictions apply.
剩余589页未读,继续阅读
2018-07-18 上传
2021-10-03 上传
2020-04-26 上传
2018-07-15 上传
2021-04-14 上传
2021-02-01 上传
2023-08-31 上传
srcxiao
- 粉丝: 0
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Elasticsearch核心改进:实现Translog与索引线程分离
- 分享个人Vim与Git配置文件管理经验
- 文本动画新体验:textillate插件功能介绍
- Python图像处理库Pillow 2.5.2版本发布
- DeepClassifier:简化文本分类任务的深度学习库
- Java领域恩舒技术深度解析
- 渲染jquery-mentions的markdown-it-jquery-mention插件
- CompbuildREDUX:探索Minecraft的现实主义纹理包
- Nest框架的入门教程与部署指南
- Slack黑暗主题脚本教程:简易安装指南
- JavaScript开发进阶:探索develop-it-master项目
- SafeStbImageSharp:提升安全性与代码重构的图像处理库
- Python图像处理库Pillow 2.5.0版本发布
- mytest仓库功能测试与HTML实践
- MATLAB与Python对比分析——cw-09-jareod源代码探究
- KeyGenerator工具:自动化部署节点密钥生成
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功