XILINX FPGA SelectMAP方式配置过程说明

这篇具有很好参考价值的文章主要介绍了XILINX FPGA SelectMAP方式配置过程说明。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

       本文针对单从设备SelectMAP配置过程进行说明,希望作者本人走过的坑,你们可以不用走。

       首先SelectMAP的硬件连接原理参考官网ug470手册说明,信号状态保证一致(数据位可选择x8、x16、x32,作者本人使用的x8),如下图所示:

selectmap,fpga开发

         配置时序参考官网给出的连续8位SelectMAP数据加载方式;

      从图中可以看出,在配置过程中,首先拉低PROGRAM_B信号,被配置的FPGA检测到PROGRAM信号拉低后,会将INIT_B信号拉低。这个时候就可以拉高PROGRAM_B信号,等待INIT_B信号变高,就可以开始写入配置数据(CCLK上升沿锁存数据)。特别注意:配置数据写完以后还要继续发时钟,FPGA的内部还需要时钟做一些工作,等待DONE信号拉高以后就可以正常使用了。

selectmap,fpga开发

       从图中还可以看出,CSI_B和RDWR_B可以一直是低电平。因为FPGA的bin文件中有帧头等等一些数据,可以不用在需要的时候才拉低信号。

selectmap,fpga开发

        上程序,看设计思路:

module ConfigurationStream(

input                                  CLK,

input                                  RSTn,

input                                  CFG_START_VALID, //上电检测flash标志,有配置数据则开始配置

input                                  FLASH_READ_DONE,//flash读取到一个字节的配置数据

output                                FLASH_START_LOAD,//开始让flash读取配置数据

input             [7:0]              FLASH_DATA, //flash读取到的数据

output                                program_b,

input                                  init_b,

output          [7:0]               dataout,

output                                csi_b,

output                                rdwr_b,

output                                cclk,

input                                  done

);

parameter            CFG_IDLE             =     4'd0,

                            CFG_START           =     4'd1,

                            WAIT_INIT             =     4'd2,

                            CFG_PREPARE             =     4'd3,

                            LOAD_STREAM            =     4'd4,

                            SEND_STREAM             =     4'd5,

                            WAIT_DONE         =     4'd6,

                            CFG_FINISH          =     4'd7;

reg [3:0] state;

reg program_r,csi_r,rdwr_r,cclk_r,start_load_r;

reg [7:0] dataout_r;

reg [25:0] byte_size;

reg [31:0] counter;

assign program_b = program_r;

assign dataout = dataout_r;

assign csi_b = csi_r;

assign rdwr_b = rdwr_r;

assign cclk = cclk_r;

assign FLASH_START_LOAD = start_load_r;

reg cfg_start_valid_r;

wire CFG_VALID;

assign CFG_VALID = CFG_START_VALID & (~cfg_start_valid_r);

always @(posedge CLK or negedge RSTn)

if(!RSTn) begin

              cfg_start_valid_r <= 1'b0;

end else begin

              cfg_start_valid_r <= CFG_START_VALID;

end

always @(posedge CLK or negedge RSTn)

if(!RSTn) begin

              program_r <= 1'b1;

              dataout_r <= 8'h00;

              //csi_r <= 1'b1;

              //rdwr_r <= 1'b1;

              //cclk_r <= 1'b1;

              csi_r <= 1'b0;

              rdwr_r <= 1'b0;

              cclk_r <= 1'b0;

              byte_size <= 26'd0;

              counter <= 32'd0;

              start_load_r <= 1'b0;

              state <= CFG_IDLE;

