The following text was included in a README file as part of the MS 
VC++ port.  In it, Robert Clark discusses some of the changes he
made.

--

This Microsoft Visual C++ .Net 2003 (7.1) port was contributed by:

Robert A. Clark
Parama Networks Inc.

rac@paramanet.com
Last modification: 2003.07.29 @ 11:23


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

This README.parama file documents the port of SCV1.0B3 to Microsoft
Visual C++ .Net 2003, that 
I made to the source, and environment. This
release of the Visual C++ environment is also 
referred to as "Visual
C++ 7.0".

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

I used the cpp MACRO "_MSC_VER" over "WIN32", to delineate the MSVC
environment. 
This also helps in finding code that is specific to
Visual C++ as opposed 
to "__CYGWIN32__". In other words a grep of
WIN32, will return only the 
Cygwin ifdef's in the source tree.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The following "User variables" need to be set:
$(SYSTEMC)
$(PTHREADS)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The output libraries cudd.lib, dddmp.lib, mtr.lib, obj.lib, scv.lib,
st.lib, and util.lib 
are stored in the msvc70\Debug directory.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

MSVC compiler warnings: I did not correct the warnings that were
generated by the compiler. 
The warnings should be reviewed. I did not
create solutions for the SCV examples.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The following folders are supplied with the SCV kit, but apparently are
not used, 
and will not be included in the MSVC solution: mnemosyne,
nanotrav, and sis.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

In the next section I will detail the changes that I made to each
folder.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

src/scv:
In the source file scv_random.cpp, there is a call to a function
called "rand_r". 
This function is not part of the MSVC release. I used
the 
"PTHREADS-WIN32 SNAPSHOT 2003-05-10" package available from

http://sources.redhat.com/pub/pthreads-win32


In the source file scv_init_seed.cpp, I had to modify the way the seed
is initialized.


The scv_config.h is stored in this directory, to match the
"scv/scv_config.h" 
include in the various SCV source files. This
should not conflict with the file 
created by configure in the UNIX
environment.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

src/cudd/2.3.0/util:
The getopt.c file is excluded from the build.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

All test*.cc files are excluded from the build.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

${SYSTEMC}/include/systemc/datatypes/int/sc_nbdefs.h


There was a iostream bug in M$ Visual C++ 6.0 that has been fixed in

M$ Visual C++ .NET 2003, which is encoded as (_MSC_VER = 1300).  
My
change below is based on the systemc2.0.1 release. 
Can you add this to
the 2.1 release.


The #if statement:
#if defined( _MSC_VER )
was changed to:

#if ( _MSC_VER < 1300 )


Here is the code fragment from sc_nbdefs.h:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


#if ( _MSC_VER < 1300 )

// VC++6 bug

ostream& operator << ( ostream&, int64 );

ostream& operator << ( ostream&, uint64 );

#endif
} 
// namespace sc_dt


#if ( _MSC_VER < 1300 )


inline

ostream&

operator << ( ostream& os, sc_dt::int64 a )
{
    sc_dt::operator << ( os, a );
    
    return os;
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

# Local Variables:

# mode: text

# End:

--

The following file was also included as part of the VC++ port.  In it,
Robert Clark is providing directions for local users of his ported code.

--

2003.07.28

This folder contains SystemC-2.0.1 release, the SystemC 2.1 beta release, 
and the SystemC Verification 1.0-Beta3 add on code. The solution files
for the libraies and examples will be found in the folder called "msvc70".
The source files are not stored in this folder.

You will need to complete the following steps in order to use the tools in this
folder.

o - Copy contents of this folder to your PC. I use c:\tools\SystemC_SCV
o - Install Visual C++ .NET 2003 (MSVC++ 7.1); Get the disk from Murari or Stephen.
o - Set the 3 environment variables that are shown below.


Environment Variables (assuming that you copy to same folder on your machine):
PTHREADS C:\tools\SystemC_SCV\lib\PTHREADS\Pre-built
SCV      C:\tools\SystemC_SCV\scv-01.00-b003\src
SYSTEMC  C:\tools\SystemC_SCV\systemc-2.1beta\src


The SCV libraries and examples were compiled with the SystemC2.1 beta release.
If you are having difficulty with the 2.1 Beta release, you can switch back, by 
defining SYSTEMC as:

SYSTEMC  C:\tools\SystemC_SCV\systemc2.0.1\src 
You will need to re-compile SystemC2.0.1 and SCV before you can use them.

How to set the Environment Variables:
My Computer->Properties->Advanced->Environment Variables
In this window, select "New" under the "user variables for xxx".
Where xxx is your login.


Installing MSVC++ 7.1:
o - Install the DVD on Ganges, and open \\ganges\DVDROM
o - Follows steps 1-4, and skip the WEB server install.
o - Start the application, and select "Visual c++" as the Profile.

The above takes over an hour to complete.


Creating your own solution:

You will need to set the following MSVC settings after you create
a new "blank" solution within a VC++ project "Win32 Console Project".
After creating a ".cpp" file, you will need to set the following
for "All configurations". Right click on your solution, and select
Properties. Now set All configuration under "Configuration:"

Under C/C++ additions include directories enter the following:
"$(SYSTEMC)";"$(SCV)";"$(PTHREADS)\include"

Under C/C++ General:
Detect 64-bit Potability Issues		No

Under C/C++ Language:
Enable Run-Time Type Info		Yes

Under C/C++ Precompiled Headers:
Create/Use Precompiled Header		Not Using Precompiled Headers

You will now need to add the libraries. Do this by right clicking on
the solution and selecting Add->Add Existing Item...
Navigate to the systemc-2.1beta/msvc70/Debug, and select the systemc.lib file.
If you are using the SCV libraries, you will need to navigate to the
scv-01.00-b003\msvc70\Debug folder and select all of the .lib files namely:
cudd.lib
dddmp.lib
mtr.lib
obj.lib
scv.lib
st.lib
util.lib


Thanks to Wiener and Stephen for their help in the setup and
debug of SCV. If you have a question about the above, they should
be able to help you.

I hope to improve the environment over time.

Robert A. Clark

