Post Go back to editing

Total memory needed in EEPROM?

Hi,

I'm just wondering how can I find out how much memory I really need for my finished project in the EEPROM.

We have a design where we switch from the 1702 to the 1701 that has more processing power.

Further we have an 8kB EEPROM in the design for self-booting the device that should not be changed for the 1701.

The data sheet says that normally an 8kB should be sufficient for the 1701 (for the 1702 it's not a problem).

1) Is it simply program memory x4 Bytes + parameter memory x5 Bytes (if I do not use any writeback / interface registers)?

2) Can the "E2Prom.Hex" file give me the correct size? E.g. my "E2Prom.Hex" has 1012 line x8 Bytes so I need 8096 bytes total? What if more that 8192 bytes would be needed, will the "E2Prom.Hex" then have more than 1024 lines? Would there be an error message when I try to write such a project to the EEPROM?

Thanks

Christian

  • As stated by you in 1. it is simply that.

    For ADAU1701: 9248 bytes = 9.03125KB

    For ADAU1761: 73728 bytes = 72KB

    For ADAU144x: 40960 bytes = 40KB

    For AD194x: 92.288 bytes = 90.125KB

  • Hi all:

    In standard naming convention kB is Killo Bytes and kb are Kilo Bits. The numbers here are in kbits.

    Regards

  • Hi,

    my question was how much memory needs my design.

    I know what maximum size the program can have depending on the chip used.

    So I assume I can take the numbers from "compiler_output.txt" and multiply / add them instructions x4 + parameters x5.

    Regards

    Christian

  • Hi Christian,

    In the case of the ADAU1701, the full program RAM needs to be downloaded each time (regardless of the program size), because the program counter is hardware-based, not software based. So, you'll always need 1024 * 5 = 5120 bytes for program memory. You'll also need a core register write at the beginning and end of the download (2 bytes each, 4 bytes total), and 24 bytes for register configuration.

    The parameter memory, however, is totally program-dependent. You could theoretically have a really simple program (input-to-output) with no parameters. On the other hand, you could potentially use the entire 1k parameter memory for 4096 bytes. However, most programs will fall between these two extremes.

    The EEPROM image includes some overhead for write commands and subaddresses, so that will add on roughly 20 bytes to the total.

    I think checking the "E2Prom.Hex" file size (#2 in your original post) is the best method. You should be able to use the (number of lines)*(bytes per line) calculation to determine the total size.

  • Again, is it bits or bytes that we are talking about?

  • KKSL,

    In my post above, I am talking about bytes.

    If you look at the maximum ADAU1701 EEPROM image, you have the following:

    2 bytes for core mute

    5120 bytes for Program Data

    4096 bytes for Parameter Data

    24 bytes for configuration registers

    2 bytes for core unmute

    20 bytes (approximately) of overhead for the EEPROM format

    ______________________________

    9264 bytes total (absolute worst case)

    or

    9 kB

    x 8 bits per byte =

    74112 bits total

    or

    72.4 kbits

    However, in real programs, the utilized parameter RAM will probably be much smaller than in this example.

  • Hi everyone,

    I just wanted to correct the explanation above. Standard SI notation uses a capital "B" for bytes and the word "bit" for bits.

    Here's an explanation of SI and IEC definitions of units for bits and bytes, from Wikipedia:

  • BrettG wrote:

    In the case of the ADAU1701, the full program RAM needs to be downloaded each time (regardless of the program size), because the program counter is hardware-based, not software based. So, you'll always need 1024 * 5 = 5120 bytes for program memory.

    Does this mean you can't use a 4 KiB EEPROM, even if your program is small enough?

  • Yes, that's correct. Unfortunately, the ADAU1701 has no "jump to start" instruction, so the program must be filled with valid op-codes in order for it to operate. This necessitates 5120 bytes of program memory, regardless of the program size.

    This problem was fixed in later SigmaDSPs like the ADAU1442 and ADAU1761, which have "jump to start" instructions.