Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
775 Views

Burn a rpd file on MAX10

I need to provide some interface to a user to download a rpd file into the chip. 

So I some questions 

What format of a rpd-file? byte-sized UTF-8 or may be some extended format like UTF-16? 

I write with Avalon-MM - it ofers a single word 32-bit (4 bytes) write - so what endianess of a rpd file? 

First I read all bytes  

byte raw_data = File.ReadAllBytes(burn_file_path);  

And then I send all bytes over a serial port 

for (int i = 0; i < raw_data.Length; i+=4) { word_to_write = (UInt32)((raw_data << 24) | (raw_data << 16) | (raw_data << 8) | raw_data); msg = WRITE_WORD + " " + word_to_write.ToString(); comport.Write(msg); progressBarBurnProgress.Value = i; response = ReadComPort(100, 10); if (response != ACK) { MessageBox.Show("Wrong response!"); return; } }  

 

So the question is - this way  

word_to_write = (UInt32)((raw_data << 24) | (raw_data << 16) | (raw_data << 8) | raw_data);  

or this 

word_to_write = (UInt32)((raw_data << 24) | (raw_data << 16) | (raw_data << 8) | raw_data[i);
0 Kudos
0 Replies