Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
9 years ago

Compress and optimize application

I have an application when converted to hex, creates 850 KB file size. I need this application to sit in on-chip memory of 5CEFA5F23C device. The max on-chip memory size which could be assigned is 412000 Bytes. I need to somehow compress the hex file in order for it to fit in on-chip memory. Can you please suggest a way to do this? I am using NIOS II EDS V14.1

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I have an application when converted to hex, creates 850 KB file size. I need this application to sit in on-chip memory of 5CEFA5F23C device. The max on-chip memory size which could be assigned is 412000 Bytes. I need to somehow compress the hex file in order for it to fit in on-chip memory. Can you please suggest a way to do this? I am using NIOS II EDS V14.1

    --- Quote End ---

    You might try one of the LZRW algorithms, I used one several years ago to improve on Altera's compression. Here is a link: http://www.ross.net/compression/
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have made one observation. I generated elf with highest optimization flag and could reduce the size of elf by around 400KB. Now the size of elf is 1300 KB. When I generate hex file using mem_init_generate, it always converts elf file to hex file with a size of 849KB. No matter what the size of elf is, the size of hex file does not change.. Why is it so????