动手小记
Oct
9
问题:在EDK中为某个Project设置的Optimize Level都只针对这个Project下的C,而Library都默认以-O2编译。这对调试的情况有一些不便。怎样设置让LibGen以-O0编译库?
解决:Platform Settings --> Software Platform --> Microblaze_0 --> extra compiler flags = -g -O0 ".
解决:Platform Settings --> Software Platform --> Microblaze_0 --> extra compiler flags = -g -O0 ".
Oct
7
先来看Xilinx的两个Answer Record:
AR #31256 - 10.1 EDK - How to add a user software library in a project?
AR #29926 - 10.1 EDK - How can I create a user library in SDK?
一个说怎么用,一个说怎么做,看似很好,但是那个说怎么做的基本上等于没说。
于是找到另一个教程:Creating a shared and static library with the gnu compiler (gcc)
于是在SDK里实现的基本过程就变成:
1. 在SDK中首先需要把原来的程序调试成功,能得到正确的elf文件
2. 把SDK_projects\\Debug 目录中的.o文件都copy到另一个文件夹
3. 打开edk shell,用命令mb-ar -rcs libuser.a xx.o xx.o xx.o 把所有的.o文件集合为.a文件
4. 删除原来的.c文件
5. 在SDK的project properities中设置library的名字=user,并添加路径
6. 重新编译工程
[更多资料]
http://www.dwheeler.com/program-library/Program-Li...
AR #31256 - 10.1 EDK - How to add a user software library in a project?
AR #29926 - 10.1 EDK - How can I create a user library in SDK?
一个说怎么用,一个说怎么做,看似很好,但是那个说怎么做的基本上等于没说。
于是找到另一个教程:Creating a shared and static library with the gnu compiler (gcc)
于是在SDK里实现的基本过程就变成:
1. 在SDK中首先需要把原来的程序调试成功,能得到正确的elf文件
2. 把SDK_projects\
3. 打开edk shell,用命令mb-ar -rcs libuser.a xx.o xx.o xx.o 把所有的.o文件集合为.a文件
4. 删除原来的.c文件
5. 在SDK的project properities中设置library的名字=user,并添加路径
6. 重新编译工程
[更多资料]
http://www.dwheeler.com/program-library/Program-Li...
Sep
2
[2008.08.04]
同时使用EDK和Sysgen,有两种流程:
1、在Sysgen中做hw co-sim;
2、用Sysgen生成pcore然后手动添加到EDK工程中。
参考文档:
- Sysgen User Guide --> Hardware/Software Co-Design --> Design with Embedded Processors and Microcontrollers
- API Documents (在生成PCORE的src目录中)
同时使用EDK和Sysgen,有两种流程:
1、在Sysgen中做hw co-sim;
2、用Sysgen生成pcore然后手动添加到EDK工程中。
参考文档:
- Sysgen User Guide --> Hardware/Software Co-Design --> Design with Embedded Processors and Microcontrollers
- API Documents (在生成PCORE的src目录中)
Sep
2
[2008.01.11]
一直没有做成功Profile,原来输在最后一步上。
Profile的主要流程如下:
1. 在硬件中添加用于Profile的timer。方便的方法是在做BSB的时候直接添上,那么中断控制器INTC也就自动连上了。
2. 在Software Platform Settings中设置OS and Libraries --> Enable SW instructive profiling = True --> Profile time
3. 打开SDK,设置project的版本属性为Profile(不是Debug和Release):右键Project --> Properities --> C/C++ Build --> Configuration = Profile
4. 设置Download ELF为Profile的ELF:Device Configuration --> Program Hardware Settings --> ELF in Profile folder
5. Run Profile: Run --> Run... --> New --> C/C++ Application = Profile/executable.elf --> Profiler --> Enable Profiling --> Scratch Memory Address = Free Memory
按OK后SDK开始Profile。但是有时候会停在%XMD %XMD,Progress一直显示在80% -- 此时按一下回车就可以了
问题
在ISE 9.2自带的edk_prof.pdf中说在SDK的project中也要设置允许interrupt。但是我没有在main program中打开Interrupt Enable,为什么也能成功?
[2008.09.02]
一篇新发布的White Paper - WP348 MicroBlaze System Performance Tuning
http://www.xilinx.com/support/documentation/white_...
从一个实例开始讲述如何检查系统瓶颈,如何用Profile工具查看,如何解决问题。
FPGA系统不是通常的系统,它最大的优势是可以用硬件加速软件计算。
[参考资料]
EDK Profiling User Guide -\EDK\doc\usenglish\edk_prof.pdf
一直没有做成功Profile,原来输在最后一步上。
Profile的主要流程如下:
1. 在硬件中添加用于Profile的timer。方便的方法是在做BSB的时候直接添上,那么中断控制器INTC也就自动连上了。
2. 在Software Platform Settings中设置OS and Libraries --> Enable SW instructive profiling = True --> Profile time
3. 打开SDK,设置project的版本属性为Profile(不是Debug和Release):右键Project --> Properities --> C/C++ Build --> Configuration = Profile
4. 设置Download ELF为Profile的ELF:Device Configuration --> Program Hardware Settings --> ELF in Profile folder
5. Run Profile: Run --> Run... --> New --> C/C++ Application = Profile/executable.elf --> Profiler --> Enable Profiling --> Scratch Memory Address = Free Memory
按OK后SDK开始Profile。但是有时候会停在%XMD %XMD,Progress一直显示在80% -- 此时按一下回车就可以了
问题
在ISE 9.2自带的edk_prof.pdf中说在SDK的project中也要设置允许interrupt。但是我没有在main program中打开Interrupt Enable,为什么也能成功?
[2008.09.02]
一篇新发布的White Paper - WP348 MicroBlaze System Performance Tuning
http://www.xilinx.com/support/documentation/white_...
从一个实例开始讲述如何检查系统瓶颈,如何用Profile工具查看,如何解决问题。
FPGA系统不是通常的系统,它最大的优势是可以用硬件加速软件计算。
[参考资料]
EDK Profiling User Guide -
Aug
28
通常一个嵌入式系统总有分硬件工程师和软件工程师。
在FPGA上,生成bitstream之前的工作被认为是硬件的,开发C代码被认为是软件的。
如果硬件工程师做完了,要把硬件平台交给软件工程师使用的话,首先他当然可以把整个工程打包给软件工程师,但是除了这种做法外,还有更简单的做法,以下就是交付软件工程师必要的文件列表:
这是最精简的组合了。
如果用XPS打开xmp工程,会显示XPS新建了pcores目录,并拷贝了两个文件:
etc/bitgen.ut
etc/fast_runtime.opt
之后,软件工程师点击工具栏的SDK图标就可以开始开发软件拉。
在FPGA上,生成bitstream之前的工作被认为是硬件的,开发C代码被认为是软件的。
如果硬件工程师做完了,要把硬件平台交给软件工程师使用的话,首先他当然可以把整个工程打包给软件工程师,但是除了这种做法外,还有更简单的做法,以下就是交付软件工程师必要的文件列表:
引用
system.xmp -- 工程文件
system.mhs -- 硬件描述
system.mss -- 软件描述
implementation/system.bit --硬件bit文件
implementation/system_bd.bmm --BRAM的memory map
etc/download.cmd -- 描述JTAG链信息
system.mhs -- 硬件描述
system.mss -- 软件描述
implementation/system.bit --硬件bit文件
implementation/system_bd.bmm --BRAM的memory map
etc/download.cmd -- 描述JTAG链信息
这是最精简的组合了。
如果用XPS打开xmp工程,会显示XPS新建了pcores目录,并拷贝了两个文件:
etc/bitgen.ut
etc/fast_runtime.opt
之后,软件工程师点击工具栏的SDK图标就可以开始开发软件拉。







