Chinaunix首页 | 论坛 | 博客

  • 博客访问: 480539
  • 博文数量: 86
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 878
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-06 14:11
文章分类

全部博文(86)

文章存档

2010年(12)

2009年(60)

2008年(14)

我的朋友

分类: C/C++

2009-07-27 10:06:56

 How to new a fc++ supported SystemC project in VS2003
Firstly, make sure that the compiler and linker can find the SystemC header and library files respectively.
1. Set an environment variable pointing to the SystemC install path:
2. In VS2003, Select Tools -> Options . . . and the Projects -> VC++ Directories tab
2. Select show directories for: Library files
3. Select the 'New' icon and enter: $(SYSTEMC)\SystemC\Debug
4. Select show directories for: Include files
5. Select the 'New' icon and enter:
 $(SYSTEMC)\..\src1. Creating SystemC Applications
 
Then, create SystemC Applications
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. From the C/C++ tab, select the General properties and set 'Detect 64-bit Portability Issues' to No
6. From the C/C++ tab, select the Language properties and set 'Enable Run-Time Type Info' to Yes
7. From the C/C++ tab, select the Command Line properties and add /vmg to the 'Additional Options:' box.
8. From the Linker tab, select the Input properties and type 'systemc.lib' in the 'Additional Dependencies' box.
9. Click OK
 
Then, add fcpp support
1. Download fc++.exe (v0.4) from
2. Copy it to the root folder of your project.
3. Write a bat file as follow:
del /Q src\.output.${project name}\*
fc++ src/${project name}.equation
pause
Then, write the layers and mixins in folder src
1. New main.cpp and ${project name}.equation under src, the #include in main.cpp should as follow:
#include ".output.fft\top.h"
2. Establish folders under src, the folders should correspond to the layers
3. Organize the files to a same structure in the VS2003 project as the folders under src; note that this IDE won’t automatically structure the files of the project as the file directory, you should do it yourself.

4. Run the bat file every time you make any change to the source file or the equation file
5. Then re-compile the project.
6. Were you think running the bat file every time before compiling is tedious, you can write a pre-generation event to run the bat automatically.
 
阅读(1375) | 评论(0) | 转发(0) |
0

上一篇:SimpleScaclar的安装

下一篇:SimpleScalar分析

给主人留下些什么吧!~~