一种CPU和FPGA的快速交换数据方法.pdf
文本预览下载声明
傩
一 种 CPU和 FPGA的快速交换数据方法
陈庆旭 ’,朱 明浩 ,余华武、
(1.南京国电南 自自动化有限公司,南京 211153;2.南京依维柯汽车有限公司)
摘要 :为 了提 高CPU读写 FPGA 的速度 ,提 出了一种基于 Burst方式 的CPU和 FPGA快速交换数据 的方法 。CPU在
完成第一次读 写之后 ,FPGA会记录该地址 ,并使双 口RAM 的地址 自动递增 ,不需要 CPU 再给 出地址 ,这样 CPU 可 以
操作多个连续地址 中双 口RAM 的数据 。经过测试 ,该方法可 以大大提高CPU和 FPGA进行数据交换的速度。
关键词 :CPU;FPGA;Burst;快速数据 交换
中图分类号 :TP368.1 文献标识码 :A
MethodofExchangeDataQuicklyBetweenCPUandFPGA
ChenQingxu ,ZhuMinghao~,YuHuawu
(1.NanjingSACAutomationCo.,Ltd.,Nanjing211153,China;2.NanjingIVECOCo.,Ltd.)
Abstract:ToimprovethereadingandwritingspeedoftheCPU forFPGA,amethodofexchangedataquicklybetweenCPU andFPGA
basedontheBurstmodeisproposed.ThereisabaseaddressregisterinFPGA.AftertheCPU finishedthefirstreadingcommand,FPGA
canrecordtheaddressandincreasethedual—portRAM addressautomaticallywithouttheaddressprovidedbyCPU.SotheCPU canop—
eratemultipledataoftheconsecutiveaddress.Thetestresultsshow thatthemethodcanimprovethedataexchangingspeedbetween
CPU andFPGA.
Keywords:CPU ;FPGA ;Burst;exchangedataquickly
法使用的。
引 言 本文提 出了一种不需要增加额外成本 ,采用 Burst方
式对 FPGA进行读写的方法 。在 CPU和 FPGA有大量
随着可 编程 逻辑控 制器 (FieldProgrammableGate
数据进行交互的场合 ,采用这种方式大大降低 了CPU读
Array,FPGA)的应用 日渐广泛,很多系统采用了中央处
写 FPGA所 需要 的时 间,提 高 了 CPU读 写 FPGA 的
理器 (CentralProcessingUnit,CPU)+FPGA 的架构方
效率 。
式。由于FPGA可 以并行运算,所 以大量 的运算工作可
由FPGA完成,CPU从 FPGA中直接读取计算结果,这种
1 Burst模式的基本原理
方式可以减少 CPU 的运算时间,降低 了对 CPU的要求 。
目前 ,FPGA一般通过双 口RAM 和 CPU进 行交互 , 目前很多 CPU都支持 Burst读写模式 ,通过该模式
通过双 口随机存 取 存储 器 (Random AccessMemory, 可以快速
显示全部