DSPRelated.com
Forums

16-bit SDRAM for C6722

Started by iddq...@gmail.com August 4, 2008
Hi

I am using the C6722 with one 16-bit SDRAM. Does that mean I can only perform 16-bits read and write to the SDRAM ?
I am trying to load some 32-bits pre-defined variables from the eeprom to the SDRAM. Most of the values are correct when loading to SDRAM, but some of them become just random values. Is any mathod to load the 32-bit value to the 16-bit SDRAM ?

Best regards
Peter
Hi all,
Can someone please send me a simple file which I can load in c6713, speak in a microphone connected to mic in, and can either hear this from line out, or at least can store it in a buffer?
A timely help will be deeply appreciated.
Thanks a lot.
Peter,

On Mon, Aug 4, 2008 at 8:42 AM, wrote:
> Hi
>
> I am using the C6722 with one 16-bit SDRAM. Does that mean I can only
> perform 16-bits read and write to the SDRAM ?


No.
If CE0 is configured as a 16 bit wide bus, all operations should
appear to the programmer exactly like they do on a device with a 32
bit wide memory. The only difference is that 32 bit accesses will
take 2 memory cycles instead of one. Except for performance related
issues, the memory width is transparent to the programmer.

mikedunn
> I am trying to load some 32-bits pre-defined variables from the eeprom to
> the SDRAM. Most of the values are correct when loading to SDRAM, but some of
> them become just random values. Is any mathod to load the 32-bit value to
> the 16-bit SDRAM ?
>
> Best regards
> Peter

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
Hi

Thanks for your reply, Mike.
That is what I thought too, however, when I do some 32-bit read or
write to the SDRAM in the code, the SDRAM crashed. All data become
some random values. I have to convert all 32-bit data into two 16bit
in the code before I read or write to the SDRAM to make it operate
correctly. I have checked the EMIF setup for lots of times so no
problem should be there. My DSP speed is 200MHz, dMAX is 100MHz, and
EMIF is 100MHz, does the speed ratio effect the SDRAM or might be
anything else? Thanks you.

Best regards
Peter
On 04/08/2008, Michael Dunn wrote:
> Peter,
>
> On Mon, Aug 4, 2008 at 8:42 AM, wrote:
>> Hi
>>
>> I am using the C6722 with one 16-bit SDRAM. Does that mean I can only
>> perform 16-bits read and write to the SDRAM ?
>
>
> No.
> If CE0 is configured as a 16 bit wide bus, all operations should
> appear to the programmer exactly like they do on a device with a 32
> bit wide memory. The only difference is that 32 bit accesses will
> take 2 memory cycles instead of one. Except for performance related
> issues, the memory width is transparent to the programmer.
>
> mikedunn
>> I am trying to load some 32-bits pre-defined variables from the eeprom to
>> the SDRAM. Most of the values are correct when loading to SDRAM, but some
>> of
>> them become just random values. Is any mathod to load the 32-bit value to
>> the 16-bit SDRAM ?
>>
>> Best regards
>> Peter
>>
>> --
> www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
>
Peter,

On Mon, Aug 4, 2008 at 6:47 PM, Peter Wu wrote:
> Hi
>
> Thanks for your reply, Mike.
> That is what I thought too, however, when I do some 32-bit read or
> write to the SDRAM in the code, the SDRAM crashed.

Do you execute code from SDRAM??
NOTE: When you execute code from SDRAM, you are always doing multiple
'32 bit' fetches.

> All data become
> some random values.

Do all data locations contain the 'same random value'??
If yes...
1. Did your program write the value?? [probably not]
2. If #1 = NO, I suspect a failure related to the SDRAM. Like
A. Power supply glitch
B. Refresh failure
C. Noisy SDRAM control line

> I have to convert all 32-bit data into two 16bit
> in the code before I read or write to the SDRAM to make it operate
> correctly. I have checked the EMIF setup for lots of times so no
> problem should be there.

I know that you have been through the SDRAM datasheet and memory
setup many times, but until you 'get more clues' there is always of
possibility that we haven't thought of something...

> My DSP speed is 200MHz, dMAX is 100MHz, and
> EMIF is 100MHz, does the speed ratio effect the SDRAM or might be
> anything else?

The ratio will not affect you - you could run 300Mhz w/50Mhz
EMIF or 100Mhz w/100Mhz EMIF as long as the hardware supports it.

