Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
Need Forum Guidance? Click here

Search our FPGA Knowledge Articles here.
19315 Discussions

Cyclone 3 + EPCS controller (altasmi_parallel) + Alt Remote Update(altremote_update)

Altera_Forum
Honored Contributor II
1,088 Views

I would like to share my experience in implementing the remote update functionality in Cyclone 3 using EPCS controller(altasmi_parallel) and Alt Remote Update(altremote_update) Mega Functions. I would like to thank all the people who shared their knowledge on this forum to help others (including me in this case). I wouldn't have been able to implement this without the valuable experiences/advices from other members. 

 

I didn't use NIOS II for implementing this in fpga. 

 

We have a cyclone 3 FBGA based design at my work place, and we are using 80 of these systems (identical systems with the same functionality). Based on the need, we may need to modify the firmware on all the 80 boards. This prompted me to look into remote update functionality. Our systems have hardware/software interface with PC/104 as input output communication module, and ISA bus is used for data transfer. 

 

Design has EP3c55F484 and EPCS16. So it can only hold one configuration file at a time. 

 

I implemented both EPCS controller(altasmi_parallel) and Alt Remote Update(altremote_update) megafunctions in the design file and generated the Hexadecimal(Intel-Format) Output File(.hexout) file using Quartus II. 

As one of the members explained before, all the bits need to be reversed before sending to EPCS. 

 

if x is the byte from the hex file and d is the data to be written to EPCS controller(altasmi_parallel) 

 

d(0) = x(7) 

d(1) = x(6) 

d(2) = x(5) 

d(3) = x(4) 

d(4) = x(3) 

d(5) = x(2) 

d(6) = x(1) 

d(7) = x(0) 

 

raw binary file and hexout file have the same information. We decided to use hexout, because it has check sum and other features which are helpful for verifying the data. 

 

We used ISA bus to erase the memory first and then write the data to EPCS16 with a custom protocol and read the data back to compare with the hexout file. We made sure the formatted data from hex file and the data read back from the EPCS16 are the same. 

 

as the configuration data in the EPCS starts at 0x00000 (21 bits) in this case, I didn't have to change anything for the Alt Remote Update(altremote_update). I sent a pulse to 'reconfig' signal in the altremote_update block to start the reconfiguration, and in two seconds FPGA is configured with new data in the EPCS16. 

 

There are many ways to implement this functionality. I wanted to share my experience.
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
140 Views

hello ! tanks for you file first!i have a question as below:you said : "We decided to use hexout, because it has check sum and other features which are helpful for verifying the data."how can you konw where is the info of check sum in the HEXOUT file? do you have the file format detail meassage ?could you share me ?

Altera_Forum
Honored Contributor II
140 Views

Hi Bachimanchi, 

 

Your post is very helpful. I have a Cyclone 3 with EPCS16 that I'm trying to program using altasmi_parallel and altremote_update. I'm doing the following, but the old FPGA programming still persists: 

 

1. Generate the hexout file in quartus 2 

2. Erase the EPCS16 using altasmi_parallel bulk erase 

3. Write each byte of the hexout file (also reverse the bits) to the EPCS using altasmi_parallel writes 

4. Pulse the reconfig signal on the altremote_update block 

5. Reboot the system (just in case) 

 

The firmware doesn't update and the old behavior still persists. Any ideas if I'm missing a step? 

 

Thanks!
Altera_Forum
Honored Contributor II
140 Views

Hi Mark, 

sorry for the delayed reply. Are you sure you are writing the new programming files to the EEPROM? One of the steps we did after writing to the eeprom was read everything back and compare it with the write file and make sure eeprom got the new data. Is there a way for you to read the data back from eeprom after writing and verifying it?
Altera_Forum
Honored Contributor II
140 Views

Hi Suxilong, 

you may have already found the answer for this. Altera uses intel hex format 

https://en.wikipedia.org/wiki/intel_hex
Reply