end else begin

              case(state)

                            CFG_IDLE:             if(CFG_VALID == 1'b1) begin

                                                                      state <= CFG_START;

                                                        end else begin

                                                                      program_r <= 1'b1;

                                                                      dataout_r <= 8'h00;

                                                                      //csi_r <= 1'b1;

                                                                      //rdwr_r <= 1'b1;

                                                                      //cclk_r <= 1'b1;

                                                                      csi_r <= 1'b0;

                                                                      rdwr_r <= 1'b0;

                                                                      cclk_r <= 1'b0;

                                                                      byte_size <= 26'd0;

                                                                      state <= CFG_IDLE;

                                                        end

                            CFG_START:          if(counter < 32'd40000) begin           //program_B toggle

                                                                      program_r <= 1'b0;

                                                                      counter <= counter + 1'b1;

                                                                      state <= CFG_START;

                                                        end else begin

                                                                      counter <= 32'd0;

                                                                      program_r <= 1'b1;

                                                                      state <= WAIT_INIT;

                                                        end

                            WAIT_INIT:            if(init_b == 1'b1) begin

                                                                      start_load_r <= 1'b1;

                                                                      state <= CFG_PREPARE;

                                                        end else begin

                                                                      state <= WAIT_INIT;

                                                        end

                            CFG_PREPARE:      begin

                                                                      rdwr_r <= 1'b0;

                                                                      start_load_r <= 1'b0;

                                                                      state <= LOAD_STREAM;

                                                        end

                            LOAD_STREAM:    if(FLASH_READ_DONE) begin

                                                                      counter <= 32'd0;

                                                                      state <= SEND_STREAM;

                                                        end else begin

                                                                      if(counter > 32'd200000) begin

                                                                                    counter <= 32'd0;

                                                                                    state <= CFG_FINISH;

                                                                      end else begin

                                                                                    counter <= counter + 1'b1;

                                                                                    state <= LOAD_STREAM;

                                                                      end

                                                        end

                            SEND_STREAM:     if(byte_size < 26'h947a5c) begin

                                                                      if(counter == 32'd0) begin

                                                                                    csi_r <= 1'b0;

                                                                                    cclk_r <= 1'b0;

                                                                                    counter <= counter + 1'b1;

                                                                                    dataout_r <= FLASH_DATA;

                                                                      end else if(counter == 32'd5) begin

                                                                                    cclk_r <= 1'b1;

                                                                                    byte_size <= byte_size + 1'b1;

                                                                                    state <= LOAD_STREAM;

                                                                      end else begin

                                                                                    counter <= counter + 1'b1;

                                                                      end

                                                        end else begin

                                                                      state <= WAIT_DONE;

                                                        end

                            WAIT_DONE:        if(counter == 32'd0) begin

                                                                      cclk_r <= 1'b0;

                                                                      counter <= counter + 1'b1;

                                                        end else if(counter == 32'd5) begin

                                                                      cclk_r <= 1'b1;

                                                                      counter <= counter + 1'b1;

                                                        end else if(counter == 32'd9) begin

                                                                      if(done) begin

                                                                                    state <= CFG_FINISH;

                                                                      end else begin

                                                                                    state <= WAIT_DONE;

                                                                      end

                                                                      counter <= 32'd0;

                                                        end else begin

                                                                      counter <= counter + 1'b1;

                                                        end

                            CFG_FINISH:         begin

                                                                      program_r <= 1'b1;

                                                                      csi_r <= 1'b1;

                                                                      rdwr_r <= 1'b1;

                                                                      cclk_r <= 1'b1;

                                                                      state <= CFG_FINISH;

                                                        end

                            default:          state <= CFG_IDLE;

              endcase

end

endmodule

实测波形分别如下:

  1. 测量波形

selectmap,fpga开发

selectmap,fpga开发

selectmap,fpga开发

selectmap,fpga开发

       配置完以后,结果发现FPGA没有启动,百思不得其解。研究半天,突然灵感来了,想起来配置的数据是反的,怎么反?上图。

selectmap,fpga开发

    从图中可以看到,配置数据的高位在D0,数据低位在D7。就把引脚定义改了一下,一把成,堪称完美!👏👏👏文章来源地址https://www.toymoban.com/news/detail-713370.html

到了这里,关于XILINX FPGA SelectMAP方式配置过程说明的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Xilinx 7系列 FPGA硬件知识系列(九)——FPGA的配置

    目录 1 .1配置模式 1.1.1  主模式 1.1.2  从模式 1.2  7种配置模式 1.2.1  主串配置模式 1.2.2  从串配置模式 ​编辑1.2.3  主并配置模式 1.2.4  从并配置模式 1.2.5  JTAG配置模式 ​编辑1.2.6  主SPI配置模式 ​编辑1.2.7  主BPI配置模式 1.2.8  FPGA BPI加载时间(参考xapp587) 2、BPI

    2024年03月13日
    浏览(74)
  • XILINX FPGA K7配置启动流程(官方手册整理)

         1.在配置过程中,7系芯片需要的电压有,Vcco0,Vccaux,Vccbram和Vccint。       所有的Jtag配置引脚在一个独立的专用bank上,使用的电源也是专用电源Vcco0。多功能pin在14和15bank。bank0,14和15上的专用输入输出引脚使用Vcco0,Vcco14,Vcco15的LVCMOS电平,电平需要匹配,输出引脚

    2023年04月22日
    浏览(43)
  • Xilinx(AMD) 7系列FPGA——主BPI配置模式

    主BPI配置模式用于对启动加载时间有要求的情况下使用,因为BPI模式为并行加载,加载时间较短,适用于需要快速加载的场景;主BPI模式,M[2:0] = 3’b010。主BPI模式进行读写操作时,分为同步与异步两种,对于同步读取,FPGA的CCLK管脚输出必须连接到Flash的CLK引脚;对于异步读

    2024年03月17日
    浏览(55)
  • 关于xilinx使用PCIE实现FPGA的部分重配置实现(MCAP)

    平台:vivado21018.3 芯片:xcku115-flva1517-2-i (active) 本文官方文档:Xilinx_Answer_64761_Ultrascale_Devices 本文驱动下载地址:64761 - Bitstream Loading across the PCI Express Link in UltraScale and UltraScale+ Devices for Tandem PCIe and Partial Reconfiguration (xilinx.com) 本文参考:Xilinx基于PCIE的部分重配置实现(一)

    2024年02月01日
    浏览(64)
  • 谁说配置难?这篇文章让你轻松掌握xilinx 7系列FPGA配置技巧

      本文旨在通过讲解不同模式的原理图连接方式,进而配置用到引脚的含义(手册上相关引脚含义有四、五页,通过本文理解基本上能够记住所有引脚含义以及使用场景),熟悉xilinx 7系列配置流程,以及设计原理图时需要注意的一些事项,比如flash与FPGA的上电时序。   x

    2024年02月06日
    浏览(69)
  • Xilinx FPGA SPIx4 配置速度50M约束语句(Vivado开发环境)

    qspi_50m.xdc文件: 等同于图形化配置方式:

    2024年02月22日
    浏览(65)
  • Xilinx FPGA未使用管脚上下拉状态配置(ISE和Vivado环境)

    ISE开发环境 ISE开发环境,可在如下Bit流文件生成选项中配置。 右键点击 Generate Programming File ,选择 Process Properties , 在弹出的窗口选择 Configuration Options-Unused Pin ,选择 Pull Down、Pull Up或者Float 。 可以看到,除了未使用管脚,一些系统管脚,比如JTAG,Program、Done管脚等等都可

    2024年02月06日
    浏览(49)
  • 具于xilinx FPGA的可动态配置DDS频率控制字的DDS IP核使用例程详解

    本文用于讲解xilinx IP 的dds ip examples(动态配置频率)的功能说明,方便使用者快速上手。 本examples 是月隐编写的针对DDS的使用demo,实现通过vio控制频率控制字来调整DDS的输出频率,为大家演示一个可动态配置DDS频率的例程。 例程的平台: 1) 硬件平台:XC7Z020CLG484-2 2) FP

    2024年02月02日
    浏览(42)
  • Xilinx QDMA说明和测试

    使用QDMA的Example工程,该工程可从Github下载,使用的FPGA板卡为浪潮的F37X加速器,运行工程目录下的run.sh执行run.tcl即可完成工程的创建和编译。 本节主要介绍QDMA驱动的源文件、编译和安装过程。 1.下载地址:DMA驱动下载 2.文件说明 文件 说明 apps 应用文件 docs 说明文件 drive

    2024年02月14日
    浏览(67)
  • Xilinx XDMA说明和测试

    使用Vivado创建的XDMA测试工程如下图所示,XDMA IP的设置如下,其它保持默认。XDMA的AXI、AXI Lite和AXI Bypass都接BRAM,每个BRAM的地址设置如下图。该工程可从Github下载,使用的FPGA板卡为浪潮的F37X加速器,运行工程目录下的run.sh执行run.tcl即可完成工程的创建和编译。 注意AXI Lite接

    2023年04月21日
    浏览(49)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包