AnsweredAssumed Answered

Calculating a Starting Address for 32-Bit Addresses for Sharc

Question asked by bookevg on Jan 7, 2012
Latest reply on Jan 9, 2012 by Harshit.Gaharwar

I work with ADSP21489.

I read SHARC® Processor Programming Reference (Includes ADSP-2136x, ADSP-2137x, and ADSP-214xx SHARC Processors) revision 2.2, but I can't understand Calculating a Starting Address for 32-Bit Addresses.

For ADSP21489

m = B + (3/2 (n – B)) + 1)

where:
• n is the first unused address after the end of 48-bit words
• B is the base normal word 48-bit address of the internal memory block
• m is the first 32-bit normal word address to use after the end of 48-bit words.

For the ADSP-21489 48 bit memory layout:
• block 0 = 0x8C000 <= n <= 0x93FFF.

Given a block of words in the range 0x8C000 to 0x8C001 (block 0), the next valid address is 0x8C002. The number of 48-bit words (n) is:
n = 0x8C002 - 0x80000 = 0x02.

When 0x02 is converted to decimal representation, the result is 2.

The base (B) normal word address of the internal memory block is 0x8C000. The first 32-bit normal word address to use after the end of the 48-bit words is given by:
m = 0x8C000 + (3/2 (2)) + 1
m = 0x8C000 + 0x04
m = 0x8C000 + 0x04 = 0x8C004
The first valid starting 32-bit address is 0x8C004.

This result is the error.

For the ADSP-21489 memory layout 32 bit:

• block 0 = 0x92000 <= n <= 0x9DFFF.

I think that the formula must be:

m = B_32bit + (3/2 (n – B_48bit)) + 1)

where:
• n is the first unused address after the end of 48-bit words
• B_48bit is the base normal word 48-bit address of the internal memory block

• B_32bit is the base normal word 32-bit address of the internal memory block

• m is the first 32-bit normal word address to use after the end of 48-bit words.

Given a block of words in the range 0x8C000 to 0x8C001 (block 0), the next valid address is 0x8C002. The number of 48-bit words (n) is:
n = 0x8C002 - 0x80000 = 0x02.

When 0x02 is converted to decimal representation, the result is 2.

The base (B) normal word address of the internal memory block is 0x8C000. The first 32-bit normal word address to use after the end of the
48-bit words is given by:
m = 0x92000 + (3/2 (2)) + 1
m = 0x92000 + 0x04
m = 0x92000 + 0x04 = 0x92004
The first valid starting 32-bit address is 0x92004.

This result is ok.

 

Message was edited by: Eugene Paymurzov

Outcomes