SystemC Modeling Library 2.8.0
==============================

Test Results
++++++++++++

The SystemC Modeling Library 2.8.0 has been tested with the GNU C++
compiler version 9.2.0-64 and 7.3-64 on
     
  1. CentOS 7.3
     CentOS 8.2
  2. RedHat 7.3
  3. Suse 12.4
     Suse 15.3
  4. Ubuntu 16.04
     Ubuntu 18.04
     Ubuntu 20.04
  5. AlmaLinux 8.4
  6. Rocky 8.4

and MSVC-14.2-64, MSVC-14.29-64 compiler on

  1. Windows Server 2016
  2. Windows Server 2019
  3. Windows Server 2022
  4. Windows 10
  5. Windows 11

Dependencies
++++++++++++

SystemC Modeling Library (Memory and Bitfields) 2.8.0 depends on

  1. SystemC 2.3.2, 2.3.3
  2. OSCI TLM 2.0

NOTE SystemC 2.3.2 and above already contains TLM 2.0

These can be obtained from http://www.accellera.org/

Linux Installation
++++++++++++++++++

  1. Change to the top level directory (scml-2.8.0)


  2. Create a temporary directory, e.g.,

        > mkdir objdir

  3. Change to the temporary directory, e.g.,

        > cd objdir

  4. Set the following environment variable(s):

     For gcc compilers on Linux:

        > setenv CXX g++

  5. Configure the package for your system, e.g.,

        > ../configure --with-systemc=<path_to_SystemC> 

     If you do not specify the path to a SystemC installation, configure will 
     look in ../systemc. 
        
        > ../configure --with-systemc=/usr/local/systemc-2.3.3

     
     If you do specify the path, use an absolute path (one starting with "/"),
     and do not use wildcards.

     By default the package will be installed in the top level (scml-2.8.0)
     directory.

     If you want to install the package elsewhere, use the --prefix option,
     e.g., 

        > ../configure --prefix=/usr/local/scml \
                       --with-systemc=/usr/local/systemc-2.3.3

        Note: make sure you have created the target directory before installing
              the package.

        
  6. Compile and install the package.

        > gmake install


Note for developers: 
 
  The 'configure' script makes use of the
  GNU auto-tools `aclocal', `automake', and `autoconf'.
  Versions of auto-tools used:
    autoconf (GNU Autoconf) 2.59
    automake (GNU automake) 1.9.6
    aclocal (GNU automake) 1.9.6

  If you change something in configure.in, execute
   aclocal
   autoconf
   automake
   to regenerate the 'configure' script and Makefile.in files.

   
Windows Installation
++++++++++++++++++++

  1. Change to the top level directory (scml-2.8.0)

  2. Copy files:
     either execute msvc12\copy_headers.bat or
     copy
     msvc12\scml2.h to src\scml2 directory
     msvc12\scml2_logging.h to src\scml2_logging directory
     msvc12\scml2_base.h to src\scml2_base directory
     msvc12\scml2_objects.h to src\scml2_objects directory
     msvc12\scml2_tlm2.h to src\scml2_tlm2 directory
     move 
     scml2_protocol_engines\clock\*.h to scml2_protocol_engines\clock\include directory
     scml2_protocol_engines\reset\*.h to scml2_protocol_engines\reset\include directory
     scml2_protocol_engines\pin\*.h to scml2_protocol_engines\pin\include directory
     scml2_protocol_engines\interrupt\*.h to scml2_protocol_engines\interrupt\include directory
     scml2_protocol_engines\tlm2_ft_common\*.h to scml2_protocol_engines\tlm2_ft_common\include directory
     scml2_protocol_engines\tlm2_ft_initiator_port\*.h to scml2_protocol_engines\tlm2_ft_initiator_port\include directory
     scml2_protocol_engines\tlm2_ft_target_port\*.h to scml2_protocol_engines\tlm2_ft_target_port\include directory

  3. Set SYSTEMC environment variable to point to the installation
     of SystemC e.g.,
       SYSTEMC=C:\apps\systemc-2.3.3\msvc<num>

  4. Compile scml2.lib, ModelingObjects.lib, scml2_logging.lib, scml_clock.lib,
     scml2_base.lib, scml2_objects.lib, scml2_tlm2.lib and common scml.lib libraries.
     Change to the msvc12/scml directory and
     double-click on 'scml.sln' to launch Visual C++ and select 
        'Build Solution' under the Build menu to build all libraries.
        Exit Visual C++.
        
  5. Set SCML environment variable to point to the installation location, e.g.,
       SCML=C:\apps\scml-2.8.0\msvc12

  NOTE By default the project files build MultiThreadedDLL and 
       MultiThreadedDebugDLL runtime libraries.
       Make sure the libraries are compatible with your SystemC library.
  NOTE Project files expect the systemc.lib under $(SYSTEMC)\SystemC\Debug or
       $(SYSTEMC)\SystemC\Release.
       Make sure the path is correct, if not, adjust the library path to the
       actual location of the systemc.lib 
       e.g.: $(SYSTEMC)\SystemC\x64\Debug or $(SYSTEMC)\SystemC\x64\Release.

Creating Windows Applications
-----------------------------

When creating your own application you need to specify
  1. Additional Include Directories : 
    $(SCML)../src/ModelingObjects
    $(SCML)../src/ModelingObjects/scmlinc
    $(SCML)../src/scml2
    $(SCML)../src/scml2_logging
    $(SCML)../src/scml2_base
    $(SCML)../src/scml2_objects
    $(SCML)../src/scml2_tlm2
    $(SCML)../src/scml_clock
    $(SCML)../src/PV
    $(SCML)../src/scml2_protocol_engines/tlm2_ft_target_port/include
    $(SCML)../src/scml2_protocol_engines/tlm2_ft_initiator_port/include

    depending on which include files you use.

  2. Additional Library Directories
     $(SCML)\scml\Debug
     or 
     $(SCML)\scml\Release

  3. Additional Dependencies
     ModelingObjects.lib
     scml2.lib
     scml2_logging.lib
     scml2_base.lib
     scml2_objects.lib
     scml2_tlm2.lib
     scml_clock.lib
     or
     scml.lib (contains all libraries above)

     depending on which libraries you want to link in.

