Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

File system in vivado SDK to run on ZED board

Status
Not open for further replies.

sai_shashi

Junior Member level 3
Joined
Jan 20, 2017
Messages
25
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
240
Hello there,

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? file_sdk.PNG
 

Your question is rather surprising, I don't understand....

What relation does this text file residing on your PC's HDD have w.r.t. ZED board?
 

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
 

storing a file in DDR3 memory of zed board

HI experts.

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.

Can someone help me here?

Thanks in advance.
 

Re: storing a file in DDR3 memory of zed board

I got the desired results by using the Google search phrase : zedboard + reading and writing to DDR3

Read the threads of the Xilinx community forum and zedboard.org
 
Re: storing a file in DDR3 memory of zed board

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?


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[I]#include <stdio.h>
#include "platform.h"
#include "xil_printf.h"
#include "xil_io.h"
#include "xparameters.h"
 
#define DDR_BASEADDR 0x01000000
 
int main()
{
     init_platform();
    int i;
   float img[5] = {11.2345 ,17.2135 ,11.65 ,18.543 ,7.6789};
 
    for (i = 0; i <5; i++) {
        Xil_Out32(DDR_BASEADDR+(i*4),img[i]);
        }
    cleanup_platform();
    return 0;
} [/I]

 
Last edited by a moderator:

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?

float.PNG
 

That's just automatic C type conversion. Look at the Xil_xxx function prototypes
Code:
void Xil_Out32(u32 Addr, u32 Value)
u32 Xil_In32(u32 Addr)

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)));
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top