IEC 61691-7:2025
(Main)Behavioural languages - Part 7: SystemC® Language Reference Manual
Behavioural languages - Part 7: SystemC® Language Reference Manual
IEC 61967-7:2025 defines SystemC® with Transaction Level Modeling (TLM) as an ISO standard C++ class library for system and hardware design. SystemC®1 as an ANSI standard C++ class library for system and hardware design.
The general purpose of this standard 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 including a TLM library so that a SystemC implementation can be developed with reference to this standard alone. This standard is not intended to serve as a user’s guide or to provide an introduction to SystemC, but it does contain useful information for end users.
The changes with respect to the previous edition are provided in Annex D.
This standard is published as a double logo IEC-IEEE standard.
General Information
Relations
Standards Content (Sample)
IEC 61691-7 ®
Edition 2.0 2025-06
INTERNATIONAL
™
IEEE Std 1666
STANDARD
Behavioural languages –
Part 7: SystemC® Language Reference Manual
ICS 25.040.01; 35.060 ISBN 978-2-8327-0467-7
All rights reserved. IEEE is a registered trademark in the U.S. Patent & Trademark Office, owned by the Institute of
Electrical and Electronics Engineers, Inc. Unless otherwise specified, no part of this publication may be reproduced or
utilized in any form or by any means, electronic or mechanical, including photocopying and microfilm, without permission
in writing from the IEC Central Office. Any questions about IEEE copyright should be addressed to the IEEE. Enquiries
about obtaining additional rights to this publication and other information requests should be addressed to the IEC or
your local IEC member National Committee.
IEC Secretariat Institute of Electrical and Electronics Engineers, Inc.
3, rue de Varembé 3 Park Avenue
CH-1211 Geneva 20 New York, NY 10016-5997
Switzerland United States of America
Tel.: +41 22 919 02 11 stds.ipr@ieee.org
info@iec.ch www.ieee.org
www.iec.ch
About the IEC
The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes
International Standards for all electrical, electronic and related technologies.
About IEC/IEEE publications
The technical content of IEC publications is kept under constant review by the IEC. Please make sure that you have the
latest edition, a corrigendum or an amendment might have been published.
IEC publications search - webstore.iec.ch/advsearchform IEC Products & Services Portal - products.iec.ch
The advanced search enables to find IEC publications by a Discover our powerful search engine and read freely all the
variety of criteria (reference number, text, technical publications previews, graphical symbols and the glossary. With a
committee, …). It also gives information on projects, replaced subscription you will always have access to up to date content
and withdrawn publications. tailored to your needs.
IEC Just Published - webstore.iec.ch/justpublished
Electropedia - www.electropedia.org
Stay up to date on all new IEC publications. Just Published
The world's leading online dictionary on electrotechnology,
details all new publications released. Available online and
containing more than 22 500 terminological entries in English and
once a month by email.
French, with equivalent terms in 25 additional languages. Also
known as the International Electrotechnical Vocabulary (IEV)
IEC Customer Service Centre - webstore.iec.ch/csc
online.
If you wish to give us your feedback on this publication or need
further assistance, please contact the Customer Service
Centre: sales@iec.ch.
IEEE Std 1666™‐2023
Contents
1. Overview. 23
1.1 Scope. 23
1.2 Purpose. 23
1.3 Word usage . 23
1.4 Subsets . 24
1.5 Relationship with C++ standard . 24
1.6 Guidance for readers . 24
2. Normative references. 26
3. Terminology and conventions used in this standard. 27
3.1 Terminology. 27
3.1.1 Shall, should, may, can . 27
3.1.2 Implementation, application . 27
3.1.3 Call, called from, derived from. 27
3.1.4 Specific technical terms . 27
3.2 Syntactical conventions . 29
3.2.1 Implementation-defined. 29
3.2.2 Disabled . 29
3.2.3 Ellipsis (.). 29
3.2.4 Class names. 29
3.2.5 Embolded text . 30
3.3 Semantic conventions . 30
3.3.1 Class definitions and the inheritance hierarchy . 30
3.3.2 Function definitions and side-effects. 30
3.3.3 Functions that use const char* as parameter. 30
3.3.4 Functions whose return type is a reference or a pointer . 31
3.3.5 Namespaces and internal naming . 33
3.3.6 Non-compliant applications and errors. 33
3.4 Notes and examples . 33
4. Elaboration and simulation semantics . 34
4.1 Overview. 34
4.2 Elaboration. 34
4.2.1 Overview. 34
4.2.2 Instantiation . 35
4.2.3 Process macros. 36
4.2.4 Port binding and export binding . 36
4.2.5 Setting the time resolution . 37
4.3 Simulation. 38
4.3.1 Overview. 38
4.3.2 The scheduling algorithm . 38
4.3.3 Initialization, cycles, pauses,and suspension in the scheduling algorithm . 41
4.4 Running elaboration and simulation . 42
4.4.1 Overview. 42
4.4.2 Function declarations. 42
4.4.3 sc_elab_and_sim.43
4.4.4 sc_argc and sc_argv . 43
Published by IEC under licence from IEEE. © 2023 IEEE. All rights reserved.
IEEE Std 1666™‐2023
4.4.5 Running under application control using functions sc_main and sc_start. 44
4.4.6 Running under control of the kernel . 46
4.5 Elaboration and simulation callbacks . 46
4.5.1 Overview. 46
4.5.2 before_end_of_elaboration . 47
4.5.3 end_of_elaboration . 48
4.5.4 start_of_simulation .49
4.5.5 end_of_simulation . 50
4.6 Other functions related to the scheduler . 50
4.6.1 Function declarations. 50
4.6.2 sc_pause . 52
4.6.3 sc_suspend_all, sc_unsuspend_all, sc_unsuspendable, and sc_suspendable . 53
4.6.4 sc_stop, sc_set_stop_mode, and sc_get_stop_mode . 53
4.6.5 sc_time_stamp . 54
4.6.6 sc_delta_count and sc_delta_count_at_current_time . 55
4.6.7 sc_is_running . 55
4.6.8 Functions to detect pending activity . 56
4.6.9 sc_get_status . 57
4.6.10 sc_stage_callback_if .58
4.6.11 sc_register_stage_callback . 60
4.6.12 sc_unregister_stage_callback . 60
4.6.13 Callbacks execution .60
5. Core language class definitions . 61
5.1 Class header files . 61
5.1.1 Overview. 61
5.1.2 #include "systemc".61
5.1.3 #include "systemc.h". 61
5.2 sc_module . 62
5.2.1 Description. 62
5.2.2 Class definition . 62
5.2.3 Constraints on usage . 65
5.2.4 kind . 65
5.2.5 SC_MODULE . 65
5.2.6 Constructors . 66
5.2.7 SC_CTOR. 66
5.2.8 SC_METHOD, SC_THREAD, SC_CTHREAD. 67
5.2.9 SC_NAMED . 68
5.2.10 Method process . 68
5.2.11 Thread and clocked thread processes. 69
5.2.12 Clocked thread processes. 70
5.2.13 reset_signal_is and async_reset_signal_is . 72
5.2.14 sensitive . 73
5.2.15 dont_initialize . 74
5.2.16 set_stack_size. 75
5.2.17 next_trigger. 75
5.2.18 wait. 77
5.2.19 Positional port binding.78
5.2.20 before_end_of_elaboration, end_of_elaboration, start_of_simulation,
end_of_simulation . 80
5.2.21 get_child_objects and get_child_events . 80
5.2.22 sc_gen_unique_name. 81
5.2.23 sc_behavior and sc_channel. 81
Published by IEC under licence from IEEE. © 2023 IEEE. All rights reserved.
IEEE Std 1666™‐2023
5.3 sc_module_name . 82
5.3.1 Description. 82
5.3.2 Class definition . 82
5.3.3 Constraints on usage . 83
5.3.4 Module hierarchy.83
5.3.5 Member functions . 84
5.4 sc_sensitive† . 85
5.4.1 Description. 85
5.4.2 Class definition . 85
5.4.3 Constraints on usage . 85
5.4.4 operator<<. 85
5.5 sc_spawn_options and sc_spawn. 86
5.5.1 Description. 86
5.5.2 Class definition . 86
5.5.3 Constraints on usage . 88
5.5.4 Constructors . 88
5.5.5 Member functions . 88
5.5.6 sc_spawn. 89
5.5.7 SC_FORK and SC_JOIN. 92
5.6 sc_process_handle . 93
5.6.1 Description. 93
5.6.2 Class definition . 93
5.6.3 Constraints on usage . 95
5.6.4 Constructors . 95
5.6.5 Member functions . 95
5.6.6 Member functions for process control . 98
5.6.7 sc_get_current_process_handle . 114
5.6.8 sc_is_unwinding . 115
5.7 sc_event_finder and sc_event_finder_t . 116
5.7.1 Description. 116
5.7.2 Class definition . 116
5.7.3 Constraints on usage . 116
5.8 sc_event_and_list and sc_event_or_list. 118
5.8.1 Description. 118
5.8.2 Class definition . 118
5.8.3 Constraints and usage . 119
5.8.4 Constructors, destructor, assignment . 119
5.8.5 Member functions and operators . 119
5.9 sc_event_and_expr† and sc_event_or_expr†. 121
5.9.1 Description. 121
5.9.2 Class definition . 121
5.9.3 Constraints on usage . 122
5.9.4 Operators. 122
5.10 sc_event . 123
5.10.1 Description. 123
5.10.2 Class definition . 123
5.10.3 Constraints on usage . 124
5.10.4 Constructors, destructor, and event naming. 124
5.10.5 Functions for naming and hierarchy traversal . 125
5.10.6 notify and cancel. 126
5.10.7 Event lists. 127
5.10.8 None event . 127
5.10.9 Multiple event notifications . 127
5.11 sc_time . 128
Published by IEC under licence from IEEE. © 2023 IEEE. All rights reserved.
IEEE Std 1666™‐2023
5.11.1 Description. 128
5.11.2 Class definition . 128
5.11.3 Constructors . 129
5.11.4 Functions and operators . 130
5.11.5 Time resolution . 130
5.11.6 sc_max_time . 131
5.11.7 SC_ZERO_TIME . 131
5.12 sc_port. 131
5.12.1 Description. 131
5.12.2 Class definition . 131
5.12.3 Template parameters. 133
5.12.4 Constraints on usage . 134
5.12.5 Constructors . 135
5.12.6 kind . 135
5.12.7 Named port binding . 135
5.12.8 Member functions for bound ports and port-to-port binding. 136
5.12.9 before_end_of_elaboration, end_of_elaboration, start_of_simulation,
end_of_simulation . 140
5.13 sc_export. 140
5.13.1 Description. 140
5.13.2 Class definition . 140
5.13.3 Template parameters. 141
5.13.4 Constraints on usage . 141
5.13.5 Constructors . 142
5.13.6 kind . 142
5.13.7 Export binding . 142
5.13.8 Member functions for bound exports and export-to-export binding . 143
5.13.9 before_end_of_elaboration, end_of_elaboration, start_of_simulation,
end_of_simulation . 144
5.14 sc_interface . 144
5.14.1 Description. 144
5.14.2 Class definition . 145
5.14.3 Constraints on usage . 145
5.14.4 register_port . 145
5.14.5 default_event. 146
5.15 sc_prim_channel . 147
5.15.1 Description. 147
5.15.2 Class definition . 147
5.15.3 Constraints on usage . 148
5.15.4 Constructors, destructor, and hierarchical names . 148
5.15.5 kind . 149
5.15.6 request_update and update. 149
5.15.7 async_attach_suspending and async_detach_suspending .150
5.15.8 next_trigger and wait . 150
5.15.9 before_end_of_elaboration, end_of_elaboration, start_of_simulation,
end_of_simulation . 151
5.16 sc_object . 152
5.16.1 Description. 152
5.16.2 Class definition . 152
5.16.3 Constraints on usage . 153
5.16.4 Constructors and destructor . 153
5.16.5 name, basename, and kind . 154
5.16.6 print and dump . 155
5.16.7 Functions for object hierarchy traversal . 155
Published by IEC under licence from IEEE. © 2023 IEEE. All rights reserved.
IEEE Std 1666™‐2023
5.16.8 Member functions for attributes . 157
5.16.9 get_hierarchy_scope . 158
5.17 Hierarchical naming of objects and events . 158
5.17.1 Overview. 158
5.17.2 sc_hierarchical_name_exists . 159
5.17.3 sc_register_hierarchical_name, sc_unregister_hierarchical_name. 160
5.18 sc_attr_base. 160
5.18.1 Description. 160
5.18.2 Class definition . 160
5.18.3 Member functions . 161
5.19 sc_attribute. 161
5.19.1 Description. 161
5.19.2 Class definition . 161
5.19.3 Template parameters. 161
5.19.4 Member functions and data members. 161
5.20 sc_attr_cltn. 162
5.20.1 Description. 162
5.20.2 Class definition . 162
5.20.3 Constraints on usage . 162
5.20.4 Iterators . 162
5.21 sc_hierarchy_scope. 163
5.21.1 Description. 163
5.21.2 Class definition . 163
5.21.3 Constraints on usage . 163
5.21.4 Constructor. 164
5.21.5 get_root . 164
6. Predefined channel class definitions. 165
6.1 sc_signal_in_if . 165
6.1.1 Description. 165
6.1.2 Class definition . 165
6.1.3 Member functions . 165
6.2 sc_signal_in_if and sc_signal_in_if. 166
6.2.1 Description. 166
6.2.2 Class definition . 166
6.2.3 Member functions . 167
6.3 sc_signal_inout_if. 167
6.3.1 Description. 167
6.3.2 Class definition . 167
6.3.3 Member functions . 168
6.4 sc_signal. 168
6.4.1 Description. 168
6.4.2 Class definition . 169
6.4.3 Template parameter T. 169
6.4.4 Reading and writing signals. 170
6.4.5 Constructors . 171
6.4.6 register_port . 171
6.4.7 Member functions for reading . 172
6.4.8 Member functions for writing. 172
6.4.9 Member functions for events . 172
6.4.10 Diagnostic member functions . 173
6.4.11 operator<<. 173
6.5 sc_signal and sc_signal . 174
Published by IEC under licence from IEEE. © 2023 IEEE. All rights reserved.
IEEE Std 1666™‐2023
6.5.1 Description. 174
6.5.2 Class definition . 174
6.5.3 Member functions . 176
6.6 sc_buffer . 177
6.6.1 Description. 177
6.6.2 Class definition . 177
6.6.3 Constructors . 177
6.6.4 Member functions . 178
6.7 sc_clock . 179
6.7.1 Description. 179
6.7.2 Class definition . 179
6.7.3 Characteristic properties . 180
6.7.4 Constructors . 180
6.7.5 write . 180
6.7.6 Diagnostic member functions . 181
6.7.7 before_end_of_elaboration . 181
6.7.8 sc_in_clk . 181
6.8 sc_in . 181
6.8.1 Description. 181
6.8.2 Class definition . 181
6.8.3 Member functions . 182
6.8.4 sc_trace . 183
6.8.5 end_of_elaboration . 183
6.9 sc_in and sc_in. 183
6.9.1 Description. 183
6.9.2 Class definition . 183
6.9.3 Member functions . 185
6.10 sc_inout. 186
6.10.1 Description. 186
6.10.2 Class definition . 186
6.10.3 Member functions . 187
6.10.4 initialize . 187
6.10.5 sc_trace . 187
6.10.6 end_of_elaboration . 188
6.10.7 Binding. 188
6.11 sc_inout and sc_inout . 188
6.11.1 Description. 188
6.11.2 Class definition . 188
6.11.3 Member functions . 190
6.12 sc_out . 190
6.12.1 Description. 190
6.12.2 Class definition . 190
6.12.3 Member functions . 191
6.13 sc_signal_resolved . 191
6.13.1 Description. 191
6.13.2 Class definition . 191
6.13.3 Constructors . 192
6.13.4 Resolution semantics . 192
6.13.5 Member functions . 193
6.14 sc_in_resolved .
...








Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.
Loading comments...