在Zynq-7000上编程PL大致有3种方法:1.用FSBL,将bitstream集成到boot.bin中2.用U-BOOT命令3.在Linux下用xdevcfg驱动。步骤:1.去掉bitstream的文件头用FSBL烧写PLImages没有什么好说的,用XilinxSDK的CreateBootImage工具即可完成,不再赘述。用后两种方法需要把bitstream文件的文件头用bootgen工具去掉。一个典型的bif文件如下所示:the_ROM_image:{[bootloader].elf.bit.elf}bif文件可以用文本编辑器写,也可以用XilinxSDK的CreateBootImage工具生成。然后在命令行下用以下命令即可去掉bitstream文件的文件头。bootgen-image.bif-splitbin-oiBOOT.BIN"-split”参数可以生成以下文件:.bit.bin2.在U-BOOT下烧写PLImage命令”fpgaload”和”fpgaloadb”都可以。区别是前一个命令接受去掉了文件头的bitstream文件,后一个命令接受含有文件头的bitstream文件。在OSL2014.2上,缺省编译就可以完整支持写入PLImage的功能。但是在Petalinux2013.10下,尽管可以在U-BOOT下看到命令”fpga”,还需要在文件/subsystems/linux/configs/u-boot/platform-top.h中增加以下内容后重新编译才可以支持具体的功能。/*EnablethePLtobedownloaded*/#defineCONFIG_FPGA#defineCONFIG_FPGA_XILINX#defineCONFIG_FPGA_ZYNQPL#defineCONFIG_CMD_FPGA#defineCONFIG_FPGA_LOADFS在OSL2014.2U-BOOT中,具体的功能是在zynqpl.c的zynq_load()中实现的。3.在Linux下烧写PLImageOSLLinux2014.2.01中已经含有xdevcfg驱动了(之前就有,不过本文是在这个版本上验证的),直接用以下命令就可以完成PLImage写入。cat/.bit.bin>/dev/xdevcfgLinux驱动的源代码在xilinx_devcfg.c中。因为驱动的编号是通过alloc_chrdev_region()动态分配的,所以不需要手工用mknod命令手动建立设备节点。在Linux驱动中,每次往DevCfg中写入4096字节,直到全部写完。4.在用户程序中烧写PLImage目前没有现成的源码来完成这个功能,不过可以用mmap()把DevCfg的寄存器映射到用户程序的虚地址中,然后参考一些现成的软件代码来完成这个功能:*FSBL中的pcap.c*U-BOOT中的zynqpl.c*Linux中的xilinx_devcfg.c*XilinxSDK中的例子。例子位于以下位置,随SDK的版本会有变化。C:\Xilinx\SDK\2014.1\data\embeddedsw\XilinxProcessorIPLib\drivers\devcfg_v3_0\examples\index.html小结:DevCfg外设内部有自己的DMA,只需要简单的配置PLImage的基地址和长度到DevCfg寄存器,就可以完成Zynq-7000PLImage的加载。Xilinx已经提供了灵活的解决方案,如果开发者要把这个功能集成在自己的应用程序中,也有很多的代码可以参考,并不是很困难的任务。
答案:想让嵌入式设备卡死的操作方法是,把嵌入式设备安装在预备卡槽上,双手两边共同使劲按压到位,还可以安装螺丝固定。
Now in the society, increasingly informatization of computer and network has penetrated into every corner of everyday life. With the improvement of microprocessor technology, application of the embedded system more widely. Embedded operating system PetaLogix company for PetaLinux as the chip system FPGA embedded Linux development kit, and to meet application engineering logic programming ability and for embedded Linux requirements while its offer many reference design can greatly shorten the development cycle.。
This paper is focused on the PetaLinux and transplantation methods and on the basis of the WEB server development. Starting from the study of embedded system, discusses the comparison of several embedded operation system, this paper introduces the characteristics of PetaLinux operating system, detail the Linux operating system and PetaLinux PC operating system in the installation process.。
Based on PetaLinux operating system is analyzed and discussed, finally came true PetaLinux in development board transplantation. PetaLinux transplantation includes guide loading procedures, PetaLinux kernel file system and three parts. In the development of carrying a PetaLinux board, complete WEB server configuration, in a configuration good BOA, development and realize the dynamic WEB information network transmission. Based on the need to develop specific application fraud, only need to increase related content business .。
在Zynq-7000上编程PL大致有3种方法:
1. 用FSBL,将bitstream集成到boot.bin中。
2. 用U-BOOT命令
3. 在Linux下用xdevcfg驱动。
步骤:
1. 去掉bitstream的文件头。
用FSBL烧写PL Images没有什么好说的,用Xilinx SDK的Create Boot Image工具即可完成,不再赘述。用后两种方法需要把bitstream文件的文件头用bootgen工具去掉。
一个典型的bif文件如下所示:
the_ROM_image:
[bootloader]<fsbl_name>.elf。
<pl_bitstream_name>.bit。
<u-boot_name>.elf。
bif文件可以用文本编辑器写,也可以用Xilinx SDK的Create Boot Image工具生成。然后在命令行下用以下命令即可去掉bitstream文件的文件头。
bootgen -image <bootimage>.bif -split bin -o i BOOT.BIN。
"-split”参数可以生成以下文件:
<pl_bitstream_name>.bit.bin。
2. 在U-BOOT下烧写PL Image。
命令”fpga load”和”fpga loadb”都可以。区别是前一个命令接受去掉了文件头的bitstream文件,后一个命令接受含有文件头的bitstream文件。
在OSL 2014.2上,缺省编译就可以完整支持写入PL Image的功能。但是在Petalinux 2013.10下,尽管可以在U-BOOT下看到命令”fpga”,还需要在文件。
<PROJ>/subsystems/linux/configs/u-boot/platform-top.h 中增加以下内容后重新编译才可以支持具体的功能。
/* Enable the PL to be downloaded */。
#define CONFIG_FPGA。
#define CONFIG_FPGA_XILINX。
#define CONFIG_FPGA_ZYNQPL。
#define CONFIG_CMD_FPGA。
#define CONFIG_FPGA_LOADFS。
在OSL 2014.2 U-BOOT中,具体的功能是在zynqpl.c的zynq_load()中实现的。
3. 在Linux下烧写PL Image。
OSL Linux 2014.2.01中已经含有xdevcfg驱动了(之前就有,不过本文是在这个版本上验证的),直接用以下命令就可以完成PL Image写入。
cat <path_to_storage_media>/<pl_bitstream_name>.bit.bin > /dev/xdevcfg。
Linux驱动的源代码在xilinx_devcfg.c中。因为驱动的编号是通过alloc_chrdev_region()动态分配的,所以不需要手工用mknod命令手动建立设备节点。
在Linux驱动中,每次往DevCfg中写入4096字节,直到全部写完。
4. 在用户程序中烧写PL Image。
目前没有现成的源码来完成这个功能,不过可以用mmap()把DevCfg的寄存器映射到用户程序的虚地址中,然后参考一些现成的软件代码来完成这个功能:
* FSBL中的pcap.c。
* U-BOOT中的zynqpl.c。
* Linux中的xilinx_devcfg.c。
* Xilinx SDK中的例子。例子位于以下位置,随SDK的版本会有变化。
C:\Xilinx\SDK\2014.1\data\embeddedsw\XilinxProcessorIPLib\drivers\devcfg_v3_0\examples\index.html。
小结:
DevCfg外设内部有自己的DMA,只需要简单的配置PL Image的基地址和长度到DevCfg寄存器,就可以完成Zynq-7000 PL Image的加载。Xilinx已经提供了灵活的解决方案,如果开发者要把这个功能集成在自己的应用程序中,也有很多的代码可以参考,并不是很困难的任务。