基于嵌入式Linux的可自重构片上系统(3)
Standard Linux tools can also be used for bitstream compression:
$ gunzip –c bitstream.gzip > /dev/icap
基于嵌入式Linux的可自重构片上系统
#!/bin/sh
for i in “1 2 3 4 5”; do
wget –O /dev/fpga${i} / bitfile${i}.bit done;
Figure 3. Shell script to automatically retrieve remote bitstreams and configure FPGAs
Extending the filter coefficient example from before:
$ gunzip –c bitstream.gzip |
set_coeffs 0.1 0.4 0.4 0.1 > /dev/icap
These examples show how complex operations may be performed by chaining multiple tools and utilities.
C. Networking and remote bitstream servers
We may easily leverage the other benefits of using a proper operating system – for example seamless integration of networking services. The “wget” command issues HTTP and FTP requests to remote servers. The following one-liner requests a bitstream (“partial.bit”) from a remote server ( for this example) and performs reconfiguration:
$ wget –O /dev/icap
ftp:///partial.bit
If our bitstream server is more intelligent, and can dynamically generate bitstreams according to some specified parameters, we can picture something like the following, to fetch an encryption module, dynamically specialised according to some parameters (the URL has been wrapped due to the short line length):
$ wget –O /dev/icap
/bitfile? mod_type=encrypt¶m=…
Yet another possibility is that the bitstream server is implemented locally, such as would be the case for a purely endo-reconfigurable system. By utilising standard networking services, no change would be required to the client software:
$ wget –O /dev/icap
http://localhost/bitfile? mod_type=encrypt¶m=…
#!/bin/sh
# configure the driver hardware
cat conf_bus_driver.bit > /dev/icap
# load the kernel driver insmod conf_bus_driver.o
# configure the slave FPGAs for i in “1 2 3 4 5”; do
wget –O /dev/fpga${i} / bitfile${i}.bit done;
Figure 4. Shell script to dynamically load FPGA logic for configuring external FPGAs, and kernel module for device driver support Simply substituting localhost as the server name is all that is required – the operating system takes care of the rest.
D. Self configuring FPGA arrays
We have so far considered the concept of a single FPGA and Microblaze system, managing its own reconfiguration. However, the concepts scale elegantly to the notion of FPGA arrays, with either a hierarchical configuration management strategy, or even a distributed/cooperative approach. As previously mentioned, the ICAP is simply an internal interface to the FPGA configuration subsystem. The device driver approach presented here could just as easily be layered over an external configuration bus, used to configure arrays of FPGAs.
By exploiting the Linux device driver concept of major and minor device numbers, specific FPGAs in such a system could be assigned a particular minor number. The minor number would be used to control a chip-select signal on the configuration bus, and the configuration data streamed as appropriate. The shell script in Figure 3 would initiate the reconfiguration of an array of five FPGAs, connected to this “master” FPGA. In this example the bit streams are served remotely. Note that the logic resources used by the master to configure other FPGAs are not required all of the time, so one might consider the approach of first swapping in the configuration bus driver hardware, followed by dynamically loading the device driver, as in Figure 4.
This shows how our approach permits thinking about the problem at a much more abstract level. E. Readback and configuration verification
A small C program based on the readback algorithm presented in Section III.C was written. This is a very simple tool, taking as parameters the block, major and minor frame numbers (a
基于嵌入式Linux的可自重构片上系统
configuration frame address), and producing as output an ASCII representation of the configuration memory.
Such a tool makes it very easy to write programs and scripts to read back and verify the contents of the FPGA. The Xilinx implementation tool bitgen can produce as output a mask file that indicates which bits in a bitstream should be verified in a readback. Thus, by converting this mask file into the appropriate ASCII format, a readback and verification can be achieved with a simple readback followed by a comparison.
Action taken as a result of a successful or unsuccessful readback is application specific, but would likely involve reconfiguration using mechanisms like those described above.
Building on the idea of the previous section, using the same logic interface to the configuration of external FPGAs, a master device can very easily perform readback and verification of other FPGAs in a system.
V. Discussion
In the following we present discussion on some relevant aspects of the proposed approach that have not been previously addressed.
A. Performance
A performance price is always paid for the useability gained by higher level abstractions. Indeed, by choosing uClinux as the platform for our RSoC research, we accept the performance cost in exchange for the tremendous leverage offered by such a comprehensive platform.
In terms of the ICAP device and driver, the performance overhead is modest. Bitstream data is generated by an application (either dynamically, read from a file, or from a network connection). It is then sent to the kernel via the write() system call, which requires it to be copied once from user space to kernel space.
After being received by the kernel, the data is then copied into the OPB ICAP device’s local memory. Finally, when the reconfiguratio …… 此处隐藏:5691字,全部文档内容请下载后查看。喜欢就下载吧 ……
相关推荐:
- [实用文档]李践-有效提升销售的12大黄金法则8-大
- [实用文档]党支部换届工作方案
- [实用文档]2013年下期电子商务专业部宣传工作计划
- [实用文档]方庄一矿通风、钻探绩效工资考核管理办
- [实用文档]项目一 认识企业物流认识企业物流
- [实用文档]MBI_Display_产品蓝图规画
- [实用文档]北京市建筑业劳务作业人员普法维权培训
- [实用文档]锅炉燃烧调整与运行优化
- [实用文档]4支付结算业务的核算
- [实用文档]米什金_货币金融学_第9版各章学习指导
- [实用文档]水泥混凝土路面硬化工程施工组织设计
- [实用文档]钢筋工程安全技术交底书
- [实用文档]关于公布华中师范大学本科毕业论文
- [实用文档]太原市园林绿化施工合同范本 2
- [实用文档]周日辅导 初中英语分类复习单项选择题(
- [实用文档]第四章 文化经纪人的管理形式 第二节
- [实用文档]学宪法讲宪法竞赛题库
- [实用文档]《数值计算方法》期末考试模拟试题二
- [实用文档]爱词霸学英语:每日一句( 十月)
- [实用文档]2014年国家公务员面试:无领导小组讨论
- 新课程主要理念和教学案例分析汇编(24
- 英国人的快乐源于幸福的家庭生活
- 七年级上册第一次月考模拟数学试卷
- 真丝及仿真丝的种类有哪些?
- 【最新】华师大版八年级数学下册第十六
- 高中英语3500个必背单词
- 我可以接受失败,但我不能接受放弃!
- 最近更新沪科版八年级物理上册期末试卷
- 绿化工作先进乡镇事迹材料
- 鲁教版九年级上册思想品德教学计划
- 英语音标的分类
- 地下室底板无梁楼盖与普通梁板结构形式
- 美容师黄金销售话术
- 雅思写作满分作文备考方法
- 血清甲状腺激素测定与高频彩色多普勒超
- 1度浅析装修对室内空气品质的影响
- 2017-2022年中国汞矿行业深度分析与投
- 计算机二级VB公共基础知识
- (何勇)秸秆禁烧_重在寻找出路
- 内外墙抹灰工程分包施工合同1




