ΣSigmaStudio Ask AI Русский Log in

Total memory needed in EEPROM?

SigmaDSP & SigmaStudio ChristianH Jun 11, 2012 00:00 11 replies Original on forum ↗
Subscribe
ChristianH Question
Jun 11, 2012 00:00

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

Audio Signal Processors

e2prom

SigmaDSP Audio Processors

adau1701

self-boot

KKSL Reply
Jun 13, 2012 00:00

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

ADIApproved Reply
Jun 13, 2012 00:00

Hi all:

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

Regards

ChristianH Reply
Jun 14, 2012 00:00

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

ChristianH Reply
Jun 14, 2012 00:00

Thanks!

Regards

Christian

ADIApproved Reply
Jun 14, 2012 00:00

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.

KKSL Reply
Jun 14, 2012 00:00

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

ADIApproved Reply
Jun 14, 2012 00:00

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.

ADIApproved Reply
Jul 10, 2012 00:00

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:

5382ba5d5795d3bb65f64e08ac09cecf.jpg
5382ba5d5795d3bb65f64e08ac09cecf.jpg
5382ba5d5795d3bb65f64e08ac09cecf.jpg-264x297.jpg
5382ba5d5795d3bb65f64e08ac09cecf.jpg-264x297.jpg
351bdcbfef2c689537b15ff84e4b8e7c.jpg
351bdcbfef2c689537b15ff84e4b8e7c.jpg
351bdcbfef2c689537b15ff84e4b8e7c.jpg-281x281.jpg
351bdcbfef2c689537b15ff84e4b8e7c.jpg-281x281.jpg
J3627 Reply
Jun 5, 2013 00:00

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?

ADIApproved Reply
Jun 6, 2013 00:00

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.

ADIApproved Reply
Jun 6, 2013 00:00

J3627, I actually need to amend my previous statements after doing a quick check of the hardware.

It’s true that the memory must be filled with NOPs because the jump to start at the end of the frame is hardware controlled, not software controlled.

However, it’s false that the user has to write the whole memory. I just did a test on the hardware, and luckily, there is a small ROM that initializes the program memory at startup. It’s a very small program that copies inputs to outputs. The remainder of the program is full of NOPs. NOP op codes are 0x0000000001.

So, if you self-boot, you should just be overwriting this existing program, meaning that you only have to write the portion of the program memory you are using - the rest will be filled with NOPs.