Creating Bootloader within ROM using Cyclone V
Hi,
I'm looking to for some feedback/suggestions to the following.
I have been tasked with creating a boot loader to be able to perform remote loading via serial interface.
I initially did some research, and thought that the best way to perform this would be through 'Partial Reconfiguration', however I have since confirmed that the Cyclone V 5CEFA9F23I7N device I am working with does not support it.
For some more context, the place I work for creates the firmware model within Simulink which is then synthesized via HDL coder and turned into a bit-stream via Quartus before loading onto the FPGA.
Since discovering I am unable to use 'Partial Reconfiguration', I have thought about alternatives in concept, one of which is to potentially have the logic required to for the UART/RS-485 and SPI protocols in the firmware, along with the state machine to configure the external flash registers. The bit-stream would be received via RS-485, decoded then sent via SPI and written to flash. Assuming the bit-stream was complete, the FPGA would be reset and load the configuration from flash.
I will admit, this sounds error prone and is the least preferred.
The other alternative is to configure the FPGA internal ROM via .mif file, and have the ROM load the bit-stream into flash. This would mean the serial interface protocols would need to be stored within ROM, along with the code to configure the flash registers. I have read that the .mif can be written using HDL language such as VHDL, however I am wondering if it could be created via MATLAB script .m files?
I have kept this at a pretty high level as I am just thinking about this conceptually, however I am looking for some advice given the situation presented.
I'd be interested to know if anybody has had experience doing something like I have described before, and if so, what else should I consider?
I'm a little uncertain about having the serial interfaces and state machine in ROM, as it's typically used to store configuration data. I'm not sure if it's even possible, or what the outcomes may be by trying to do this?
Is there any resources that would be of further benefit which may aid the decision making, or introduce another alternative which have have not covered?
Keen to hear all feedback.
Regards,
Dan