+ Post New Thread
Results 1 to 2 of 2
  1. #1
    Member level 3
    Points: 1,293, Level: 8

    Join Date
    Aug 2012
    Location
    chengdu
    Posts
    56
    Helped
    4 / 4
    Points
    1,293
    Level
    8

    What is written into FLASH really when using MCS file?

    I'm doing a project of remote programming the FPGA, basically I have to write MCS file into flash without using JTAG.

    Now I've known that MCS file has its own structure, like head, address, type, checksum, and also contains a ASCII representation of the original bitstream contents(two ASCII characters in MCS file to represent one byte in bitstream rawdata)

    I have 2 questions.
    1. Do I strip away all these head, address, type , length and checksum information, and ONLY transferring the raw data into FLASH? or Do I have to transfer MCS as a whole without any modification?

    2. If I only transfer the raw data, do I have to convert them back into hex form, like taking two ASCII characters as one hex byte, before writing the flash?


    I'm not sure whether the following is right or not.
    Click image for larger version. 

Name:	微信图片_20180514223528.jpg 
Views:	10 
Size:	82.3 KB 
ID:	146637

    •   Alt15th May 2018, 00:14

      advertising

        
       

  2. #2
    Super Moderator
    Points: 28,817, Level: 41
    ads-ee's Avatar
    Join Date
    Sep 2013
    Location
    USA
    Posts
    6,598
    Helped
    1595 / 1595
    Points
    28,817
    Level
    41

    Re: What is written into FLASH really when using MCS file?

    The entire statement:
    Only the bold text is actual data that will go into the PROM or flash. Also note that each character takes 9-bits in the file, but only represents 4-bits of data. That explains why the file is so much larger.
    says it all.

    The file is in ASCII, i.e. 8-bit characters representing the hex values 0-F (the 4-bits).

    The first 32-bits after the :, i.e. the 8 characters are the address location of the first byte of data. The last two characters is the checksum (which you should compute to verify the data you are planning to write is correct).



--[[ ]]--