I came to the state, when the internal program memory area in ADSP-21371 is small enough for my program. It is approx. 25 % of the internal RAM, the next 75 % are for data and can not be reduced.
Therefore I put several programs parts to the SDRAM and they are executed from SDRAM. It is very effective, because the program, that is intensive for speed is in internal RAM and the rest of the program (mostly for configuration etc. ) is executed from SDRAM. This works great, because I am working with EZ-KIT Lite and the program is putted to the SDRAM by Visual DSP by "Rebuild All".
The question is:
How to add program to the SDRAM in "stand alone" hardware, where the DSP is booted from SPI FLASH?
I know that Visual DSP is able to create the "ROM" file, that can be programmed to the FLASH, and then the DSP is booted from that FLASH.
If I will use a big enough FLASH, it is possible to create the "ROM" file by Visual DSP, that will include the internal program and data memory as well as SDRAM program and memory parts?
Hi Afinko,
When the application is tested using emulator, the code is loaded into the external memory using emulator. The external memory should be initialized before loading the code and this is taken care by .xml settings. When the application is running standalone, the boot kernel loads the application. The boot kernel consists of 256 instructions. These 256 instructions are loaded into the internal memory initially and this code loads the complete application and overwrites it self. In order to load the application in the external memory, the boot kernel should initialize the SDRAM. Please refer the below link for the boot kernel source code:
C:\Program Files\Analog Devices\VisualDSP 5.0\213xx\ldr\375_spi
You can modify the User_init section as per the PLL speed and the SDRAM used in your application. The boot kernel will be automatically added to the application code when the loader file is generated. The boot kernel uses the tags generated by the loader utility and copies the program/data to internal memory/external memory accordingly.
Please refer the loader manual for more details on how the loader utility works.
Best Regards,
Jeyanthi
Hi Jeyanthi,
I found that when I am building loader file in VisualDSP for ADSP-21371, it will use the default kernel from:
C:\Program Files\Analog Devices\VisualDSP 5.0\213xx\ldr\369_prom.dxe
In this Kernel, the Core clock is set to the 331.776 MHz, but the max Core Clock of ADSP-21371 is 266 MHz.
I would prefer to use "as default" kernel for ADSP-21371 processors the kernel from ADSP-21375:
C:\Program Files\Analog Devices\VisualDSP 5.0\213xx\ldr\375_prom.dxe or 375_spi.dxe
However, in this case, the SDRAM is configured as 16-bit instead of the 32-bit.
Therefore, maybe it would be best to create a kernel also for ADSP-21371 and put it to the:
C:\Program Files\Analog Devices\VisualDSP 5.0\213xx\ldr\
Maybe in new Visual DSP update ![]()
By the way, do I need to send such information to the AD support, or someone from AD that read this forum will take care about it?
Best regards,
Afi
Hi Afi,
Thanks for pointing this out. We are already working on this item. I will work with the tools team to get this on the next VDSP++ update.
Best Regards,
Jeyanthi
Great, can you pleas look also at several errors in code that I pointed here:
http://ez.analog.com/message/4895#4895
Especialy the bit SDCAW9 in InitSDRAM is wrong in almost all exaples for ADSP-21371, SDCAW8 should be used.
Thanks.
Afi
Hi Afi,
I have confirmed that the correction you have pointed out is also taken care. These modifications should be available with the next VDSP++ update.
Best Regards,
Jeyanthi