没有合适的资源?快使用搜索试试~ 我知道了~
首页IEEE 1364-2005 Verilog硬件描述语言标准详解
IEEE 1364-2005 Verilog硬件描述语言标准详解
需积分: 15 6 下载量 107 浏览量
更新于2024-07-20
1
收藏 5.84MB PDF 举报
IEEE 1364™-2005是Verilog硬件描述语言的标准,它是IEEE Std 1364-2001的修订版,由设计自动化标准委员会支持,由美国电气与电子工程师协会(IEEE)制定。该标准于2006年4月7日发布,版权归属于IEEE。Verilog是由Cadence Design Systems公司注册的商标,这是一种广泛用于系统级和逻辑综合设计的高级硬件描述语言。
IEEE Std 1364定义了Verilog语言的关键特性,包括模块化的设计方法、数据类型(如整型、布尔型、位宽类型等)、过程和任务的使用、模块接口的描述(端口、参数、包)、时序逻辑(顺序语句、条件分支、延时等)、并行处理(fork/join结构)、以及仿真和验证工具所依赖的模型和行为描述。它允许设计师以抽象的方式表示数字电路的行为,从而提高设计效率和可读性。
标准中包含了详细的语言语法和语义规则,确保了不同工具间的设计兼容性和一致性。此外,IEEE Std 1364-2005还着重强调了可复用设计、接口描述的清晰性以及对于硬件行为的精确表述。它支持层次化设计,使得大型系统可以分解为独立且易于管理的部分。
该标准也规定了测试覆盖率目标,鼓励开发者编写可测试的设计,并提供了调试工具的接口定义。同时,它对编译器、模拟器和综合器的行为进行了规范,以确保代码的正确编译和仿真。
在2005年的修订版中,IEEE可能对语言的某些部分进行了优化和扩展,比如引入了新的功能或改进了已有的特性,以适应快速发展的半导体工业需求。然而,任何未经授权的复制或电子传播都必须得到IEEE的许可。
IEEE Std 1364-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
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
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
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
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
剩余589页未读,继续阅读
2022-07-15 上传
2022-07-15 上传
2018-08-07 上传
2010-05-11 上传
2017-01-13 上传
219 浏览量
2021-09-09 上传
2009-10-14 上传
2013-05-23 上传
zhanghang976
- 粉丝: 6
- 资源: 23
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Angular程序高效加载与展示海量Excel数据技巧
- Argos客户端开发流程及Vue配置指南
- 基于源码的PHP Webshell审查工具介绍
- Mina任务部署Rpush教程与实践指南
- 密歇根大学主题新标签页壁纸与多功能扩展
- Golang编程入门:基础代码学习教程
- Aplysia吸引子分析MATLAB代码套件解读
- 程序性竞争问题解决实践指南
- lyra: Rust语言实现的特征提取POC功能
- Chrome扩展:NBA全明星新标签壁纸
- 探索通用Lisp用户空间文件系统clufs_0.7
- dheap: Haxe实现的高效D-ary堆算法
- 利用BladeRF实现简易VNA频率响应分析工具
- 深度解析Amazon SQS在C#中的应用实践
- 正义联盟计划管理系统:udemy-heroes-demo-09
- JavaScript语法jsonpointer替代实现介绍
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功