Forum Discussion
Hi,
Could you provide the step that you performed to reconfigure the device? Have you try to read the offset 3 and offset 7 of the Dual Configuration IP?
Hi,
Here is the reconfiguration code.
//Reconfiguration block
module reconfig_block
(input clk_20mhz,rst,
input reconfig_en
);
//dual boot signals
reg[2:0]dual_address;
reg dual_read;
reg[31:0]dual_writedata;
reg dual_write;
wire[31:0]dual_readdata;
reg led;
reg [3:0]state;
parameter configoverwrite_config_sel = 4'b0000,
status_read = 4'b0001,
status_read0 = 4'b0010,
status_read1 = 4'b0011,
status_read2 = 4'b0100,
status_read3 = 4'b0101,
status_read4 = 4'b0110,
status_read5 = 4'b0111,
trigger_reconfiguration = 4'b1000;
dual_configuration_ip_core u0 (
.avmm_rcv_address (dual_address), // avalon.address
.avmm_rcv_read (dual_read), // .read
.avmm_rcv_writedata (dual_writedata), // .writedata
.avmm_rcv_write (dual_write), // .write
.avmm_rcv_readdata (dual_readdata), // .readdata
.clk (clk_20mhz), // clk.clk
.nreset (!rst) // nreset.reset_n
);
always@(posedge clk_20mhz, posedge rst)
begin
if(rst)
begin
state <= configoverwrite_config_sel;
dual_write <= 1'b0;
dual_writedata <= 32'h00000000;
dual_read <= 1'b0;
dual_address <= 3'b001;
end
else
begin
case(state)
configoverwrite_config_sel : if(reconfig_en)
begin
dual_address <= 3'b001;
dual_write <= 1'b1;
dual_writedata <= 32'h00000003;
state <= status_read;
end
status_read : begin
dual_write <= 1'b0;
dual_address <= 3'b011;
dual_read <= 1'b1;
state <= status_read0;
end
status_read0 : if(dual_readdata[0] != 1'b1)
begin
state <= status_read;
end
else
begin
state <= status_read1;
end
status_read1 : if(dual_readdata[0] == 1'b0)
begin
dual_address <= 3'b010;
dual_write <= 1'b1;
dual_writedata[3] <= 1'b1;
state <= status_read2;
dual_read <= 1'b0;
end
status_read2 : begin
dual_write <= 1'b0;
dual_address <= 3'b011;
dual_read <= 1'b1;
state <= status_read3;
end
status_read3 : if(dual_readdata[0] != 1'b1)
begin
state <= status_read2;
end
else
begin
state <= status_read4;
end
status_read4 : if(dual_readdata[0] == 1'b0)
begin
dual_address <= 3'b111;
dual_read <= 1'b1;
state <= status_read5;
end
status_read5 : if(dual_readdata[1:0] == 2'b11)
begin
state <= trigger_reconfiguration;
dual_read <= 1'b0;
end
else
begin
state <= status_read5;
end
trigger_reconfiguration : begin
dual_address <= 3'b000;
dual_write <= 1'b1;
dual_writedata <= 32'h00000001;
led <= 1'b1;
end
endcase
end
end
endmodule
i am able to reconfigure with the .pof file flashed through JTAG but not with .rpd data sent through avalon memory mapped interface.