嗨至强。
我不是专家,但也许我可以给你一些提示。
希望其他更有经验的人也能回答你(如果我错了,请纠正我)。
似乎每个EDK项目都带有一些测试(用于存储器和外围设备)。
您可以在编译比特流时开始启用它们,即使它们以非交互方式运行。
我曾经和petalinux一起工作,uboot bootloader也有一些内存测试。
无论如何,要从内存中读/写,只需使用正确的内存地址即可。
*(volatile unsigned int *)MEM_ADDR
*(volatile unsigned short *)MEM_ADDR
*(volatile unsigned char *)MEM_ADDR
您可以通过观察XPS项目中的地址映射找到正确的地址。
然后,您可以修改在比特流中编译的小程序的代码。
例如:
*(volatile unsigned int *)0x8000F000 = 24;
unsigned int x = *(volatile unsigned int *)0x8000F000;
或使用适当的附件功能(in_8,in_16,in_32,out_8,out_16,out_32,具体取决于您的软件环境)。
希望得到一些帮助。
如果您想要更精确的答案,请提供更多详细信息。
朱利奥
以上来自于谷歌翻译
以下为原文
Hi xeon.
I am no expert, but maybe I can give you a few hints. Hope somebody else more experienced could answer you as well (and correct me if I am wrong).
It seems that every EDK project comes with a few tests (for memory and peripherals). You can start to enable them when compiling the bitstream, even if they are run in a non interactive way.
I used to work with petalinux and uboot bootloader comes with some memory tests, too.
Anyway, to read/write from memory it simply a matter of using the right memory address.
*(volatile unsigned int *) MEM_ADDR
*(volatile unsigned short *) MEM_ADDR
*(volatile unsigned char *) MEM_ADDR
You can find the correct address by watching the address map in the XPS project.
Then you can modify the code of the little program that get compiled in the bitstream.
For example:
*(volatile unsigned int *) 0x8000F000 = 24;
unsigned int x = *(volatile unsigned int *) 0x8000F000;
or using the proper accessory functions (in_8, in_16, in_32, out_8, out_16, out_32 depending of your software environment).
Hope to have been of some help.
Please provide a few more details if you want a more precise answer.
Giulio
嗨至强。
我不是专家,但也许我可以给你一些提示。
希望其他更有经验的人也能回答你(如果我错了,请纠正我)。
似乎每个EDK项目都带有一些测试(用于存储器和外围设备)。
您可以在编译比特流时开始启用它们,即使它们以非交互方式运行。
我曾经和petalinux一起工作,uboot bootloader也有一些内存测试。
无论如何,要从内存中读/写,只需使用正确的内存地址即可。
*(volatile unsigned int *)MEM_ADDR
*(volatile unsigned short *)MEM_ADDR
*(volatile unsigned char *)MEM_ADDR
您可以通过观察XPS项目中的地址映射找到正确的地址。
然后,您可以修改在比特流中编译的小程序的代码。
例如:
*(volatile unsigned int *)0x8000F000 = 24;
unsigned int x = *(volatile unsigned int *)0x8000F000;
或使用适当的附件功能(in_8,in_16,in_32,out_8,out_16,out_32,具体取决于您的软件环境)。
希望得到一些帮助。
如果您想要更精确的答案,请提供更多详细信息。
朱利奥
以上来自于谷歌翻译
以下为原文
Hi xeon.
I am no expert, but maybe I can give you a few hints. Hope somebody else more experienced could answer you as well (and correct me if I am wrong).
It seems that every EDK project comes with a few tests (for memory and peripherals). You can start to enable them when compiling the bitstream, even if they are run in a non interactive way.
I used to work with petalinux and uboot bootloader comes with some memory tests, too.
Anyway, to read/write from memory it simply a matter of using the right memory address.
*(volatile unsigned int *) MEM_ADDR
*(volatile unsigned short *) MEM_ADDR
*(volatile unsigned char *) MEM_ADDR
You can find the correct address by watching the address map in the XPS project.
Then you can modify the code of the little program that get compiled in the bitstream.
For example:
*(volatile unsigned int *) 0x8000F000 = 24;
unsigned int x = *(volatile unsigned int *) 0x8000F000;
or using the proper accessory functions (in_8, in_16, in_32, out_8, out_16, out_32 depending of your software environment).
Hope to have been of some help.
Please provide a few more details if you want a more precise answer.
Giulio
举报