mikedunn
> Thanks you.
>
> Best regards
> Peter
> On 04/08/2008, Michael Dunn wrote:
>> Peter,
>>
>> On Mon, Aug 4, 2008 at 8:42 AM, wrote:
>>> Hi
>>>
>>> I am using the C6722 with one 16-bit SDRAM. Does that mean I can only
>>> perform 16-bits read and write to the SDRAM ?
>>
>>
>> No.
>> If CE0 is configured as a 16 bit wide bus, all operations should
>> appear to the programmer exactly like they do on a device with a 32
>> bit wide memory. The only difference is that 32 bit accesses will
>> take 2 memory cycles instead of one. Except for performance related
>> issues, the memory width is transparent to the programmer.
>>
>> mikedunn
>>> I am trying to load some 32-bits pre-defined variables from the eeprom to
>>> the SDRAM. Most of the values are correct when loading to SDRAM, but some
>>> of
>>> them become just random values. Is any mathod to load the 32-bit value to
>>> the 16-bit SDRAM ?
>>>
>>> Best regards
>>> Peter
>>>
>>> --
>> www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
>
--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
Hi Mike

> Do all data locations contain the 'same random value'??
>If yes...
>1. Did your program write the value?? [probably not]
>2. If #1 = NO, I suspect a failure related to the SDRAM. Like
> A. Power supply glitch
> B. Refresh failure
> C. Noisy SDRAM control line

Good call Mike, the answer is C. I do some modify on the control line,
and now it's work.

> Do you execute code from SDRAM??
>NOTE: When you execute code from SDRAM, you are always doing multiple
>'32 bit' fetches.

So far I execute the code from internal ram. But I want to dump the
code to the SDRAM. So according what you said, do you mean I can't
execute code from SDRAM, or you mean it takes double cycles to execute
it in SDRAM.

Last time you mentioned that I can still perform the 32-bits read and
write to the 16bit SDRAM, but just not so efficient. How about 64bit
read and write? Can I still perform it, but just take 4 times more
cycles to do it?

Best regards
Peter
On 05/08/2008, Michael Dunn wrote:
> Peter,
>
> On Mon, Aug 4, 2008 at 6:47 PM, Peter Wu wrote:
>> Hi
>>
>> Thanks for your reply, Mike.
>> That is what I thought too, however, when I do some 32-bit read or
>> write to the SDRAM in the code, the SDRAM crashed.
>
> Do you execute code from SDRAM??
> NOTE: When you execute code from SDRAM, you are always doing multiple
> '32 bit' fetches.
>
>> All data become
>> some random values.
>
> Do all data locations contain the 'same random value'??
> If yes...
> 1. Did your program write the value?? [probably not]
> 2. If #1 = NO, I suspect a failure related to the SDRAM. Like
> A. Power supply glitch
> B. Refresh failure
> C. Noisy SDRAM control line
>
>> I have to convert all 32-bit data into two 16bit
>> in the code before I read or write to the SDRAM to make it operate
>> correctly. I have checked the EMIF setup for lots of times so no
>> problem should be there.
>
> I know that you have been through the SDRAM datasheet and memory
> setup many times, but until you 'get more clues' there is always of
> possibility that we haven't thought of something...
>
>> My DSP speed is 200MHz, dMAX is 100MHz, and
>> EMIF is 100MHz, does the speed ratio effect the SDRAM or might be
>> anything else?
>
> The ratio will not affect you - you could run 300Mhz w/50Mhz
> EMIF or 100Mhz w/100Mhz EMIF as long as the hardware supports it.
>
> mikedunn
>> Thanks you.
>>
>> Best regards
>> Peter
>> On 04/08/2008, Michael Dunn wrote:
>>> Peter,
>>>
>>> On Mon, Aug 4, 2008 at 8:42 AM, wrote:
>>>> Hi
>>>>
>>>> I am using the C6722 with one 16-bit SDRAM. Does that mean I can only
>>>> perform 16-bits read and write to the SDRAM ?
>>>
>>>
>>> No.
>>> If CE0 is configured as a 16 bit wide bus, all operations should
>>> appear to the programmer exactly like they do on a device with a 32
>>> bit wide memory. The only difference is that 32 bit accesses will
>>> take 2 memory cycles instead of one. Except for performance related
>>> issues, the memory width is transparent to the programmer.
>>>
>>> mikedunn
>>>> I am trying to load some 32-bits pre-defined variables from the eeprom
>>>> to
>>>> the SDRAM. Most of the values are correct when loading to SDRAM, but
>>>> some
>>>> of
>>>> them become just random values. Is any mathod to load the 32-bit value
>>>> to
>>>> the 16-bit SDRAM ?
>>>>
>>>> Best regards
>>>> Peter
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
>>>
>> --
> www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
>
Hello Peter,

