Settings

Parent Previous Next

VisualSim                                                                                                                              


Settings

Following are the steps to be executed before using the SystemC interface.

  1. For Windows Platforms, this would be Visual Studio 9.0 / Visual Studio 10.0 / Visual Studio 12.0 /Visual Studio 13.0.  
  2. For Linux, this would be g++ 4.1 or higher.
  3. Update the complete path to the compiler in the VisualSim.bat (Windows) or VisualSim.sh (UNIX).  
  1. WINDOWS set VSDIR = "Compiler path" in .bat (Example :
  2. set VSDIR = C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC)
  3. LINUX/UNIX export VSDIR = "Compiler path" in .sh
All the source code must be in a directory under VS_C_Library/SystemC directory. The wrapper files are located in a new directory with the name of the model.
VisualSim ships with a version of the SystemC 2.2.0 and TLM 2.0 for both Windows and Linux.  The user can modify the SystemC and TLM Home paths in the VSConfig.Properties (Windows) and VSConfig_linux.Properties. It is always recommended to the generate SystemC.lib file to be compatible with the selected compiler.

 The following table shows the C++ types that SystemC supports and their equivalent Remote Types in VisualSim.

 

C++ Types

 

 

VisualSim RemoteTypes

 

int

int

bool

boolean

double

double

long

long

float

float

char

char

Table 1. Types and equivalent Remote Types in VisualSim

The following table shows the SystemC types and their equivalent Remote Types in VisualSim: 

 

SystemC Data Types

 

VisualSim RemoteTypes

 

sc_bit

sc_bit

sc_logic

sc_logic

sc_int

sc_int

sc_uint

sc_uint

sc_bigint

sc_bigint

sc_biguint

sc_biguint

sc_bv

sc_bv

sc_lv

sc_lv

sc_fixed

sc_fixed 

sc_ufixed

sc_ufixed

sc_fix

sc_fix

sc_ufix

sc_ufix

user structs

user structs

Table 2. SystemC types and their equivalent Remote Types in VisualSim

Batch Files for Compilation

There is a single batch file for the compile called- bin.BuildJNI.bat and BuildJNI.sh.



SystemC with Visual Studio 2013



Step by Step details for configuring SystemC interface considering Visual Studio 2013 as the compiler is given below. 

1. Download SystemC files from SystemC.org.

2. Extract the zip file.

3. Open SystemC.sln under systemc-2.2.0\msvc71\SystemC using Visual Studio 2013.

4. To Compile SystemC.lib using Visual Studio, we need to configure preprocessor definitions before building SystemC.lib. Go to Project Settings > C/C++ > Preprocessor > Preprocessor Definitions > Edit > add the following _ALLOW_KEYWORD_MACROS > Ok.

5. Keep default settings (Debug).

6. Build Solution.

7. Make sure that Build is completed without any errors.


We need to edit few files on VisualSim side

1. Open VisualSim.bat. Make sure that you have correct version of Compiler.

            Example: VSDIR=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC

2. Open VSConfig.PROPERTIES.

Update SYSTEMC_HOME path and SYSTEMC_LIBPATH. For example,

SYSTEMC_HOME=SystemC 2.2.0 path Ex: {E: \\systemc-2.2.0}

SYSTEMC_LIBPATH=Lib Path               Ex:{ E:\\Software\\systemc-2.2.0\\msvc71\\SystemC\\Debug}

SystemC 2.2.0 can be downloaded from the following location http://www.mirabilisdesign.com/new/software/doc/SystemC/systemc-2.2.0.tgz



SystemC with Visual Studio 2010


1. Download SystemC files from SystemC.org.
2. Extract files.
3. Open SystemC.sln using Visual Studio 2010.
4. Keep the default settings (Debug).
5. Build Solution.
6. Make sure that Builds are completed without any errors.

We need to modify few files on the VisualSim side

1. VSConfig.PROPERTIES
Update SYSTEMC_HOME path and SYSTEMC_LIBPATH. for example

SYSTEMC_HOME=E:\\Software\\systemc-2.3.0

SYSTEMC_LIBPATH=E:\\Software\\systemc-2.3.0\\msvc80\\SystemC\\Debug