当前位置: 首页 > news >正文

衡阳网站制作网站开发英文论文资料

衡阳网站制作,网站开发英文论文资料,青海风控app下载,营业执照申请网站最近做的了一个无线通信的项目#xff0c;需要在同一套设备上实现两套不同的波形软件#xff0c;因为FPGA的逻辑资源不够同时放下两套代码#xff0c;因此采用了镜像切换的方式来实现#xff0c;xilinx的专业术语叫multi boot功能 。意思是在一片Flash中的不同地址放两个代…最近做的了一个无线通信的项目需要在同一套设备上实现两套不同的波形软件因为FPGA的逻辑资源不够同时放下两套代码因此采用了镜像切换的方式来实现xilinx的专业术语叫multi boot功能 。意思是在一片Flash中的不同地址放两个代码镜像通过FPGA的任意一个IO切换镜像。详细概念可以参考UG470PG134等文档本文仅讲具体的实现代码。 既然是多镜像意思就是同一套硬件有多套软件。类似于同一台电脑可以装了一个linux系统又装了一个win7系统甚至多套系统。开机时由用户选择启动哪个系统。 本示例包含2个工程镜像使用512Mbit的QSPI flash。工程1的镜像放在0地址工程2的镜像放在地址0x02000000。当外部输入引脚SW为低电平时加载第一个镜像否则加载第二个镜像。每当SW电平变化都会启动镜像切换。 第一个工程的顶层如下 module project1(input CLK,//输入时钟不要超过100Minput rst_n,//复位输入output SW, //输入为低电平启动镜像1输入为高电平启动镜像2output LED1,//镜像1亮镜像2灭output LED2 //镜像1灭镜像2亮);assign LED1 1;assign LED2 0; mult_boot mult_boot_inst(.clk (CLK),.rst_n (rst_n),.img_index (0),.boot_sel (SW)); endmodule第二个工程顶层如下 module project2(input CLK,//输入时钟不要超过100Minput rst_n,//复位输入output SW, //输入为低电平启动镜像1输入为高电平启动镜像2output LED1,//镜像1亮镜像2灭output LED2 //镜像1灭镜像2亮);assign LED1 0;assign LED2 1; mult_boot mult_boot_inst(.clk (CLK),.rst_n (rst_n),.img_index (1),.boot_sel (SW)); endmodule注意两个工程都需要调用mult_boot模块不同的工程img_index输入不一样。工程1设置为0工程2设置为1。 如果你的SPI flash大于128Mb,必须加上如下约束 set_property BITSTREAM.CONFIG.SPI_32BIT_ADDR YES [current_design] mult_boot.v代码如下 module mult_boot(input clk,input img_index, //constant to 0 for image0,1 for image1input rst_n,input boot_sel //0boot image0;1boot image1; );parameter [31:0] IMAGE0_ADDR 32h0;parameter [31:0] IMAGE1_ADDR 32h02000000;/*When using ICAPE2 to set the WBSTAR address, the 24 most significant address bits should be writtento WBSTAR[23:0]. For SPI 32-bit addressing mode, WBSTAR[23:0] are sent as address bits [31:8]. Thelower 8 bits of the address are undefined and the value could be as high as 0xFF. Any bitstream at theWBSTAR address should contain 256 dummy bytes before the start of the bitstream..*/localparam [31:0] WBSTAR_IMAGE0_ADDR {8h0,IMAGE0_ADDR[31:8]};localparam [31:0] WBSTAR_IMAGE1_ADDR {8h0,IMAGE1_ADDR[31:8]};reg [1:0] state;reg boot_sel_lock;wire [31:0] next_image_addr (boot_sel_lock0)? WBSTAR_IMAGE0_ADDR:WBSTAR_IMAGE1_ADDR;reg [2:0] index;reg [31:0] icap2_din;reg icap2_csn;ICAPE2 #(.DEVICE_ID(0h3691093), // Specifies the pre-programmed Device ID value to be used for simulation// purposes..ICAP_WIDTH(X32), // Specifies the input and output data width..SIM_CFG_FILE_NAME(None) // Specifies the Raw Bitstream (RBT) file to be parsed by the simulation model.)ICAPE2_inst (.O(), // 32-bit output: Configuration data output bus.CLK(clk), // 1-bit input: Clock Input.CSIB(icap2_csn), // 1-bit input: Active-Low ICAP Enable.I(icap2_din), // 32-bit input: Configuration data input bus.RDWRB(1b0) // 1-bit input: Read_n/Write Select input);function [31:0] icap_lut;input [7:0] index;begincase(index)0 :icap_lut{32hFFFFFFFF };//Dummy Word1 :icap_lut{32hAA995566 };//Sync Word2 :icap_lut{32h20000000 };//Type 1 NO OP3 :icap_lut{32h30020001 };//Type 1 Write 1 Words to WBSTAR4 :icap_lut{next_image_addr };//Warm Boot Start Address (Load the Desired Address)5 :icap_lut{32h30008001 };//Type 1 Write 1 Words to CMD6 :icap_lut{32h0000000F };//IPROG Command7 :icap_lut{32h20000000 };//Type 1 NO OPdefault:icap_lut0;endcaseendendfunctionreg [31:0] command;always (posedge clk) command icap_lut(index);wire [31:0] command_swapped {command[24],command[25],command[26],command[27],command[28],command[29],command[30],command[31],command[16],command[17],command[18],command[19],command[20],command[21],command[22],command[23],command[ 8],command[ 9],command[10],command[11],command[12],command[13],command[14],command[15],command[ 0],command[ 1],command[ 2],command[ 3],command[ 4],command[ 5],command[ 6],command[ 7]}; always (negedge clk or negedge rst_n)beginif(!rst_n) beginstate0;icap2_csn1;boot_sel_lockimg_index;index0;endelse case(state)0:beginboot_sel_lockboot_sel;if(boot_sel_lock!img_index)state1;end1:beginif(index8) beginstate0;index0;endelse beginstate2;indexindex1;icap2_csn0;icap2_dincommand_swapped;endend2:begin state3;icap2_csn1;end3:state1;default:state0;endcaseendendmodule 注意DEVICE_ID的值要根据具体FPGA的型号填入不同的值V7系列请参考UG470的第14页。 最终实现的效果SW输入0则加载第一个工程的镜像LED1亮。SW输入1则加载第二个工程的镜像LED2亮。 附上两个工程的bit文件合成一个mcs文件的脚本 write_cfgmem -format mcs -size 64 -interface SPIx4 -loadbit {up 0x00000000 project1.bit up 0x02000000 project2.bit } -force -file merged.mcs有相关问题请留言
http://wiki.neutronadmin.com/news/202259/

