UG470配置接口类型

   Master-Serial configuration mode 
   Slave-Serial configuration mode
   Master SelectMAP (parallel) configuration mode (x8 and x16)
   Slave SelectMAP (parallel) configuration mode (x8, x16, and x32)
   JTAG/boundary-scan configuration mode
   Master Serial Peripheral Interface (SPI) flash configuration mode (x1, x2,
x4)
   Master Byte Peripheral Interface (BPI) flash configuration mode (x8 and
x16) using parallel           NOR flash

串行主|从的配置时序图

 FPGA主 SPI配置时序

Configuration          Mode M[2:0]   Bus Width        CCLK Direction
Master Serial          000                  x1                    Output
Master SPI             001                  x1, x2, x4         Output
Master BPI             010                  x8, x16             Output
Master SelectMAP 100                  x8, x16             Output
JTAG                      101                  x1                     Not
Applicable
Slave SelectMAP   110                  x8, x16, x32(1)  Input
Slave Serial(2)       111                  x1                       Input

CFGBVS           input 1:bank0的Vcco是2.5or3.3 0:1.8or1.5
PROGRAM_B   input 0:重新加载FPGA,外部上拉
INIT_B               bidir 0:配置过程有错误,外部上拉
DONE                bidir 1:配置完成,外部上拉
PUDC_B           input 0:配置过程,SelectIO pins内部上拉
EMCCLK External Master Configuration Clock

CCLK Configuration Clock  依据M[2:0]  in/out

A 7 series FPGA bitstream consists of three sections:
1 Bus Width Auto Detection
2 Sync Word
3 FPGA configuration

D[24:31] D[16:23] D[8:15] D[0:7] Comments
0xFF     0xFF     0xFF    0xFF
0x00     0x00      0x00    0xBB   Bus Width Pattern
0x11     0x22      0x00    0x44    Bus Width Pattern
0xFF     0xFF     0xFF    0xFF   
0xFF     0xFF     0xFF    0xFF   
0xAA     0x99     0x55    0x66   Sync Word

如何实现自动检测总线位宽?
For the x8 bus,   first finds 0xBB on D[0:7] followed by 0x11. 
For the x16 bus,  first finds 0xBB on D[0:7] followed by 0x22. 
For the x32 bus,  first finds 0xBB on D[0:7] followed by 0x44.
如果0xBB之后不是0x11, 0x22, or 0x44,状态机将继续监测有效的0xBB,监测到有效0xBB之后再去监测Sync word.

Sync Word

31:24 23:16 15:8 7:0
0xAA  0x99  0x55 0x66

Readback分两种:
Readback Verify  读回memory
Readback Capture 全集包含当前IO状态,不常用
前提:未加密 & SPI配置管脚保留Persist:Yes

双引导bit对比

头部可以任意修改,只要不改成同步头格式就行。

生成multiboot.bit:

1. 使能双引导
2. 下次启动地址设置为0,不插入IPROG

生成golden.bit:

1. 使能双引导
2. 下次启动地址设置为400000,插入IPROG

要注意WATCHDOG看门狗的时间,看门狗不递减的条件是:启动序列结束&MMCM 锁定&DCI DONE。加入设计里面用外部复位控制PLL的解复位,需要注意。

winbond w25q128bv需要连续下载两次mcs、binwenjain

合成flash烧写的bin文件:

1.  先在0地址开始放入golden.bit,空闲地址填入FF;
 2. 再在400000地址放入multiboot.bit,空闲地址填入FF;
     在fallback情况下,会阻止golden中的IPROG的执行

FPGA内部有个看门狗:
可以监测配置过程,也可以平时用户逻辑使用。

看门狗设置值0x1c9c4

在上板调试过程中遇到的问题:

    分享调试双引导踩的一个坑:
    1. 使用jtag将带双引导的bin文件烧写到flash里面后,不拔掉jtag,
    给子卡断电重启,无法加载到multi版本,只加载到golden版本。
    如果拔掉jtag再重启,就能如预期加载multi版本。

2. 看门狗的值设置自太大,导致在主版本损坏情况下加载很久。当把看门狗设置为400ms就ok

看门狗在mult失败跳回golden会disable 看门狗

device id 在UG470找

技术
今日推荐
PPT
阅读数 115
下载桌面版
GitHub
百度网盘(提取码:draw)
Gitee
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:766591547
关注微信