Compiling SystemC 2.3.0
Using Visual C++ version 2012: set preprocessor option:
_ALLOW_KEYWORD_MACROS, otherwise SystemC model does not compile
The SystemC library needs to be rebuilt. Downloaded SystemC 2.3.0. Upgraded (non-reversable, with warnings) to Visual 2012. Also need to set
See also Microsoft website: Breaking Changes in Visual C++.
On this advice I modified line 162 of C:systemc-2.3.0srcsyscpackagesboostconfigcompilervisualc.hpp. Changed it to 1700 i.s.o. 1600 due to Visual C++ 2012.
Also added preprocessor option
_CRT_SECURE_NO_WARNINGS and commandline option
/vmg. The first is already present in TU/e project settings.
Simple SystemC test application
I managed to compile and run the trial SystemC project with 2012 from link above. It generated a .vcd file on tinako.
Need to find SystemC of course: add to C/C++ Code Generation / Additional Include Directories
C:SystemC-2.3.0src and to Linker / Additional Library Directories
Besides, use static libraries: Runtime Library
Multi-threaded Debug (/MTd)
Haven’t tried DLL, but it is default in TU/e Visual C++ 2010 settings
Needed to compile/install ‘gtkwave‘ under cygwin, and also ‘xz‘. Both done under download folder.
However, I have disabled xz in gtkwave for now: # ./configure –disable-xz
Should fix that, to keep vcd files small, I guess.
After installing X-windows under Cygwin (packages xinit, xorg-server, …) gtkwave runs fine.
See cygwin/X for the instructions running XWindows. There’s a difference in using ‘startx’ and ‘startxwin’.
Question: what about Xming? Same or different Xservers?
Now building the Lab1 exercise works fine. With the settings as mentioned above.
Warning: Simulation generates
mips_ram.dump, but it fails to generate it silently if that file happens to be opened.
Maybe the happens with
Few things which may need to be fixed in the SystemC MIPS model, this is the output produced by a simulator:
Info: (I804) /IEEE_Std_1666/deprecated: sc_sensitive_pos is deprecated use sc_sensitive << with pos() instead
Info: (I804) /IEEE_Std_1666/deprecated:
sc_clock(const char*, double, double, double, bool)
is deprecated use a form that includes sc_time or
WARNING: Default time step is used for VCD tracing.
Info: (I804) /IEEE_Std_1666/deprecated: You can turn off warnings about
IEEE 1666 deprecated features by placing this method call as the
first statement in your sc_main() function:
Compilation of MIPS models fails, also after removing
sc_cycle, which are deprecated since SystemC 2.2
See for instance hints from uWaterloo.
Error 1 error : The OutputPath property is not set for project 'mMIPS.vcxproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='Win32'. This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform. C:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.Targets 609 5 mMIPS
Instead of using the Debug configuration I moved to Release. This does not give above error. Mind you that VC only build with matching configurations so I had to build a Release version of SystemC.
sc_report_handler::set_actions("/IEEE_Std_1666/deprecated", SC_DO_NOTHING); as first line in
Still one error left, need to patch the RAM model:
Error: (E115) sc_signal
testbench.signal_5' (sc_signal)testbench.dmem.write' (sc_method_process)
second driver `testbench.dmem.read' (sc_method_process)
In file: ....srcsysccommunicationsc_signal.cpp:73
In process: testbench.dmem.read @ 825 ns
The RAM model has drivers for the wait signal both in the read and write process.
I removed one. Code 1.c runs fine now.
Synthesis has to wait, no Cocentric license available anymore.