没有合适的资源?快使用搜索试试~ 我知道了~
首页IEEE Std 1666-2005 SystemC 官方语言参考手册
IEEE Std 1666-2005 SystemC 官方语言参考手册
需积分: 9 2 下载量 107 浏览量
更新于2024-07-24
收藏 2.24MB PDF 举报
"SystemC官方手册,基于IEEEStd1666™-2005标准,是SystemC语言参考手册,由IEEE计算机学会的设计自动化标准委员会赞助并认可为美国国家标准(ANSI)。"
SystemC是一种高级的硬件/软件协同设计语言,主要用于系统级建模和仿真。该语言在2005年被IEEE标准化为IEEE Std 1666™-2005,旨在促进电子设计自动化领域的系统级模型开发。SystemC由Open SystemC Initiative注册商标,并广泛应用于复杂系统的早期功能验证和性能评估。
SystemC的核心特性包括:
1. **类库基础**:SystemC基于C++构建,提供了一组扩展的类库,用于创建行为和数据模型。这些模型可以表示硬件组件,如处理器、存储器和接口,以及软件算法。
2. **并发性**:SystemC支持并发执行的进程(线程),通过`sc_thread`和`sc_process`实现,这使得能够模拟多个硬件模块的并行操作。
3. **通信机制**:SystemC中的`sc_port`和`sc_interface`提供了接口定义,而`sc_in`、`sc_out`、`sc_inout`等信号类型则用于模块间的通信。此外,还有同步事件(`sc_event`)、方法过程(`sc_method`)和时钟周期管理来确保正确的时间行为。
4. **事务级建模(TLM)**:SystemC支持事务级建模,允许开发者抽象出复杂的通信协议,从而简化模型的构建和验证。
5. **可扩展性**:由于其基于C++,SystemC可以灵活地进行类继承和多态性,允许用户自定义扩展库以满足特定应用需求。
6. **混合建模**:SystemC允许将行为模型与硬件描述语言(如Verilog或VHDL)的模型混合使用,为混合模式设计提供便利。
7. **仿真与验证**:SystemC提供了强大的仿真框架,能够对系统级模型进行行为仿真,帮助发现设计错误和优化性能。
8. **IP重用**:通过建立可复用的模块,SystemC促进了知识产权(IP)的重用,加快了设计的开发周期。
9. **一致性测试**:有标准化的SystemC一致性测试套件,用于验证实现是否符合IEEE Std 1666™标准。
通过SystemC,设计师可以更早地进行系统级别的探索,包括架构选择、性能分析和功能验证,从而降低设计风险,提高设计质量。这份官方手册是理解、学习和应用SystemC的关键资源,包含详细的语法解释、示例代码和最佳实践指南。
xiv Copyright © 2006 IEEE. All rights reserved.
7.4.1 Description............................................................................................................... 182
7.5 Limited-precision integer types ............................................................................................... 184
7.5.1 Type definitions........................................................................................................ 184
7.5.2 sc_int_base ............................................................................................................... 185
7.5.3 sc_uint_base ............................................................................................................. 190
7.5.4 sc_int ........................................................................................................................ 194
7.5.5 sc_uint ...................................................................................................................... 197
7.5.6 Bit-selects................................................................................................................. 199
7.5.7 Part-selects ...............................................................................................................203
7.6 Finite-precision integer types................................................................................................... 209
7.6.1 Type definitions ....................................................................................................... 209
7.6.2 Constraints on usage ................................................................................................ 209
7.6.3 sc_signed..................................................................................................................209
7.6.4 sc_unsigned.............................................................................................................. 216
7.6.5 sc_bigint................................................................................................................... 223
7.6.6 sc_biguint.................................................................................................................225
7.6.7 Bit-selects................................................................................................................. 227
7.6.8 Part-selects ...............................................................................................................231
7.7 Integer concatenations ............................................................................................................. 236
7.7.1 Description ............................................................................................................... 236
7.7.2 Class definition......................................................................................................... 236
7.7.3 Constraints on usage................................................................................................. 237
7.7.4 Assignment operators............................................................................................... 238
7.7.5 Implicit type conversion........................................................................................... 238
7.7.6 Explicit type conversion........................................................................................... 238
7.7.7 Other member functions........................................................................................... 238
7.8 Generic base proxy class.......................................................................................................... 239
7.8.1 Description ............................................................................................................... 239
7.8.2 Class definition......................................................................................................... 239
7.8.3 Constraints on usage................................................................................................. 239
7.9 Logic and vector types............................................................................................................. 240
7.9.1 Type definitions ....................................................................................................... 240
7.9.2 sc_logic .................................................................................................................... 240
7.9.3 sc_bv_base ............................................................................................................... 244
7.9.4 sc_lv_base................................................................................................................ 251
7.9.5 sc_bv ........................................................................................................................ 257
7.9.6 sc_lv ......................................................................................................................... 259
7.9.7 Bit-selects................................................................................................................. 261
7.9.8 Part-selects ...............................................................................................................264
7.9.9 Concatenations......................................................................................................... 270
7.10 Fixed-point types ..................................................................................................................... 278
7.10.1 Fixed-point representation........................................................................................ 278
7.10.2 Fixed-point type conversion..................................................................................... 279
7.10.3 Fixed-point data types .............................................................................................. 279
7.10.4 Fixed-point expressions and operations ................................................................... 281
7.10.5 Bit and part selection................................................................................................ 284
7.10.6 Variable-precision fixed-point value limits.............................................................. 284
7.10.7 Fixed-point word length and mode .......................................................................... 284
7.10.8 Conversions to character string................................................................................ 287
7.10.9 Finite word-length effects ........................................................................................ 289
7.10.10 sc_fxnum .................................................................................................................. 313
7.10.11 sc_fxnum_fast .......................................................................................................... 317
7.10.12 sc_fxval .................................................................................................................... 322
7.10.13 sc_fxval_fast............................................................................................................. 326
Copyright © 2006 IEEE. All rights reserved. xv
7.10.14 sc_fix ........................................................................................................................ 331
7.10.15 sc_ufix ...................................................................................................................... 334
7.10.16 sc_fix_fast................................................................................................................. 337
7.10.17 sc_ufix_fast............................................................................................................... 340
7.10.18 sc_fixed..................................................................................................................... 343
7.10.19 sc_ufixed................................................................................................................... 345
7.10.20 sc_fixed_fast............................................................................................................. 347
7.10.21 sc_ufixed_fast...........................................................................................................350
7.10.22 Bit-selects ................................................................................................................. 352
7.10.23 Part-selects................................................................................................................ 354
7.11 Contexts ................................................................................................................................... 361
7.11.1 sc_length_param....................................................................................................... 361
7.11.2 sc_length_context..................................................................................................... 362
7.11.3 sc_fxtype_params..................................................................................................... 363
7.11.4 sc_fxtype_context..................................................................................................... 366
7.11.5 sc_fxcast_switch....................................................................................................... 367
7.11.6 sc_fxcast_context ..................................................................................................... 368
7.12 Control of string representation ............................................................................................... 370
7.12.1 Description...............................................................................................................370
7.12.2 Class definition ........................................................................................................ 370
7.12.3 Functions.................................................................................................................. 370
8. Utility class definitions .................................................................................................................... 371
8.1 Trace files ................................................................................................................................ 371
8.1.1 Class definition and function declarations ............................................................... 371
8.1.2 sc_trace_file ............................................................................................................. 371
8.1.3 sc_create_vcd_trace_file .......................................................................................... 372
8.1.4 sc_close_vcd_trace_file ........................................................................................... 372
8.1.5 sc_write_comment ................................................................................................... 372
8.1.6 sc_trace..................................................................................................................... 372
8.2 sc_report................................................................................................................................... 375
8.2.1 Description............................................................................................................... 375
8.2.2 Class definition ........................................................................................................ 375
8.2.3 Constraints on usage ................................................................................................ 375
8.2.4 sc_severity................................................................................................................376
8.2.5 Copy constructor and assignment ............................................................................ 376
8.2.6 Member functions .................................................................................................... 376
8.3 sc_report_handler..................................................................................................................... 378
8.3.1 Description ............................................................................................................... 378
8.3.2 Class definition......................................................................................................... 378
8.3.3 Constraints on usage................................................................................................. 380
8.3.4 sc_actions .................................................................................................................380
8.3.5 report ........................................................................................................................ 380
8.3.6 set_actions ................................................................................................................381
8.3.7 stop_after.................................................................................................................. 381
8.3.8 get_count ..................................................................................................................382
8.3.9 suppress and force .................................................................................................... 383
8.3.10 set_handler ...............................................................................................................383
8.3.11 get_new_action_id ................................................................................................... 384
8.3.12 sc_interrupt_here and sc_stop_here ......................................................................... 384
8.3.13 get_cached_report and clear_cached_report ............................................................ 384
8.3.14 set_log_file_name and get_log_file_name............................................................... 385
8.4 sc_exception............................................................................................................................. 386
xvi Copyright © 2006 IEEE. All rights reserved.
8.4.1 Description............................................................................................................... 386
8.4.2 Definition .................................................................................................................386
8.5 Utility functions ....................................................................................................................... 387
8.5.1 Function declarations............................................................................................... 387
8.5.2 sc_abs....................................................................................................................... 387
8.5.3 sc_max .....................................................................................................................387
8.5.4 sc_min...................................................................................................................... 387
8.5.5 sc_copyright............................................................................................................. 387
8.5.6 sc_version ................................................................................................................ 388
8.5.7 sc_release .................................................................................................................388
Annex A (informative) Introduction to SystemC ........................................................................................ 389
Annex B (informative) Glossary.................................................................................................................. 393
Annex C (informative) Deprecated features ................................................................................................ 403
Annex D (informative) Changes between the different SystemC versions ................................................. 405
Index ............................................................................................................................................................ 407
Copyright © 2006 IEEE. All rights reserved. 1
IEEE Standard SystemC
®
Language
Reference Manual
1. Overview
1.1 Scope
This standard defines SystemC
®
1
as an ANSI standard C++ class library for system and hardware design.
1.2 Purpose
The general purpose of SystemC is to provide a C++-based standard for designers and architects who need
to address complex systems that are a hybrid between hardware and software.
The specific purpose of this standard is to provide a precise and complete definition of the SystemC class
library so that a SystemC implementation can be developed with reference to this standard alone. This
standard is not intended to serve as a users’ guide or to provide an introduction to SystemC, but does contain
useful information for end users.
1.3 Subsets
It is anticipated that tool vendors will create implementations that support only a subset of this standard or
that impose further constraints on the use of this standard. Such implementations are not fully compliant
with this standard but may nevertheless claim partial compliance with this standard and may use the name
SystemC.
1.4 Relationship with C++
This standard is closely related to the C++ programming language and adheres to the terminology used in
ISO/IEC 14882:2003. This standard does not seek to restrict the usage of the C++ programming language; a
SystemC application may use any of the facilities provided by C++, which in turn may use any of the
facilities provided by C. However, where the facilities provided by this standard are used, they shall be used
in accordance with the rules and constraints set out in this standard.
This standard defines the public interface to the SystemC class library and the constraints on how those
classes may be used. The SystemC class library may be implemented in any manner whatsoever, provided
only that the obligations imposed by this standard are honored.
A C++ class library may be extended using the mechanisms provided by the C++ language. Implementors
and users are free to extend SystemC in this way, provided that they do not violate this standard.
1
SystemC
®
is a registered trademark of Open SystemC Initiative.
IEEE
Std 1666-2005 IEEE STANDARD S
YSTEMC
2 Copyright © 2006 IEEE. All rights reserved.
NOTE—It is possible to create a well-formed C++ program that is legal according to the C++ programming language
standard but that violates this standard. An implementation is not obliged to detect every violation of this standard.
2
1.5 Guidance for readers
Readers who are not entirely familiar with SystemC should start with Annex A, “Inroduction to SystemC,”
which provides a brief informal summary of the subject intended to aid in the understanding of the
normative definitions. Such readers may also find it helpful to scan the examples embedded in the normative
definitions and to see Annex B, “Glossary.”
Readers should pay close attention to Clause 3, “Terminology and conventions used in this standard.” An
understanding of the terminology defined in Clause 3 is necessary for a precise interpretation of this
standard.
Clause 4, “Elaboration and simulation semantics,” defines the behavior of the SystemC kernel and is central
to an understanding of SystemC. The semantic definitions given in the subsequent clauses detailing the
individual classes are built upon the foundations laid in Clause 4.
The clauses from Clause 5 onward define the public interface to the SystemC class library. The following
information is listed for each class:
a) A C++ source code listing of the class definition
b) A statement of any constraints on the use of the class and its members
c) A statement of the semantics of the class and its members
d) For certain classes, a description of functions, typedefs, and macros associated with the class.
e) Informative examples illustrating both typical and atypical uses of the class
Readers should bear in mind that the primary obligation of a tool vendor is to implement the abstract
semantics defined in Clause 4, using the framework and constraints provided by the class definitions starting
in Clause 5.
Annex A is intended to aid the reader in the understanding of the structure and intent of the SystemC class
library.
Annex B is a glossary giving informal descriptions of the terms used in this standard.
Annex C lists the deprecated features, that is, features that were present in version 2.0.1 of the Open
SystemC Initiative (OSCI) open source proof-of-concept SystemC implementation but are not part of this
standard.
Annex D lists the changes between SystemC version 2.0.1 and version 2.1 Beta Oct 12 2004, and the
changes between SystemC 2.1 Beta Oct 12 2004 and this standard.
2
Notes in text, tables, and figures are given for information only, and do not contain requirements needed to implement the standard.
剩余440页未读,继续阅读
2022-09-20 上传
2021-10-04 上传
2021-10-01 上传
2019-11-12 上传
2022-07-15 上传
2021-10-02 上传
xiezichao
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Angular实现MarcHayek简历展示应用教程
- Crossbow Spot最新更新 - 获取Chrome扩展新闻
- 量子管道网络优化与Python实现
- Debian系统中APT缓存维护工具的使用方法与实践
- Python模块AccessControl的Windows64位安装文件介绍
- 掌握最新*** Fisher资讯,使用Google Chrome扩展
- Ember应用程序开发流程与环境配置指南
- EZPCOpenSDK_v5.1.2_build***版本更新详情
- Postcode-Finder:利用JavaScript和Google Geocode API实现
- AWS商业交易监控器:航线行为分析与营销策略制定
- AccessControl-4.0b6压缩包详细使用教程
- Python编程实践与技巧汇总
- 使用Sikuli和Python打造颜色求解器项目
- .Net基础视频教程:掌握GDI绘图技术
- 深入理解数据结构与JavaScript实践项目
- 双子座在线裁判系统:提高编程竞赛效率
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功