Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20735 Discussions

MAX10 remote configuration with MCU

Altera_Forum
Honored Contributor II
3,588 Views

Design objective is to allow remote configuration update over ethernet with MCU. Is there a reference design or recommended method for this type of configuration?

0 Kudos
15 Replies
Altera_Forum
Honored Contributor II
1,810 Views

I'm unaware of a reference design. However, there is a recommended method for doing this. It's covered in detail in the 'max 10 fpga configuration user guide (https://www.altera.com/en_us/pdfs/literature/hb/max-10/ug_m10_config.pdf)' - see the 'remote system upgrade in dual compressed images' section. 

 

This also refers to the 'remote system upgrade for max 10 fpga devices over uart with the nios ii processor (https://www.altera.com/en_us/pdfs/literature/an/an741.pdf)' app note. Whilst you're not looking to deliver the update over UART, the same principle and methodology can be applied. 

 

Cheers, 

Alex
0 Kudos
Altera_Forum
Honored Contributor II
1,810 Views

Alex - thanks for post, -reviewed the reference info you mentioned. Was hoping there was a possible option using external spi flash, where the spi flash would sit between the mcu and the fpga. This would allow the mcu to load spi flash, and then signal the fpga to load from the spi flash. This is kind of a common method with some other devices which are designed to load from external spi. 

 

Thanks -Bob
0 Kudos
Altera_Forum
Honored Contributor II
1,810 Views

 

--- Quote Start ---  

This is kind of a common method with some other devices which are designed to load from external spi. 

--- Quote End ---  

 

Indeed - I can see a scheme like this working for some of these "other devices". However, MAX10 doesn't support boot from an external FLASH. Internal FLASH or JTAG only for MAX10. 

 

Cheers, 

Alex
0 Kudos
Altera_Forum
Honored Contributor II
1,810 Views

Is there a protocol for jtag programming of the max 10?

0 Kudos
Altera_Forum
Honored Contributor II
1,810 Views

Yes - sure there is. However, Altera don't publish it. 

 

You might consider using Serial Vector Format (SVF) files, which Quartus can generate and can be 'played' through any JTAG programmer. However, if you're considering writing your own JTAG 'player' to configure your device you're in for a bumpy ride. 

 

If you want to remotely update your MAX10 device I strongly recommend you stick to the methods Altera recommends. 

 

Cheers, 

Alex
0 Kudos
Altera_Forum
Honored Contributor II
1,810 Views

This is not looking good.  

 

This is a replacement design for existing product. Previous design used Xilinx spartan fpga which was loaded through an I/O bit-banging interface from an MCU at power up. The MCU connected to the outside world with ethernet, therefore it was possible to update the MCU with the fpga configuration file, and the MCU would handle the configuration file update to the fpga. 

 

The new design task is to replace this now obsolete fpga with the Altera Max 10, and still have it re-configurable in the field in the same manner -ethernet to MCU to fpga. As I'm on the software side of this thing, I started looking into 'how the max 10 may be updated from an mcu'. Yikes. Making matters a bit worse, if that's possible, I seriously anticipate the new design will not be getting much of a validation test, as the system is well beyond the commissioning phase, so I strongly believe the need for field updates is real. 

 

Alex, if I understand correctly, the SVF format requires a JTAG programmer. I've seen the reference to serial updates over a UART, etc., but nothing as I've described the need for, as you point out. 

 

Really appreciate any further thoughts you have on this, as it appears we're going down a dangerous slope. 

 

Thanks, 

Bob
0 Kudos
Altera_Forum
Honored Contributor II
1,810 Views

So, why MAX10? It doesn't appear (to me) to be the right part. 

 

I suggest you want a Cyclone part - start by looking at Cyclone IV or V. These can be configured in exactly the same manner as a Xilinx Spartan FPGA. You need to look at the Passive Serial configuration scheme. With these, bit-bashing will be your friend and you can maintain your existing field upgrade mechanism. 

 

Cheers, 

Alex
0 Kudos
Altera_Forum
Honored Contributor II
1,810 Views

It's a great question. Unfortunately, the hardware side of things here usually starts designing without looking at details. I'll look into the Cyclone parts.  

 

Thanks again for you thoughts on this - great help. 

-Bob
0 Kudos
Altera_Forum
Honored Contributor II
1,810 Views

I have recently completed a prototype to update Max10 CFM1&2 over EtherCAT ( similar to Ethernet) in realtime. I agree, this is not a simple exercise. My hardware configuration is slightly different where I have another FPGA sits between the CPU to Max10 device. 

EtherCAT --> DSP --> FPGA1 ---> Max10.  

The I2CRSU is a great start but it requires quite significant modification as my interface from FPGA1 to Max10 is SPI. In addition to that, the real time requirement and makes the processor controlled CFM programming not practical, thus requiring separate RSU master to control the flash erase and reprogramming 

Sifting through tons of Altera information is not an easy feat as well and I found that Altera has not been consistent in their image definition. Sometimes called image 1 and 2 and other intances image 0 and 1. 

I am trying to put a blog (https://embeddedfpgadesign.wordpress.com/) on the changes that I made to make this happen. Hopefully others may benefit from it. You can contact me if you need more details.
0 Kudos
Altera_Forum
Honored Contributor II
1,810 Views

Is your current problem different from your previous question in http://www.alteraforum.com/forum/showthread.php?t=52677&p=216576&highlight=#post216576? 

Altera gives you a jtag software which can be used for upgrading your FPGA. You can easily use it and program your FPGA via MCU. What's the new problem?
0 Kudos
Altera_Forum
Honored Contributor II
1,810 Views

Hi Alan Ismail, 

 

I'm very interested in your website explaining how to upgrade the MAX10 FPGA over EtherCAT. 

Is there any Open Source sharing VHDL or Verilog about this part? I did't found on the website.(https://embeddedfpgadesign.wordpress.com

I'm also using EtherCAT but try to implement this solution without FPGA1 intermadiate. 

Please can you help me ASAP? 

 

Thanks,
0 Kudos
Altera_Forum
Honored Contributor II
1,810 Views

There are some reference designs in Altera/Intel reaources that you can download. Updating via EtherCAT is not much difference to other protocol, as long as you have proper EtherCAT slave stack implemented on your microp you will get the data in ET mailbox. From there it is just a matter of writing a small controller to control the Erase & Write of CFM flash. You can pm me & I'll be glad to give additional pointers

0 Kudos
Altera_Forum
Honored Contributor II
1,810 Views

Ok Thank you I'll see it.

0 Kudos
Altera_Forum
Honored Contributor II
1,810 Views

@AlanIsmail 

 

In the original NIOS based design, I see some bit manipulating before writing to the flash (get_word_bitswap). Do you do these manipulations at the MCU side? Thanks.
0 Kudos
Altera_Forum
Honored Contributor II
1,810 Views

 

--- Quote Start ---  

@AlanIsmail 

 

In the original NIOS based design, I see some bit manipulating before writing to the flash (get_word_bitswap). Do you do these manipulations at the MCU side? Thanks. 

--- Quote End ---  

 

 

 

The word_bitswap can be done in MCU or FPGA. I believe the swap is to ensure data format matches the Flash native data format
0 Kudos
Reply