Mar 5 2010, 09:33 AM
Post
#1
|
|
|
Member ![]() ![]() Group: Members Posts: 3 Joined: 7-January 10 Member No.: 2,576 |
Hello
I am going to implement ImageFilterDMA tutorial on Xilinx ML403 board (Virtex 4 FPGA) using Xilinx ISE 10.1. In the co_init.c line 56 and 57 there are these function calls : CODE image=co_memory_create("image","plbmem",524288,alloc_shared); image2=co_memory_create("image2","plbmem",524288,alloc_shared); when I try to build software for PowerPC in Xilinx XPS, it report undefined reference to `alloc_shared' error because void * alloc_shared() function does not implement any where. its definition only come on the line 27 of co_init.c file like this: CODE extern void *alloc_shared(size_t); but I can't find it's implementation any where in Impulse or Xilinx libraries. I will appreciate if any one help me to run Tutorial. Note that in img_sw.c there are similar implementation for void * ext0_alloc() but I don't think it would be useful: CODE #ifdef __PPC__ void *ext0_alloc(size_t size) { static unsigned int address=XPAR_SDRAM_8MX32_BASEADDR; void *ret; if ((address+size) > XPAR_SDRAM_8MX32_HIGHADDR) return(NULL); ret=(void *) address; address+=size; return(ret); } #endif |
|
|
|
![]() |
Mar 5 2010, 10:45 AM
Post
#2
|
|
|
Member ![]() ![]() Group: Members Posts: 3 Joined: 7-January 10 Member No.: 2,576 |
Note if I use void * ext0_alloc() intead of void *alloc_shared() function , the ImageFilterDMA application will build successfully but running executable.elf on PPC result the following error in RS_232 terminal output :
co_memory alloc failed! this error raise from co_memory_cread() function in co_memory.c file : CODE co_memory co_memory_create(char *name, char *loc, unsigned int size, void *(*alloc)(size_t)) { co_memory m; m = (co_memory) malloc(sizeof(co_memory_t)); if (m != NULL) { m->name = (name != NULL) ? strdup(name) : NULL; m->data = (*alloc)(size); if (m->data == NULL) print("co_memory alloc failed!"); m->size = size; } else print("malloc failed!"); return(m); } I will appreciate if any one can help me to find correct implementation of void* alloc_shared() function ? |
|
|
|
Mar 7 2010, 10:40 AM
Post
#3
|
|
|
Member ![]() ![]() Group: Members Posts: 3 Joined: 7-January 10 Member No.: 2,576 |
Thanks for Good support
I appreciate Impulse for their product and well documentations, In this special topic, I can handle to correct all issues in the ImageFilterDMA tutorial. |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 10th September 2010 - 11:17 AM |