FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6343 Discussions

Is there a way to avoid rebooting PC after reconfiging the fpga on a pcie card?

Altera_Forum
Honored Contributor II
1,046 Views

When using pcie hard ip, every time I reconfig the fpga, I have to reboot the PC otherwise I can't access the pcie card. 

 

I think this is because that when Bios alloc every card some address space, it will assign the base address and write this address to the card,  

e.g. if Bios decide the base address of Bar0 of my card is 0xf000000, it will write this 0xf0000000 to the pcie ip. 

when I reconfig the fpga, the address (that 0xf000000) will be flushed, so now the PC know 0xf000000 is my card, but my card don't know that. 

 

So I think if I can save that address to some sram or sdram, and after reconfiging the fpga, load that address back, then it won't be necessary to 

reboot the PC. 

 

Anyone have tried this?
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
347 Views

 

--- Quote Start ---  

When using pcie hard ip, every time I reconfig the fpga, I have to reboot the PC otherwise I can't access the pcie card. 

 

I think this is because that when Bios alloc every card some address space, it will assign the base address and write this address to the card,  

e.g. if Bios decide the base address of Bar0 of my card is 0xf000000, it will write this 0xf0000000 to the pcie ip. 

when I reconfig the fpga, the address (that 0xf000000) will be flushed, so now the PC know 0xf000000 is my card, but my card don't know that. 

 

So I think if I can save that address to some sram or sdram, and after reconfiging the fpga, load that address back, then it won't be necessary to 

reboot the PC. 

 

Anyone have tried this? 

--- Quote End ---  

 

 

I have experienced something similar... I wanted to reprogram the FPGA ( Stratix V , development board ) and restart the PC without having the  

power sequenced off then on. I have a utility that restarts the PC ... ie re-run POST / BIOS. In my case I didn't want to commit to FLASH and loosing the power meant I lost the configuration. In your case you seem to want to change the design behind the configuration. I'm not sure how ... but the BIOS was able to know that the design had changed when I changed the lane width or speed and in that case sequenced the power off and on. 

 

In your case, can you explain why when the FPGA is reconfigured , it is a problem to restart the PC ? If you want to reconfigure on the fly, then you may need to "shadow" the configuration registers to something , run the re-configure and as part of the FPGA reset activity , re-establish the configuration register data. 

All the time the OS ( PC ) needs to know the PCIe endpoint is offline. 

 

Another opportunity may be CVP, ... take a snapshot of the register space. reconfigure the FPGA using CVP , then re-establish the config register state all from the host side. ... all the time the endpoint needs to be in a quiesced state . 

 

Hope there is something that helps in there . Bob.
0 Kudos
Reply