mulitboot,如何手动返回gold分区
ICAPE3 #(
.DEVICE_ID (32'h03628093),//pre-programmed Device ID value,used for simulation purposes.
.ICAP_AUTO_SWITCH ("DISABLE"),//Enable switch ICAP using sync word
.SIM_CFG_FILE_NAME("NONE")//Raw Bitstream (RBT) file,parsed by the simulation // model
)
ICAPE3_inst (
.AVAIL (icape_out_valid), // 1-bit output: Availability status of ICAP
.O (icape_out_swdata), // 32-bit output: Configuration data output bus
.PRDONE (), //1-bit output: Indicates completion of Partial Reconfiguration
.PRERROR(),//1-bit output: Indicates Error during Partial Reconfiguration
.CLK (sys_clk), // 1-bit input: Clock input
.CSIB (icape_in_csn), // 1-bit input: Active-Low ICAP enable
.I (icape_in_swdata), // 32-bit input: Configuration data input bus
.RDWRB (icape_in_wrn) // 1-bit input: Read/Write Select input
);
但是有个问题,multiboot gold分区带跳转地址,也就是说,如果写入IPROG的地址为0的时候,导致gold分区从先跳转到up分区上面。
所以解决的办法,跳转到一个不存在区域。并且利用开门狗特性返回到GOLD分区。
在写入ICAPE3的参数,需要一个不存在分区的地址,以及写入开门狗的数据内容。
always @(posedge sys_clk)
begin
if(!sys_rstn)
begin
icape_in_wrn <= 'b1;
icape_in_csn <= 'b1;
icape_in_data <= 'h0;
end
else case(upstep_count)
0,1: begin
icape_in_wrn <= 'b1;
icape_in_csn <= 'b1;
icape_in_data <= 'h0;
end
2: begin
icape_in_wrn <= 'b0;
icape_in_csn <= 'b1;
icape_in_data <= 'hffff_ffff;
end
3: begin
icape_in_wrn <= 'b0;
icape_in_csn <= 'b0;
icape_in_data <= 'hffff_ffff;
end
4: icape_in_data <= 'haa99_5566;
5: icape_in_data <= 'h2000_0000;
6: icape_in_data <= 'h3002_2001;///TIMER
7: icape_in_data <= 'h400a_0000;/// TIMERDATA
8: icape_in_data <= 'h3002_0001; ///WSTART
9: icape_in_data <= ‘h0200_0000’; //ADDR
10: icape_in_data <= 'h3000_8001; //IPOG CMD
11: icape_in_data <= 'h0000_000F; ///JUMP
12: icape_in_data <= 'h2000_0000;
13: begin
icape_in_wrn <= 'b1;
icape_in_csn <= 'b1;
icape_in_data <= 'h0;
end
default:
begin
icape_in_wrn <= 'b1;
icape_in_csn <= 'b1;
icape_in_data <= 'h0;
end
endcase
end
浙公网安备 33010602011771号