相关文章:

  • 做网站需要学会些什么深圳住房和建设局网站 申请
  • 想自己做网站吗湖南住房与城乡建设部网站
  • 培训网站建设方案模板下载wordpress 自动标签
  • 北京公司网站制作哪家专业天津在哪做网站
  • 西安网站开发公司电话做网站php需要几个人
  • wordpress网站logo没显示深圳房产网站建设
  • 网页设计与网站建设专业网站优化关键词价格
  • 入群修改网站后台大型网站频道的建设需多人协同开发
  • 音乐播放网站怎么做网络规划设计师第二版
  • qq恢复官方网站大连设计工作室
  • 免费网站如何注册苏州手机网站制作
  • 建设一个网站要多少费用软件商店下载最新版2022
  • 品牌网站建设 2蝌蚪小平昌县建设局网站
  • 网站开发需要的软件深圳画册设计推荐
  • 购物网站开发方案dedecms导购网站模板
  • 增城门户网站wordpress 登录 显示
  • 润才网站建设自己制作网页怎么制作的
  • 易语言如何做网站登录企业网站建设后期维护费用
  • 四川公司网站建设招标量化交易网站开发
  • 东莞建网站公司排名做公司网站图片算是商用吗
  • 农村建设捐款网站很多网站开发没有框架如何制作的
  • 莱芜网站优化是什么哪个网站可以做鞋鉴定
  • 学校网站的建设需求广州定制网站开发
  • 深圳网站设计九曲网站建设苏州房产网
  • 内江企业网站建设公司广州工商注册查询系统
  • 塑业东莞网站建设非织梦做的网站能仿吗
  • 网站开发要先买服务器吗wordpress忘记用户名密码
  • 企业网络规划和设计方案网站内容很少如何做seo
  • 东莞seo建站推广费用目前做外贸平台
  • 网站建设招标书组成自助建站的软件