SPT3.1:About the range of the input address

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPT3.1:About the range of the input address

Jump to solution
616 Views
Shi_test
Contributor III

S32R45(RSDK_offline_example):

——I found A problem when I was using SPT:

I can't use both SRAM and DDR as input addresses.

In fact, I found that the input address parameter spacing cannot be very large.

 

		sptContext.kernelParList[0].paramType = RSDK_SPT_PARAM_TYPE_ADDR;
		sptContext.kernelParList[0].paramValue = (uintptr_t)input_0.phyAddr;

		sptContext.kernelParList[1].paramType = RSDK_SPT_PARAM_TYPE_ADDR;
		sptContext.kernelParList[1].paramValue = (uintptr_t)input_1.phyAddr;

		sptContext.kernelParList[2].paramType = RSDK_SPT_PARAM_TYPE_LAST;

 

 If 'input_0' AppMemAllocBuffer SRAM,'input_1' AppMemAllocBuffer DDR,SPT will error:

Shi_test_0-1688960718144.png

  • So I can only use one type of address?

0 Kudos
1 Solution
598 Views
GaryRK
NXP Employee
NXP Employee

Hello Shi_test,

This is a limitation of the RSDK example SPT kernels rather than the SPT hardware itself. The RSDK SPT kernels have address input parameters that are expressed as a 24-bit offset from a base address RSDK_SPT_CUBE_BASE_ADDR which is defined as a constant. For example, the linker can generate this symbol definition to indicate an SRAM base address:

 --defsym=RSDK_SPT_CUBE_BASE_ADDR=0x34000000.

It is not possible to provide an address argument which is an offset into DRAM address space when the base address is set to SRAM and vice versa.

To support both SRAM and DRAM addresses for PDMA commands in one SPT kernel you need to modify the SPT kernel to expand the input parameters to support a DRAM address argument. You could still use the RSDK_SPT_CUBE_BASE_ADDR based address parameters to supply SRAM offset arguments to the SPT kernel, while also adding new parameters to allow application code to provide DRAM based address to the SPT for use in a different PDMA command.

Best regards,

Gary

View solution in original post

2 Replies
599 Views
GaryRK
NXP Employee
NXP Employee

Hello Shi_test,

This is a limitation of the RSDK example SPT kernels rather than the SPT hardware itself. The RSDK SPT kernels have address input parameters that are expressed as a 24-bit offset from a base address RSDK_SPT_CUBE_BASE_ADDR which is defined as a constant. For example, the linker can generate this symbol definition to indicate an SRAM base address:

 --defsym=RSDK_SPT_CUBE_BASE_ADDR=0x34000000.

It is not possible to provide an address argument which is an offset into DRAM address space when the base address is set to SRAM and vice versa.

To support both SRAM and DRAM addresses for PDMA commands in one SPT kernel you need to modify the SPT kernel to expand the input parameters to support a DRAM address argument. You could still use the RSDK_SPT_CUBE_BASE_ADDR based address parameters to supply SRAM offset arguments to the SPT kernel, while also adding new parameters to allow application code to provide DRAM based address to the SPT for use in a different PDMA command.

Best regards,

Gary

438 Views
Shi_test
Contributor III

I noticed that the input address limit in the SPTdriver is 23 bits(8MB).Can I change it to 24(16MB)?

Shi_test_0-1693294064837.png

Can I use SPT to output 16 MB data?

 

0 Kudos