RELEASENOTES revision 12027:1eb7dc7aa10b
1955SN/A Release Notes for SystemC 2.3.1 2955SN/A =============================== 31762SN/A 4955SN/A Andrew C. Goodrich, Forte Design Systems 5955SN/A Philipp A. Hartmann, OFFIS Institute for Information Technology 6955SN/A 7955SN/ACONTENTS 8955SN/A======== 9955SN/A 10955SN/A 1) What's new in this release? 11955SN/A 12955SN/A 2) Bug fixes and enhancements 13955SN/A 14955SN/A 3) New features 15955SN/A 16955SN/A 4) Incompatibitilies with previous releases 17955SN/A 18955SN/A 5) Expanded dynamic process support 19955SN/A 20955SN/A 6) Experimental features 21955SN/A 22955SN/A 7) Known problems 23955SN/A 24955SN/A 8) Fixed-point library 25955SN/A 26955SN/A 9) TLM Release Notes 27955SN/A 282665Ssaidi@eecs.umich.edu 294762Snate@binkert.org1) What's new in this release? 30955SN/A============================== 315522Snate@binkert.org 326143Snate@binkert.orgThis version of SystemC contains the "Proof of Concept" simulator 334762Snate@binkert.orgfor the IEEE 1666-2011 SystemC standard. Please consult the IEEE Std 345522Snate@binkert.org1666-2011 SystemC Language Reference Manual for details about the 35955SN/Acurrent SystemC standard. 365522Snate@binkert.org 37955SN/ATLM-2.0 is merged into the main SystemC release since 2.3.0. 385522Snate@binkert.orgPlease see section 9) below for more details related to TLM. 394202Sbinkertn@umich.edu 405742Snate@binkert.orgCompared to the 2.3.0, this release has the following new items: 41955SN/A 424381Sbinkertn@umich.edu - New features, partly beyond the current IEEE 1666-2011 standard, 434381Sbinkertn@umich.edu see section 3. 44955SN/A 45955SN/A - Experimental features (disabled by default), see section 5. 46955SN/A Testing and feedback welcome via the Accellera SystemC forums 474202Sbinkertn@umich.edu at http://forums.accellera.org/forum/9-systemc/. 48955SN/A 494382Sbinkertn@umich.edu - Bug fixes, see section 2. 504382Sbinkertn@umich.edu 514382Sbinkertn@umich.edu - Expanded platform support, see the README. 526654Snate@binkert.org 535517Snate@binkert.org 547674Snate@binkert.org 557674Snate@binkert.org2) Bug fixes and enhancements 566143Snate@binkert.org============================= 576143Snate@binkert.org 586143Snate@binkert.orgFollowing is the list of bug fixes and enhancements for this release: 598233Snate@binkert.org 608233Snate@binkert.org - For fixes and enhancements of the embedded TLM-2.0 implementation, 618233Snate@binkert.org please see section 9. 628233Snate@binkert.org 638233Snate@binkert.org - Additional changes and cleanups leading to incompatibilities with 648233Snate@binkert.org previous versions of SystemC are described in section 4. 658233Snate@binkert.org 668233Snate@binkert.org - Fix nested SC_METHOD preemptions caused by resetting a method, which 678233Snate@binkert.org throws an exception in a thread process. The control now correctly 688233Snate@binkert.org goes back to the throwing method. 698233Snate@binkert.org 708233Snate@binkert.org - Handle the case of a suppressed multiple-writer error in sc_signal 718233Snate@binkert.org (and related channels) consistently with SystemC 2.2.0 again. 726143Snate@binkert.org 738233Snate@binkert.org - The 'sc_buffer<bool>' and 'sc_buffer<sc_logic>' channels now correctly 748233Snate@binkert.org notify their (pos|neg)edge_events, if someone is waiting on them. 758233Snate@binkert.org 766143Snate@binkert.org - Cleanup the renaming of the internal Boost namespaces. The embedded 776143Snate@binkert.org Boost implementation resides in the (renamed) top-level namespaces 786143Snate@binkert.org - sc_boost 796143Snate@binkert.org - sc_unnamed (for placeholders, part of IEEE 1666-2011) 808233Snate@binkert.org - sc_mpl_ (internal ADL barrier) 818233Snate@binkert.org 828233Snate@binkert.org - Minor fixes in sc_vector-related classes 836143Snate@binkert.org - correctly determine instantiation context 848233Snate@binkert.org - sc_vector_iter: addition/substraction operators fixed 858233Snate@binkert.org - sc_vector_assembly: add swap, fix missing return statement in 868233Snate@binkert.org assignment 878233Snate@binkert.org 886143Snate@binkert.org - WIF tracing of 64-bit integers: fix widths and masks on some 896143Snate@binkert.org 64-bit platforms. 906143Snate@binkert.org 914762Snate@binkert.org - Suppressed a warning in case of calling sc_start in case of pending 926143Snate@binkert.org delta notifications without any pending (or resulting) process 938233Snate@binkert.org activations afterwards (1666-2011 compatbility). 948233Snate@binkert.org 958233Snate@binkert.org - Fix sc_string_old implementation to handle very long strings (>1024) 968233Snate@binkert.org (known issue in <=2.3.0). Note, that sc_string_old is no longer 978233Snate@binkert.org included by default, see section 4. 986143Snate@binkert.org 998233Snate@binkert.org - Add "risc_cpu" example to Automake build system ("make check"). 1008233Snate@binkert.org 1018233Snate@binkert.org - Add missing files to the MS Visual C++ SystemC.vcproj project file. 1028233Snate@binkert.org 1036143Snate@binkert.org - Add a missing "break" statement to "scfx_utils.h" in the "SC_CSD" 1046143Snate@binkert.org format parsing logic. 1056143Snate@binkert.org 1066143Snate@binkert.org - Fix several integer conversion warnings raised by some compilers 1076143Snate@binkert.org throughout the SystemC implementation. 1086143Snate@binkert.org 1096143Snate@binkert.org - Fixed incorrect GCC i386/x86_64 function call stack alignment when 1106143Snate@binkert.org using the QuickThreads/WinFiber-based process implementations (16-byte 1116143Snate@binkert.org boundary). This avoids segmentation faults in some cases where the 1127065Snate@binkert.org stricter stack requirement is implicitly assumed by the compiler. 1136143Snate@binkert.org 1148233Snate@binkert.org - The default stack size for threads, SC_DEFAULT_STACK_SIZE, has been 1158233Snate@binkert.org increased on 64-bit platforms and is overridable at library build 1168233Snate@binkert.org time (see INSTALL). 1178233Snate@binkert.org 1188233Snate@binkert.org - The sc_report implementation now correctly handles empty and NULL 1198233Snate@binkert.org message type arguments (avoiding a segmentation fault in these cases). 1208233Snate@binkert.org The sc_report default constructor is made private to follow IEEE 1666. 1218233Snate@binkert.org 1228233Snate@binkert.org - Missing namespace qualifiers added to all reporting macros, namely 1238233Snate@binkert.org - SC_DEFAULT_*_ACTIONS 1248233Snate@binkert.org - SC_REPORT_INFO_VERB 1258233Snate@binkert.org to make them usable again while including <systemc> instead of 1268233Snate@binkert.org <systemc.h> 1278233Snate@binkert.org 1288233Snate@binkert.org - VCD/WIF tracing: fix support for very long values 1298233Snate@binkert.org 1308233Snate@binkert.org The sc_(un)signed and sc_fxnum(_fast) data types can potentially hold 1318233Snate@binkert.org longer values than 1000 bit, which used to be the fixed size of the 1328233Snate@binkert.org intermediate buffers in sc_(vcd,wif)_trace for these types. 1338233Snate@binkert.org 1348233Snate@binkert.org - Cleanup systemc.h 1358233Snate@binkert.org 1368233Snate@binkert.org - Drop any in-library dependencies on the old 'sc_string' class, 1378233Snate@binkert.org removing the need to provide the corresponding header externally 1388233Snate@binkert.org (see section 4). 1398233Snate@binkert.org - Drop explicit in-header dependencies on <windows.h> on Windows 1408233Snate@binkert.org platforms, removing the automatic inclusion from <systemc[.h]> 1418233Snate@binkert.org (see section 4). 1428233Snate@binkert.org - Drop inclusion of 'strstream' by default on some platforms 1438233Snate@binkert.org (see section 4) 1448233Snate@binkert.org - assume working C++ standard library on all platforms 1456143Snate@binkert.org - assume working argument-dependent lookup on MSVC 1466143Snate@binkert.org (which should be working since MSVC 2003 already) 1476143Snate@binkert.org - see section 4 and INSTALL file 1486143Snate@binkert.org 1496143Snate@binkert.org - Improved compile/runtime check of the SystemC library config 1506143Snate@binkert.org 1516143Snate@binkert.org Some preprocessor switches need to be consistent between the application 1526143Snate@binkert.org and the library (e.g. if sizes of classes are affected or other parts of 1536143Snate@binkert.org the ABI are affected). These can now be checked at link-time. 1548233Snate@binkert.org 1558233Snate@binkert.org Secondly, some preprocessor switches need to be consistent between 1568233Snate@binkert.org different translation units of an application, which is checked at 1576143Snate@binkert.org runtime startup. 1586143Snate@binkert.org 1596143Snate@binkert.org - sc_context: avoid reinterpret_cast from integer to pointer 1606143Snate@binkert.org 1616143Snate@binkert.org - The SC_VERSION_ORIGINATOR has been renamed from "ASI" to "Accellera" 1626143Snate@binkert.org to follow the naming policies of the Accellera Systems Initiative. 1635522Snate@binkert.org 1646143Snate@binkert.org - Cleanups of the VCD/WIF tracing implementation 1656143Snate@binkert.org 1666143Snate@binkert.org - Removal of internal files from the public headers (see section 4) 1676143Snate@binkert.org - Report any information (infos, warnings, errors) via the SystemC 1688233Snate@binkert.org reporting mechanism instead of directl printing to std::cout/cerr 1698233Snate@binkert.org - Automatically unregister trace updates when closing a trace file 1708233Snate@binkert.org during the simulation 1716143Snate@binkert.org 1726143Snate@binkert.org - Drop the 'register' storage class specifier, which has been 1736143Snate@binkert.org deprecated in the C++11 standard (and therefore might cause warnings 1746143Snate@binkert.org on some compilers). 1755522Snate@binkert.org 1765522Snate@binkert.org - Expanded naming of traced objects in VCD traces to use 5 characters 1775522Snate@binkert.org rather than 3 to accommodate more signals (incomplete in 2.3.0). 1785522Snate@binkert.org 1795604Snate@binkert.org - Fix sc_signed/sc_unsigned conversion bug on GCC 4.8 or later, coming 1805604Snate@binkert.org from its aggressive optimization in case of integer over/underflows 1816143Snate@binkert.org (by avoiding the C++ undefined behaviour in the implementation). 1826143Snate@binkert.org 1834762Snate@binkert.org - An output stream operator<< for sc_status is added to enable 1844762Snate@binkert.org pretty-printing of sc_status values (and bitwise combinations of 1856143Snate@binkert.org such values). 1866727Ssteve.reinhardt@amd.com 1876727Ssteve.reinhardt@amd.com - Various minor code cleanups and compiler warning fixes 1886727Ssteve.reinhardt@amd.com - removal of some workarounds for very old versions of some 1894762Snate@binkert.org compilers (e.g. MSVC < 8.0). 1906143Snate@binkert.org - removal of unused variables and macros 1916143Snate@binkert.org - some deduplication of redundant code paths 1926143Snate@binkert.org 1936143Snate@binkert.org 1946727Ssteve.reinhardt@amd.com3) New features 1956143Snate@binkert.org=============== 1967674Snate@binkert.org 1977674Snate@binkert.orgHere is an overview of changes in 2.3.1 compared to 2.3.0. 1985604Snate@binkert.org 1996143Snate@binkert.orgNote: These features partly add functionality beyond the current 2006143Snate@binkert.org IEEE Std. 1666-2011. 2016143Snate@binkert.org 2024762Snate@binkert.org 2036143Snate@binkert.org - Major rewrite of the Autoconf/Automake build system 2044762Snate@binkert.org - better control of the installation directories 2054762Snate@binkert.org - improved libtool library dependency detection, especially 2064762Snate@binkert.org in cross-compilation scenarios (--host=...) 2076143Snate@binkert.org - support for pkg-config for SystemC and TLM 2086143Snate@binkert.org (see http://www.freedesktop.org/wiki/Software/pkg-config/) 2094762Snate@binkert.org - accept arbitrary GCC-compatible compilers 2108233Snate@binkert.org (e.g. Clang, Intel compiler, compiler-wrappers like scan-build) 2118233Snate@binkert.org - avoid deprecation warnings, cleanup implementation 2128233Snate@binkert.org - less recursive build, silent rules by default 2138233Snate@binkert.org - improved "make check" test handling 2146143Snate@binkert.org 2156143Snate@binkert.org 2164762Snate@binkert.org - Updated MS Visual C++ project and solution files to include 2176143Snate@binkert.org support for Visual Studio 2012 and 64-bit builds on Windows 2184762Snate@binkert.org platforms. 2196143Snate@binkert.org 2204762Snate@binkert.org 2216143Snate@binkert.org - Improved conversion between the underlying integral time 2228233Snate@binkert.org representation and sc_time objects: 2238233Snate@binkert.org 2248233Snate@binkert.org - Add a nested typedef "value_type" to sc_time to enable an 2256143Snate@binkert.org implementation-independent use of the underlying integral 2266143Snate@binkert.org time representation (see IEEE 1666-2011, 5.11.1). 2276143Snate@binkert.org 2286143Snate@binkert.org - Adding an inverse to the 'sc_time::value()' function to 2296143Snate@binkert.org convert a plain value back to an sc_time object: 2306143Snate@binkert.org static sc_time sc_time::from_value( value_type t ); 2316143Snate@binkert.org 2326143Snate@binkert.org - Adding modulus operators (%, %=) to compute time offsets from 2338233Snate@binkert.org clock or quantum boundaries: 2348233Snate@binkert.org 235955SN/A sc_time operator%(const sc_time& lhs, const sc_time& rhs); 2365584Snate@binkert.org 2375584Snate@binkert.org sc_time& sc_time::operator%=(); 2388233Snate@binkert.org 2398233Snate@binkert.org Note: These operators are missing from IEEE 1666-2011, which 2405584Snate@binkert.org make e.g. the tlm_global_quantum implementation nearly 2415584Snate@binkert.org impossible within the limits of the SystemC standard. 2426143Snate@binkert.org 2436143Snate@binkert.org 2446143Snate@binkert.org - Add function to determine the current object hierarchy: 2455584Snate@binkert.org 2464382Sbinkertn@umich.edu sc_object* sc_core::sc_get_current_object() 2474202Sbinkertn@umich.edu 2484382Sbinkertn@umich.edu Returns a pointer to the sc_object instance (or NULL) that would 2494382Sbinkertn@umich.edu currently become the parent object of a newly created sc_object 2504382Sbinkertn@umich.edu instance (i.e. the current module during elaboration, and the 2515584Snate@binkert.org currently active process during simulation). 2524382Sbinkertn@umich.edu 2534382Sbinkertn@umich.edu 2544382Sbinkertn@umich.edu - Add compile-time configurable default signal writer policy 2558232Snate@binkert.org (see INSTALL). 2565192Ssaidi@eecs.umich.edu 2578232Snate@binkert.org Defining SC_DEFAULT_WRITER_POLICY to one of the sc_writer_policy 2588232Snate@binkert.org values before including systemc(.h) allows application-wide selection 2598232Snate@binkert.org of the default sc_writer_policy used for signals. 2605192Ssaidi@eecs.umich.edu 2618232Snate@binkert.org Defining SC_NO_WRITE_CHECK is equivalent to 2628232Snate@binkert.org SC_DEFAULT WRITER_POLICY=SC_UNCHECKED_WRITERS 2635192Ssaidi@eecs.umich.edu 2645799Snate@binkert.org By default, the writer policy still disallows multiple 2658232Snate@binkert.org writers (SC_ONE_WRITER). 2665192Ssaidi@eecs.umich.edu 2675192Ssaidi@eecs.umich.edu 2685192Ssaidi@eecs.umich.edu - Add an sc_signal initialization which does not create an event 2698232Snate@binkert.org via newly provided constructors to the signal classes: 2705192Ssaidi@eecs.umich.edu 2718232Snate@binkert.org sc_signal<T>::sc_signal( const char* name 2725192Ssaidi@eecs.umich.edu , const T& initial_value ); 2735192Ssaidi@eecs.umich.edu 2745192Ssaidi@eecs.umich.edu (similarly for sc_buffer and sc_signal_resolved) 2755192Ssaidi@eecs.umich.edu 2765192Ssaidi@eecs.umich.edu Compared to calling the "write()" function on a signal during 2774382Sbinkertn@umich.edu the elaboration, these constructors will set the initial value 2784382Sbinkertn@umich.edu of the signal without triggering an event at the beginning of the 2794382Sbinkertn@umich.edu simulation (and therefore may avoid triggering sensitive processes). 2802667Sstever@eecs.umich.edu 2812667Sstever@eecs.umich.edu 2822667Sstever@eecs.umich.edu - Add a static function to sc_report_handler to query the current 2832667Sstever@eecs.umich.edu report handler function: 2842667Sstever@eecs.umich.edu 2852667Sstever@eecs.umich.edu static sc_report_handler_proc sc_report_handler::get_handler(); 2865742Snate@binkert.org 2875742Snate@binkert.org Additionally, sc_report_handler::set_handler() now returns the 2885742Snate@binkert.org previously set handler (c.f. sc_report_handler::set_actions). 2895793Snate@binkert.org 2905793Snate@binkert.org 2915793Snate@binkert.org - Improved conversion from bitvector element references to bool 2925793Snate@binkert.org 2935793Snate@binkert.org As it is surprising to the user that a reference to an explicit 2944382Sbinkertn@umich.edu element of a sc_bv could not be used in a boolean context, a safe 2954762Snate@binkert.org conversion has been added to this release. 2965344Sstever@gmail.com 2974382Sbinkertn@umich.edu This enables the following coding style: 2985341Sstever@gmail.com 2995742Snate@binkert.org sc_bv<8> mybits; 3005742Snate@binkert.org // ... 3015742Snate@binkert.org if( mybits[0] ) // no longer a compiler error here! 3025742Snate@binkert.org /* do something */ ; 3035742Snate@binkert.org 3044762Snate@binkert.org Note: For logic vectors, the bit-references still need to be 3055742Snate@binkert.org converted to bool explicitly (e.g. via the "to_bool()" 3065742Snate@binkert.org function. 3077722Sgblack@eecs.umich.edu 3085742Snate@binkert.org 3095742Snate@binkert.org 3105742Snate@binkert.org4) Incompatibilities with previous releases 3115742Snate@binkert.org=========================================== 3125341Sstever@gmail.com 3135742Snate@binkert.orgHere is a list of known incompatibilities between this release and 3147722Sgblack@eecs.umich.edu2.3.0 (or earlier): 3154773Snate@binkert.org 3166108Snate@binkert.org - The non-standard sc_time constructors 3171858SN/A - sc_time( uint64, bool scale ) 3181085SN/A - sc_time( double, bool scale ) 3196658Snate@binkert.org have been deprecated and issue a warning when being used. 3206658Snate@binkert.org Use the new 'sc_time::from_value' function instead (see section 3). 3217673Snate@binkert.org 3226658Snate@binkert.org - The non-standard function 'sc_object::get_parent()' has been 3236658Snate@binkert.org deprecated, use 'sc_object::get_parent_object()' instead. 3246658Snate@binkert.org 3256658Snate@binkert.org - The non-standard function 'sc_signal::get_new_value()' has been 3266658Snate@binkert.org deprecated (as required by IEEE 1666-2011). 3276658Snate@binkert.org 3286658Snate@binkert.org - The non-standard implementation classes for the VCD and WIF tracing 3297673Snate@binkert.org (vcd_trace_file, wif_trace_file) are now hidden from an application 3307673Snate@binkert.org and no longer part of the public headers. 3317673Snate@binkert.org Use the IEEE 1666-2011 functions 3327673Snate@binkert.org - sc_trace 3337673Snate@binkert.org - sc_create_[vcd|wif]_trace_file 3347673Snate@binkert.org - sc_close_[vcd|wif]_trace_file 3357673Snate@binkert.org - sc_trace_file::set_time_unit 3366658Snate@binkert.org to set up the tracing in your application. 3377673Snate@binkert.org 3387673Snate@binkert.org - The non-standard header 'src/sysc/communication/sc_reset.h' is 3397673Snate@binkert.org no longer part of the public headers. 3407673Snate@binkert.org 3417673Snate@binkert.org - The 'sc_string_old' class is no longer available by default. 3427673Snate@binkert.org Define 'SC_USE_SC_STRING_OLD' before including "systemc.h", 3437673Snate@binkert.org see INSTALL. 3447673Snate@binkert.org 3457673Snate@binkert.org - The implicit inclusion of the system-headers "windows.h" (on Windows) 3467673Snate@binkert.org and (deprecated) "strstream" have been removed. See INSTALL. 3476658Snate@binkert.org 3487756SAli.Saidi@ARM.com - The incomplete implementation of old "W_*" watching macros and the 3497816Ssteve.reinhardt@amd.com non-standard struct sc_watch have been removed. 3506658Snate@binkert.org 3514382Sbinkertn@umich.eduHere is a list of known incompatibilities between this release and 2.2.0: 3524382Sbinkertn@umich.edu 3534762Snate@binkert.org - The order that processes (SC_METHODs and SC_THREADs) are dispatched 3544762Snate@binkert.org for execution may be different than the order with SystemC 2.2.0 for 3554762Snate@binkert.org some SystemC programs. This is related to the new starvation policy 3566654Snate@binkert.org support for the sc_start() function introduced with IEEE 1666_2011. 3576654Snate@binkert.org 3585517Snate@binkert.org - The various bind() functions for ports and exports are "virtual" as 3595517Snate@binkert.org of IEEE 1666-2011. This leads to an incompatibility with the 3605517Snate@binkert.org TLM 2.0.x release. To use SystemC 2.3 together with TLM 2.0.{0,1}, 3615517Snate@binkert.org define SC_DISABLE_VIRTUAL_BIND during the build of the simulator and 3625517Snate@binkert.org before including systemc.h (see INSTALL). 3635517Snate@binkert.org 3645517Snate@binkert.org 3655517Snate@binkert.org5) Expanded Dynamic Process Support 3665517Snate@binkert.org=================================== 3675517Snate@binkert.org 3685517Snate@binkert.orgThis version implements the dynamic process extensions described in the 3695517Snate@binkert.orgIEEE Std 1666-2011 Language Reference Manual. 3705517Snate@binkert.org 3715517Snate@binkert.orgCompared to SystemC 2.3.0, some bugs in corner cases of the 3725517Snate@binkert.orgspecification have been fixed (see section 2). 3735517Snate@binkert.org 3745517Snate@binkert.org 3756654Snate@binkert.org6) Experimental features 3765517Snate@binkert.org======================== 3775517Snate@binkert.org 3785517Snate@binkert.orgIn this section the experimental features of this release are listed. 3795517Snate@binkert.org 3805517Snate@binkert.orgNote: These features are not enabled in the default library 3815517Snate@binkert.org configuration and need to be explicitly activated during at 3825517Snate@binkert.org library build time. See INSTALL file. 3835517Snate@binkert.org 3846143Snate@binkert.org 3856654Snate@binkert.org - Extended Simulation Phase Callbacks 3865517Snate@binkert.org 3875517Snate@binkert.org This release adds an optional mechanism to register callbacks 3885517Snate@binkert.org to several simulation phases. This can be used to integrate 3895517Snate@binkert.org custom introspection techniques in a non-invasive manner. 3905517Snate@binkert.org 3915517Snate@binkert.org New phases are added to the sc_status enumeration: 3925517Snate@binkert.org 3935517Snate@binkert.org SC_END_OF_INITIALIZATION, 3945517Snate@binkert.org SC_END_OF_UPDATE, 3955517Snate@binkert.org SC_BEFORE_TIMESTEP 3965517Snate@binkert.org 3975517Snate@binkert.org to enable a more fine-grained view to the SystemC simulation phases. 3985517Snate@binkert.org 3995517Snate@binkert.org When the phase callback mechanism is activated (see the INSTALL file), 4006654Snate@binkert.org any sc_object can subscribe to a (set of) elaboration/simulation phases 4016654Snate@binkert.org for dynamic callbacks explicitly: 4025517Snate@binkert.org 4035517Snate@binkert.org // trigger current object before updating the simulation time 4046143Snate@binkert.org this->register_simulation_phase_callback( SC_BEFORE_TIMESTEP ); 4056143Snate@binkert.org 4066143Snate@binkert.org // trigger current object before returning to "sc_start" 4076727Ssteve.reinhardt@amd.com this->register_simulation_phase_callback( SC_PAUSED | SC_STOPPED ); 4085517Snate@binkert.org 4096727Ssteve.reinhardt@amd.com Unsubscribing from any simulation phase is possible via the corresponding 4105517Snate@binkert.org unregister_simulation_phase_callback( phase_cb_mask ) 4115517Snate@binkert.org function. 4125517Snate@binkert.org 4136654Snate@binkert.org Both functions return the effective mask after the requested callback mask 4146654Snate@binkert.org update. Therefore, querying the currently active mask can be achieved by 4157673Snate@binkert.org calling the (un)registration functions with an empty mask: 4166654Snate@binkert.org 4176654Snate@binkert.org sc_object::phase_cb_mask current_cb_mask = 4186654Snate@binkert.org this->register_simulation_phase_callback( 0u ); 4196654Snate@binkert.org 4205517Snate@binkert.org To enable the external (un)registration of callbacks for a user-defined 4215517Snate@binkert.org sc_object class, the (un)registration functions can be made public by 4225517Snate@binkert.org adding the following using directives to a 'public:' section of the 4236143Snate@binkert.org class definition: 4245517Snate@binkert.org 4254762Snate@binkert.org using sc_core::sc_object::register_simulation_phase_callback; 4265517Snate@binkert.org using sc_core::sc_object::unregister_simulation_phase_callback; 4275517Snate@binkert.org 4286143Snate@binkert.org When the simulation passes a phase where dynamic callbacks are registered, 4296143Snate@binkert.org the subscribed objects are triggered via the function: 4305517Snate@binkert.org 4315517Snate@binkert.org virtual void sc_object::simulation_phase_callback(); 4325517Snate@binkert.org 4335517Snate@binkert.org which should then be implemented by the subscribing object's class. 4345517Snate@binkert.org 4355517Snate@binkert.org Within a simulation callback, the triggering phase can be determined 4365517Snate@binkert.org via the IEEE 1666-2011 'sc_get_status()' function: 4375517Snate@binkert.org 4385517Snate@binkert.org void simulation_phase_callback() { 4395517Snate@binkert.org std::cout << sc_core::sc_get_status() << std::endl; 4406143Snate@binkert.org } 4415517Snate@binkert.org 4426654Snate@binkert.org A related feature is the triggering of sc_trace updates via these 4436654Snate@binkert.org simulation phase callbacks instead of the hard-coded calls in various 4446654Snate@binkert.org places of the simulation loop. This feature has to be enabled separately, 4456654Snate@binkert.org see INSTALL file. 4466654Snate@binkert.org 4476654Snate@binkert.org 4485517Snate@binkert.org - Allow creation of sc_max_time() objects before fixing the sc_time 4495517Snate@binkert.org resolution 4505517Snate@binkert.org 4515517Snate@binkert.org Currently. IEEE 1666-2011 requires that any call to 4525517Snate@binkert.org 4534762Snate@binkert.org sc_core::sc_set_time_resolution( double, sc_time_unit ) 4544762Snate@binkert.org 4554762Snate@binkert.org happens before the construction of the first non-SC_ZERO_TIME 4564762Snate@binkert.org sc_time object. 4574762Snate@binkert.org 4584762Snate@binkert.org This can be inconvenient in cases, where an "uninitialized sc_time value" 4597675Snate@binkert.org is needed, which needs to be separate from SC_ZERO_TIME in some cases. 4604762Snate@binkert.org 4614762Snate@binkert.org A relaxation of the strict sc_time construction rules wrt. to 4624762Snate@binkert.org the simulation time resolution can be optionally enabled via the 4634762Snate@binkert.org preprocessor switch SC_ENABLE_EARLY_MAXTIME_CREATION (see INSTALL). 4644382Sbinkertn@umich.edu 4654382Sbinkertn@umich.edu When this option is enabled, the creation of time objects with the 4665517Snate@binkert.org values SC_ZERO_TIME and 'sc_max_time()' are allowed before fixing the 4676654Snate@binkert.org time resolution. The resolution is still fixed once the actual 4685517Snate@binkert.org relationship between the internal time representation and the physical 4698126Sgblack@eecs.umich.edu time units (SC_FS, SC_PS, ...) is used or observed by the application. 4706654Snate@binkert.org 4717673Snate@binkert.org 4726654Snate@binkert.org 4736654Snate@binkert.org 4746654Snate@binkert.org7) Known Problems 4756654Snate@binkert.org================= 4766654Snate@binkert.org 4776654Snate@binkert.org - When building the SystemC library with QuickThreads support, the 4786654Snate@binkert.org resulting shared library is marked as requiring an executable stack 4796669Snate@binkert.org by certain compilers/assemblers (or rather not marked as not needing 4806669Snate@binkert.org one). As a result, some system security systems (like SELinux) might 4816669Snate@binkert.org refuse to load the library. As a workaround for GNU (compatible) 4826669Snate@binkert.org assemblers, pass the assembler flags variable with the option 4836669Snate@binkert.org CCASFLAGS="-Wa,--noexecstack" 4846669Snate@binkert.org to the `configure' script call before building the SystemC library. 4856654Snate@binkert.org 4867673Snate@binkert.org 4875517Snate@binkert.org - IEEE 1666-2011 does not explicitly define the behaviour in the corner 4888126Sgblack@eecs.umich.edu cases of attempting to create sc_time objects smaller than the time 4895798Snate@binkert.org resolution or bigger than sc_max_time(). This implementation currently 4907756SAli.Saidi@ARM.com truncates "small" sc_time objects to SC_ZERO_TIME, while "too big" 4917816Ssteve.reinhardt@amd.com objects wrap-around sc_max_time() and lead to a value modulo the 4925798Snate@binkert.org maximum time. In both cases, no warning is generated. 4935798Snate@binkert.org 4945517Snate@binkert.org 4955517Snate@binkert.org - The sign-extension of mixed-signedness logic expressions (&,|) 4967673Snate@binkert.org involving one sc_bigint<> operand and C++ builtin integral types 4975517Snate@binkert.org (int, short, etc.) is inconsistent between 32-bit and 64-bit 4985517Snate@binkert.org platforms in some cases. Convert both operands to sc_bigint<> first. 4997673Snate@binkert.org 5007673Snate@binkert.org 5015517Snate@binkert.org - The definition of sc_dt::(u)int64 differs from std::(u)int64_t types 5025798Snate@binkert.org on some platforms. This may lead to problems with function overloads 5035798Snate@binkert.org and/or format-string placeholders. As a workaround, convert these 5047974Sgblack@eecs.umich.edu values explicitly to the correct type before passing them to functions 5057816Ssteve.reinhardt@amd.com expecting one of these types. For sc_time, use the new nested type 5065798Snate@binkert.org sc_time::value_type to hold values of the underlying representation. 5075798Snate@binkert.org 5084762Snate@binkert.org 5094762Snate@binkert.org - Bit/logic-vector reductions (or_reduce, and_reduce, etc.) return an 5104762Snate@binkert.org 'sc_logic_value_t' enum value, instead of a bool or sc_logic (as required 5114762Snate@binkert.org by IEEE 1666-2011). Using the return value of these functions in a 5124762Snate@binkert.org boolean context, e.g. 5135517Snate@binkert.org if( lv.or_reduce() ) { /* ... */ } 5145517Snate@binkert.org might lead to wrong results in case of 'X' or 'Z' bits in the vector. 5155517Snate@binkert.org Avoid this by converting the result to an 'sc_logic' first and perform 5165517Snate@binkert.org a safe conversion to bool: 5175517Snate@binkert.org if( sc_logic( lv.or_reduce() ).to_bool() ) { /* ... */ } 5185517Snate@binkert.org 5197673Snate@binkert.org 5207673Snate@binkert.org - The use of the DEBUG_SYSTEMC macro does not work properly with certain 5217673Snate@binkert.org compilers (e.g., gcc 2.95.x) if it was not also specified when the 5225517Snate@binkert.org SystemC library was built. The problem is caused by the use of the 5235517Snate@binkert.org library compiled version of some inline methods. This problem does not 5245517Snate@binkert.org appear to be present in the gcc 3.3, Solaris, and aCC compilers. 5255517Snate@binkert.org The work-around is to specify DEBUG_SYSTEMC when the SystemC library 5265517Snate@binkert.org is built. 5275517Snate@binkert.org 5285517Snate@binkert.org 5297673Snate@binkert.org - On some recent compilers (e.g. Clang, Solaris Studio), warnings are 5307677Snate@binkert.org generated about the "hidden overloaded virtual function" bind of the 5317673Snate@binkert.org sc_port(_b) class templates in the 'specialized_signals' example. 5327673Snate@binkert.org These warnings are caused by the introduction of the virtual bind 5335517Snate@binkert.org implementation in IEEE 1666-2011. 5345517Snate@binkert.org As a workaround, check your compiler documentation how to suppress 5355517Snate@binkert.org the warning (e.g. 'CXXFLAGS=-Wno-overloaded-virtual') or mark 5365517Snate@binkert.org the SystemC include directory as "system directory" by using 5375517Snate@binkert.org '-isystem ${SYSTEMC_HOME}/include' (or equivalent) instead of 5385517Snate@binkert.org the usual '-I'. 5395517Snate@binkert.org 5407673Snate@binkert.org This also affects the TLM-2.0 sockets, see Section 9.3. 5417673Snate@binkert.org 5427673Snate@binkert.org 5435517Snate@binkert.org - Some paths in this release are longer than the historical 99 character 5445517Snate@binkert.org limit of tar archives, and several Windows archivers (e.g. WinZip) 5455517Snate@binkert.org have been reported to trip over this. The open source archiver 7-zip 5465517Snate@binkert.org (http://7-zip.org) is known to work. 5475517Snate@binkert.org 5485517Snate@binkert.org 5495517Snate@binkert.org8) Fixed-point library 5507673Snate@binkert.org====================== 5517673Snate@binkert.org 5527673Snate@binkert.orgSystemC contains a fixed-point datatypes package. 5535517Snate@binkert.org 5547675Snate@binkert.orgChanges compared to SystemC 2.0.1 5557675Snate@binkert.org 5567675Snate@binkert.org - support for explicit construction from "float" values 5577675Snate@binkert.org 5587675Snate@binkert.org - removing a conversion ambiguity by marking some constructors of 5597675Snate@binkert.org sc_fxval[_fast] classes as 'explicit' 5607675Snate@binkert.org 5617675Snate@binkert.orgCompile-time macro SC_INCLUDE_FX must be defined in order to build 5627677Snate@binkert.orgapplications that use fixed point types. You can specify a compiler 5637675Snate@binkert.orgflag, e.g., g++ -DSC_INCLUDE_FX ... or use a define statement before 5647675Snate@binkert.orgyou include systemc.h, e.g.: 5657675Snate@binkert.org 5667675Snate@binkert.org #define SC_INCLUDE_FX 5677675Snate@binkert.org #include "systemc.h" 5687675Snate@binkert.org 5697675Snate@binkert.orgDue to the large size of the fixed-point datatypes header files, 5707675Snate@binkert.orgcompilation can take considerably more time. 5717675Snate@binkert.org 5724762Snate@binkert.orgIf you want to use the fixed-point data types only (i.e., not data- 5734762Snate@binkert.orgtypes sc_int, sc_uint, sc_bigint, sc_biguint), compilation time can be 5746143Snate@binkert.orgreduced by defining compile-time macro SC_FX_EXCLUDE_OTHER (in addition 5756143Snate@binkert.orgto SC_INCLUDE_FX). 5766143Snate@binkert.org 5774762Snate@binkert.org 5784762Snate@binkert.org9) TLM Release Notes 5794762Snate@binkert.org==================== 5807756SAli.Saidi@ARM.com 5817816Ssteve.reinhardt@amd.comCONTENTS 5824762Snate@binkert.org======== 5834762Snate@binkert.org 5844762Snate@binkert.org 1) Supported SystemC versions 5855463Snate@binkert.org 2) What's changed in this kit? 5865517Snate@binkert.org 3) Known issues 5877677Snate@binkert.org 5885463Snate@binkert.org 5897756SAli.Saidi@ARM.com9.1) Supported SystemC versions 5907816Ssteve.reinhardt@amd.com=============================== 5914762Snate@binkert.org 5927677Snate@binkert.orgSystemC 2.2.0 and 2.3.x are supported and have been tested. 5934762Snate@binkert.orgSystemC 2.1.v1 is still supported in principle, but has not 5944762Snate@binkert.orgbeen tested extensively. 5956143Snate@binkert.org 5966143Snate@binkert.org 5976143Snate@binkert.org9.2) What's changed in this kit? 5984762Snate@binkert.org================================ 5994762Snate@binkert.org 6007756SAli.Saidi@ARM.comCompared to TLM 2.0.2 kit (part of SystemC 2.3.0), the following has changed: 6017816Ssteve.reinhardt@amd.com 6024762Snate@binkert.org 6034762Snate@binkert.org - The tlm_utils headers have been cleaned up to include <tlm>, 6044762Snate@binkert.org instead of <tlm.h> 6054762Snate@binkert.org 6067756SAli.Saidi@ARM.com 6077816Ssteve.reinhardt@amd.com - The convenience sockets with base-protocol NB/B conversion support 6084762Snate@binkert.org now automatically define the required SC_INCLUDE_DYNAMIC_PROCESSES, 6094762Snate@binkert.org if not already provided by the user (since the B/NB conversion 6107677Snate@binkert.org depends on the SystemC dynamic process support). 6117756SAli.Saidi@ARM.com 6127816Ssteve.reinhardt@amd.com 6137675Snate@binkert.org - Improve the NB/B conversion in the simple_target_socket to avoid 6147677Snate@binkert.org the dynamic allocation (and deletion) of sc_event instances in the 6155517Snate@binkert.org use of the spawned helper processes for the converesion. 6167675Snate@binkert.org 6177675Snate@binkert.org 6187675Snate@binkert.org - Fix a bug in the same simple_target_socket NB/B conversion thread, 6197675Snate@binkert.org where the target socket may not detect the early completion of the 6207675Snate@binkert.org response phase via a "TLM_UPDATED" return value and a "TLM_END_RESP" 6217675Snate@binkert.org phase (base protocol violation). 6227675Snate@binkert.org 6235517Snate@binkert.org 6247673Snate@binkert.org - Fix the "get_base_interface()" implementation provided by the 6255517Snate@binkert.org multi_passthrough_target_socket. Prior to this release, a 6267677Snate@binkert.org dummy interface object has been used as a return value in case 6277675Snate@binkert.org of a hierarchical bind. Return the first bound interface instead. 6287673Snate@binkert.org 6297675Snate@binkert.org 6307675Snate@binkert.org - Fixed missing initialization of some member variables in the 6317675Snate@binkert.org callback_binder_fw|bw implementations, that caused segfaults 6327673Snate@binkert.org in some cases. 6337675Snate@binkert.org 6345517Snate@binkert.org 6357675Snate@binkert.org - The implementation-defined tlm::circular_buffer class has been 6367675Snate@binkert.org updated with the following changes 6377673Snate@binkert.org - now provides a "clear()" member function to drop the current 6387675Snate@binkert.org contents, 6397675Snate@binkert.org - fix a segmentation fault due to freeing invalid memory in 6407677Snate@binkert.org "resize()", which could happen in some cases, 6417675Snate@binkert.org - work around a parsing error on some EDG-based C++ frontends. 6427675Snate@binkert.org 6437675Snate@binkert.org 6445517Snate@binkert.org - tlm_global_quantum: use sc_time::operator% 6457675Snate@binkert.org 6465517Snate@binkert.org Instead of relying on a manual remainder calculation based on 6477673Snate@binkert.org sc_time::value and the non-standard backwards conversion, the new 6485517Snate@binkert.org sc_time::operator% is used to compute the remaining time in the 6497675Snate@binkert.org current quantum (see section 3). 6507677Snate@binkert.org 6517756SAli.Saidi@ARM.com 6527816Ssteve.reinhardt@amd.com - The internal tlm_array class (to hold payload extensions) has been 6537675Snate@binkert.org reimplemented based on std::vector (fixes copy constructor bug). 6547677Snate@binkert.org 6554762Snate@binkert.org 6567674Snate@binkert.org - The TLM_VERSION_ORIGINATOR has been renamed from "ASI" to "Accellera" 6577674Snate@binkert.org to follow the naming policies of the Accellera Systems Initiative. 6587674Snate@binkert.org 6597674Snate@binkert.org 6607674Snate@binkert.org 6617674Snate@binkert.org 6627674Snate@binkert.org9.3) Known issues 6637674Snate@binkert.org================= 6647674Snate@binkert.org 6657674Snate@binkert.orga. The tlm_simple_target_socket in tlm_utils does not obey the END_REQ rule 6667674Snate@binkert.org when only an nb_ call is registered, an b_ call is being handled in the 6677674Snate@binkert.org socket and there is an nb_ call coming in at the same time. In this case 6687674Snate@binkert.org the incoming nb_ call will be forwarded to the registered nb_ call without 6697674Snate@binkert.org checking whether the earlier b_ call has passed the END_REQ timing point. 6707674Snate@binkert.org 6714762Snate@binkert.orgb. The implementation of the PEQ 'peq_with_get' in tlm_utils does not properly 6726143Snate@binkert.org distinguish between immediate notifications and delta notifications. In the 6736143Snate@binkert.org case that a immediate and delta notification happen at the same simulation 6747756SAli.Saidi@ARM.com time both types of notifications emerge from the PEQ in the same evaluation 6757816Ssteve.reinhardt@amd.com phase. This is wrong immediate notifications should overtake delta 6767674Snate@binkert.org notifications. 6777756SAli.Saidi@ARM.com 6787816Ssteve.reinhardt@amd.comc. On some recent compilers (e.g. Clang, Solaris Studio), warnings are generated 6797674Snate@binkert.org about the "hidden overloaded virtual function" bind of the sc_port(_b) 6804382Sbinkertn@umich.edu class templates when using the TLM-2.0 sockets. These warnings are caused by 6818232Snate@binkert.org the introduction of the virtual bind implementation in IEEE 1666-2011. 6828232Snate@binkert.org As a workaround in your application, check your compiler documentation how to 6838232Snate@binkert.org suppress the warning (e.g. adding the flag -Wno-overloaded-virtual), or mark 6848232Snate@binkert.org the SystemC include directory as "system directory" by using 6858232Snate@binkert.org '-isystem ${SYSTEMC_HOME}/include' (or equivalent) instead of the usual '-I'. 6866229Snate@binkert.org