Note: This tutorial works with Cygwin 1.5.25-15 and SystemC 2.2.0.
Installing Cygwin
Hop over to cygwin's website and follow the installation procedure. I would recommend to do a full installation.
Installing SystemC
SystemC's class library and event based simulator can be downloaded from the SystemC.org website. You need to create a login before you can download the files.
Type:
export CXX g++
export CC gcc
I used the following procedure to install it:
- Download systemc-2.2.0.tgz and write to a suitable location
- Unzip the file using tar zxvf systemc-2.2.0.tgz
- Navigate to the systemc-2.2.0 directory
- Create a subdirectory as per the INSTALL file called objdir
- Navigate to the objdir directory
- create the destination directory mkdir /usr/local/systemc-2.2
- Execute ../configure --prefix=/usr/local/systemc-2.2
- Modify the default stack size SC_DEFAULT_STACK_SIZE which you can find in
/systemc-2.2.0/src/sysc/kernel/sc_constants.h from 0x10000 to 0x50000
Line 57: const int SC_DEFAULT_STACK_SIZE = 0x50000;
- Build systemc using make pthreads
- Install systemc using make install
- Check the installation using make pthreads_check, you might get the following error:
/usr/local/systemc-2.2/include/systemc.h:175: error: `std::wctomb' has not been declared
/usr/local/systemc-2.2/include/systemc.h:177: error: `std::wcstombs' has not been declared
- If this is the case then open /usr/local/systemc-2.2/include/systemc.h and commend out the 2 lines as shown below:
Line 175: // using std::wctomb;
Line 176: using std::mbstowcs;
Line 177: // using std::wcstombs;
- re-run make pthreads_check and all tests should pass
Comments