Can I use file systems in SDK? when I tried running simple example(shown below) on ARM(in ZED board), it is not giving me any results. Can someone please tell me why it is so?
Hi there,
Thanks for the reply.
Sorry for the ambiguous question. I was thinking the ARM processor supports even the file systems which is not true. Now i realize.
But my doubt is that, if i want to process a 25MB file(image file), how do i do it in zed board. Because the vivado SDK hangs the moment i load it as a header file .
Thanks
I have a file which runs into few MBs (the file is in .txt format). I want to store it in DDR3 of zed board and read from there and write the data back to some other location of DDR3.
Hi thanks for the reply.
Now i want ot write float array to DDR3.
I have written the following code but when i read from memory, they are some random values.
can you help me?
There are actually many answers to the question, because the DDR RAM can be accessed in different ways.
- Mount part of the RAM as file system in case you are running Linux on the ZedBoard
- Access it through an optional file system under RTOS
- Access it directly through C-code
- Access it from FPGA fabric if configured as shared memory
Hi thanks for the reply.
Now i need to store a float array in DDR3 and access it.
I developed a code and ran it. But it gives me following result. Any suggestion?
The argument and result is 32-bit unsigned, so a float variable is automatically truncated to unsigned when storing it.
You need to copy the float bits to an u32 variable, not convert it to unsigned and vice versa when reading it. Can be done with an union or an "universal" typecast:
Code:
Xil_Out32(DDR_BASEADDR+(I*4), *((u32*)&img[I]));
val = *((float*)&Xil_In32(DDR_BASEADDR+(I*4)));