没有合适的资源?快使用搜索试试~ 我知道了~
首页IEEE Std 1364-2005: Verilog硬件描述语言标准详解
IEEE Std 1364-2005: Verilog硬件描述语言标准详解
需积分: 9 2 下载量 161 浏览量
更新于2024-07-29
收藏 3.22MB PDF 举报
"IEEE Std 1364-2005是Verilog硬件描述语言(HDL)的标准文档,用于定义Verilog HDL的规范。这个标准语言支持电子系统创建的全过程,包括设计、验证、综合和测试硬件,以及硬件设计数据的交流和维护。主要目标读者是工具实现者和支持该语言的高级用户。关键词包括计算机语言、数字系统、电子系统、硬件描述语言、硬件设计、HDL、PLI(编程语言接口)以及Verilog相关技术。"
Verilog HDL是一种广泛使用的硬件描述语言,它被设计用来描述从简单逻辑门到复杂的数字系统等不同层次的电子硬件。这个标准由IEEE(电气和电子工程师协会)发布,是Verilog语言的官方依据,旨在促进电子设计自动化领域的标准化。
在2005年的修订版IEEE Std 1364-2005中,包含了对2001年版本的更新和改进。这份标准详细规定了Verilog语言的语法、语义和用法,确保不同工具之间的兼容性和一致性。它涵盖了模块定义、并行执行、时序控制、数据类型、运算符、系统任务和函数、接口、参数化、综合性等各个方面。
Verilog HDL的一个关键特性是其支持过程抽象,这意味着设计者可以用行为级或门级来描述硬件。这使得设计者可以更高效地表达设计思想,并通过合成工具将高级描述转换为实际的逻辑门电路。此外,Verilog PLI(编程语言接口)允许用户自定义功能,扩展语言的能力,以满足特定的设计需求。
该标准还涉及到了错误处理和调试机制,使得设计者可以在开发过程中捕获和解决错误。此外,Verilog HDL的可读性和可移植性使得硬件设计可以被团队成员有效地理解和修改,同时也方便了供应商之间的合作和知识产权的保护。
Verilog IEEE Std 2005是硬件设计师、验证工程师和电子设计自动化工具开发者不可或缺的参考文档,它定义了Verilog语言的标准,推动了电子设计行业的进步。通过理解和掌握这个标准,专业人士能够更高效地进行硬件设计、验证和实现,同时保证设计的准确性和可重用性。
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页未读,继续阅读
2018-07-18 上传
2020-07-30 上传
2023-07-31 上传
2023-11-10 上传
2024-11-03 上传
2024-11-03 上传
2024-11-03 上传
2023-06-06 上传
2023-06-07 上传
njjiangpeng
- 粉丝: 0
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 嵌入式通俗理解,绝对原创。信鹏哥,得永生
- ArcSDE轻松入门.pdf
- Struts in Action 中文修正版
- 社区医疗信息管理系统的设计与实现.pdf
- 6级词汇巧记 很好使用的
- 网络工程师应该看的学习笔记
- 华为PCB布线规范(权威材料)
- 基于SLP和SHA结合的企业物流系统平面再布置设计
- 单片机在直升机控制的应用
- asp.net Ajax程序设计第1卷(服务器端).pdf
- Hibernate 应用代码
- ...............................................................
- vim_user_manual中文版.pdf
- 基于javaEE在线考试系统
- VSC#2005计算器代码
- arm深入浅出(上)
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功