原创 【转】SystemC 2.1在Visual Studio 2005下使用

2010-11-19 18:00 1508 4 4 分类: FPGA/CPLD

SystemC 2.1目前能在Visual Studio .NET 2003的环境下开发,移植到Visual Studio 2005之后会出现一些小问题。经研究,我们需要改动一些参数。


步骤一:编译SystemC库
1.下载SystemC library source code 到http://www.systemc.org注册会员账号后,即可下载SystemC library soure code
2.以下SystemC 2.1 v1为例,下载的文件名为systemc-2.1.v1.tgz,解压缩到c:systemc-2.1.v1下
3.使用Visual Studio 2005打开C:systemc-2.1.v1msvc71SystemCSystemC.sln,会提示转换版本,点击OK。
4.将Compile mode调到Debug Build -> Compilation Manager... 将Active Solution Configuration改成Debug (虽然可调成Release mode做compile,但开发AP时,若将library path指向Release目录,将无法执行Simulation,原因不明。)
5.编译Library Build -> Build Solution (项目属性中c/c++ -> 高级,可以设置禁用4996警告) SystemC.lib将产生在c:systemc-2.1.v1msvc71SystemCDebug下


步骤二:更新SystemC include file 和 library
1. Select Tools -> Options . . . and the Projects -> VC++ Directories tab 2. Select show directories for: Library files
3. Select the 'New' icon and browse to: c:systemc-2.1.v1msvc71systemcdebug
4. Select show directories for: Include files
5. Select the 'New' icon and browse to: c:systemc-2.1.v1src


步骤三:创建SystemC应用程序
1. Start Visual Studio. From the Start Page select New Project and Win32 Console Project. Type the project name and select a suitable location then click OK.
2. Select the Application Settings page of the Win32 Application Wizard and make sure the 'Empty project' box is ticked. Click 'Finish' to complete the wizard. 3. Add new/existing C++ files to the project and edit code.
4. Display the project Property Pages by selecting 'Properties...' from the Project menu. 5. C/C++ -> General properties Warning level= Level 1(/W1)
6. C/C++ -> Code Generation Runtime Library =Multi-thread Debug (/MTd)
7. C/C++ -> Command Line properties Additional Options = /vmg /D_CRT_SECURE_NO_DEPRECATE
8. Linker -> Input properties Additional Dependiences = systemc.lib
9. Click OK


文章评论0条评论)

登录后参与讨论
我要评论
0
4
关闭 站长推荐上一条 /2 下一条