On Tue, Aug 5, 2008 at 6:37 PM, Peter Wu wrote:
> Hi Mike
>
>> Do all data locations contain the 'same random value'??
>>If yes...
>>1. Did your program write the value?? [probably not]
>>2. If #1 = NO, I suspect a failure related to the SDRAM. Like
>> A. Power supply glitch
>> B. Refresh failure
>> C. Noisy SDRAM control line
>
> Good call Mike, the answer is C. I do some modify on the control line,
> and now it's work.
>
>> Do you execute code from SDRAM??
>>NOTE: When you execute code from SDRAM, you are always doing multiple
>>'32 bit' fetches.
>
> So far I execute the code from internal ram. But I want to dump the
> code to the SDRAM. So according what you said, do you mean I can't
> execute code from SDRAM, or you mean it takes double cycles to execute
> it in SDRAM.

There is no problem executing from SDRAM when everything is working
correctly :-)
If you would have told me that you were executing from SDRAM correctly
[requires memory reads] but could not read data correctly, I would
have been confused.

>
> Last time you mentioned that I can still perform the 32-bits read and
> write to the 16bit SDRAM, but just not so efficient. How about 64bit
> read and write? Can I still perform it, but just take 4 times more
> cycles to do it?

Correct. I know that 672x supports LDDW but I do not remember if it
has a STDW instruction.
With a correctly working memory you can execute any legal memory
instruction for the 672x - even if the external memory is only 8 [or
16] bits wide.

You should be able to change your linker command file and compile you
project to run entirely in external memory. If you take some timing
measurements using 'all internal mem' and 'all external mem' it will
give you some idea of the [large] difference in performance.

mikedunn
>
> Best regards
> Peter
> On 05/08/2008, Michael Dunn wrote:
>> Peter,
>>
>> On Mon, Aug 4, 2008 at 6:47 PM, Peter Wu wrote:
>>> Hi
>>>
>>> Thanks for your reply, Mike.
>>> That is what I thought too, however, when I do some 32-bit read or
>>> write to the SDRAM in the code, the SDRAM crashed.
>>
>> Do you execute code from SDRAM??
>> NOTE: When you execute code from SDRAM, you are always doing multiple
>> '32 bit' fetches.
>>
>>> All data become
>>> some random values.
>>
>> Do all data locations contain the 'same random value'??
>> If yes...
>> 1. Did your program write the value?? [probably not]
>> 2. If #1 = NO, I suspect a failure related to the SDRAM. Like
>> A. Power supply glitch
>> B. Refresh failure
>> C. Noisy SDRAM control line
>>
>>> I have to convert all 32-bit data into two 16bit
>>> in the code before I read or write to the SDRAM to make it operate
>>> correctly. I have checked the EMIF setup for lots of times so no
>>> problem should be there.
>>
>> I know that you have been through the SDRAM datasheet and memory
>> setup many times, but until you 'get more clues' there is always of
>> possibility that we haven't thought of something...
>>
>>> My DSP speed is 200MHz, dMAX is 100MHz, and
>>> EMIF is 100MHz, does the speed ratio effect the SDRAM or might be
>>> anything else?
>>
>> The ratio will not affect you - you could run 300Mhz w/50Mhz
>> EMIF or 100Mhz w/100Mhz EMIF as long as the hardware supports it.
>>
>> mikedunn
>>> Thanks you.
>>>
>>> Best regards
>>> Peter
>>>
>>>
>>> On 04/08/2008, Michael Dunn wrote:
>>>> Peter,
>>>>
>>>> On Mon, Aug 4, 2008 at 8:42 AM, wrote:
>>>>> Hi
>>>>>
>>>>> I am using the C6722 with one 16-bit SDRAM. Does that mean I can only
>>>>> perform 16-bits read and write to the SDRAM ?
>>>>
>>>>
>>>> No.
>>>> If CE0 is configured as a 16 bit wide bus, all operations should
>>>> appear to the programmer exactly like they do on a device with a 32
>>>> bit wide memory. The only difference is that 32 bit accesses will
>>>> take 2 memory cycles instead of one. Except for performance related
>>>> issues, the memory width is transparent to the programmer.
>>>>
>>>> mikedunn
>>>>> I am trying to load some 32-bits pre-defined variables from the eeprom
>>>>> to
>>>>> the SDRAM. Most of the values are correct when loading to SDRAM, but
>>>>> some
>>>>> of
>>>>> them become just random values. Is any mathod to load the 32-bit value
>>>>> to
>>>>> the 16-bit SDRAM ?
>>>>>
>>>>> Best regards
>>>>> Peter
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
>>>>
>>> --
>> www.dsprelated.com/blogs-1/nf/Mike_Dunn.php
>
--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php