Xilinx远程更新之Multiboot

        Multiboot是Xilinx远程更新的重要组成部分,现已经初步开发完成从PCIe —> FPGA端的程序升级工作,现将Multiboot做一个总结记录。

        1、Multiboot组成

         包含Golden Image和Update Image两个基础组成部分;

        当Golden Image(初始地址0)中设置了WBSTAR跳转地址A1(Update Image的初始地址),FPGA上电从Golden Image开始运行,识别到WBSTAR非0,会产生一个IPPROG CMD,用于指示程序进行跳转,跳转到地址A1处,即Update Image开始运行;

        当Update Image开始运行,当出现CRC error或者IDCODE error时,会fallback到Golden Image去运行。这个机制,类似于单片机中的Boot程序+应用程序,两个程序分别位于Flash的不同地址空间。

        2、错误类型

        CRC error

        IDCODE error

        Watchdog timer time-out error

        由于前两种错误类型不常出现,倒是远程更新Update Image的过程中,出现烧写不成功时,例如烧写一半断电,这种是不会触发前两种错误去fallback的,远程更新就失去了意义。

        这里必须应用第三种错误Watchdog timer time-out error,让它超时自动跳转。

        3、Watchdog Timer

(1)Configuration logic starts executing commands in the golden bitstream stored at flash address location zero. The IPROG command embedded in the golden bitstream initiates the control to jump to the address location stored in the golden WBSTAR register. In this example WBSTAR points to the timer1 start address.

(2)The timer1 or the barrier image before the update image has a short timer enabled that helps sync the configuration logic to a known good SYNC word, reducing the chance a corrupted update image can cause a false sync.

(3)a. Known good update image present following timer1 – Update image loads as normal.

        b. Corrupted or sector of data erased i.e., no SYNC word (AA995566) in the beginning of the update image – Configuration logic starts observing the bitstream after it sees the SYNC (AA995566) word. In the case of a corrupted or erased SYNC word, data or commands are ignored and configuration logic keeps scanning through the flash for a valid SYNC word. In this scenario the timer value set in timer1 triggers Fallback by means of a watchdog timeout error and failsafe or golden image is loaded (proceed to Step5).

(4)a. timer2 is ignored if a known good update image is present following timer1.

        b. Update region corrupted or sector of data erased towards the end of update image – In this scenario configuration logic does not see the end of startup to complete configuration. timer2 comes into play and Fallback to address zero i.e., the golden image location is triggered by a watchdog timeout error.

(5)The golden failsafe image loads as a result of Fallback triggered by the timeout error.

        4、Multiboot测试

       根据Golden.bit和Update.bit的大小去评估Golden区域和Update区域的大小,在Tcl Shell中运行脚本生成Timer1.bin和Timer2.bin,将4个文件合并使用USB Blaster烧写至Flash中;

        在远程更新去烧写Update区域的过程中,首先要擦除Update区域,擦完后强行将板卡断电重启,程序能够正常运行Golden Image,说明看门狗功能正常运行。

  • 8
    点赞
  • 63
    收藏
    觉得还不错? 一键收藏
  • 18
    评论
Xilinx FPGA的多启动实现在线升级的原理是通过使用片上ROM(Read-Only Memory)或者外部配置存储器来存储多个bit文件。在系统启动过程中,FPGA会依据配置存储器中的特定信号或引脚状态来选择加载不同的bit文件。 在实现在线升级的过程中,首先需要确保FPGA的配置存储器能够容纳多个bit文件。接下来,需要设计一个合适的控制逻辑,用于根据外部信号或者某些触发条件来选择加载不同的bit文件。 一种常见的实现方法是在FPGA片上集成一个片上ROM,将多个bit文件存储在ROM中,并且将ROM的输出与FPGA的配置引脚相连。在系统启动时,FPGA会根据ROM输出的特定值来选择加载对应的bit文件。此外,也可以使用外部存储器,例如EEPROM、Flash或者SD卡等来存储多个bit文件,并通过芯片的配置接口进行读取。 在实际应用中,可以通过编写适当的控制逻辑以及与FPGA外部接口的通信协议,实现在线升级的功能。例如,可以设计一个微处理器或者外部控制器来监测系统状态,在需要升级的时候,这个控制器会向FPGA发送信号,指示其加载使用新的bit文件。FPGA会停止当前的操作,并加载新的bit文件进行更新。完成升级后,系统即可正常运行。 总结来说,Xilinx FPGA实现多启动的在线升级是通过选择不同的bit文件来更新FPGA的配置信息。这需要使用片上ROM或者外部存储器来存储不同的bit文件,并通过控制逻辑和外部接口来实现在线升级的功能。
评论 18
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值