Settings
Following are the steps to be executed before using the SystemC interface.
The following table shows the C++ types that SystemC supports and their equivalent Remote Types in VisualSim.
Table 1. Types and equivalent Remote Types in VisualSim
The following table shows the SystemC types and their equivalent Remote Types in VisualSim:
|
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
There is a single batch file for the compile called- bin.BuildJNI.bat and BuildJNI.sh.
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