Read stream of data from a single memory location to client

Discussion to talk about software related topics only.
Post Reply
mburke
Posts: 2
Joined: Mon Sep 08, 2014 9:21 am

Read stream of data from a single memory location to client

Post by mburke »

I have what would seem to be a simple operation. I have an FPGA that connects to a MOD54415 through CS4 and CS5. Everything is functioning through these interfaces including reading of FPGA board based memory from a single memory location ( CS4+0). The FPGA auto increments the address of the FPGA board internal memory after each read. The memory is 4M by 16.

What I would like to be able to do is have the client machine to read data from this one location to store the data in a file. The problem is that most protocols assume a file structure that involves pointer to an array. How can one effectively the file with something like a pointer that never increments? Failing that is there some means that data transfer of this kind can be achieved?

Thanks
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Read stream of data from a single memory location to cli

Post by rnixon »

In the netburner code, can't you declare an array and continuously read from that one location to fill it?
Then check to see if a client has connected to the netburner via tcp, and send data from that buffer when available?
mburke
Posts: 2
Joined: Mon Sep 08, 2014 9:21 am

Re: Read stream of data from a single memory location to cli

Post by mburke »

Thanks for the reply rnixon,

Yes I can read form the one location and store it in an array. The problem is the array will be too large if I want to point to the entire memory on the fpga board.
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Read stream of data from a single memory location to cli

Post by rnixon »

You have 64MB of ram, and you say your data is 4M x 16 = 8MB. What can't that be stored?
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: Read stream of data from a single memory location to cli

Post by pbreed »

A Lot of this answer depends on what performance you are trying to achieve?

You can also set up DMA to do this on the MOD54415...

If you want to do it in code, look at the assembly language memcpy..
in ucosmcfa.s

Need to be aware that both the destination and the code is in DDRRAM....
Not switching back and forth speeds things up...
so
read,read,read,read,read,read,read,
write write,write,write,write,write,write


is faster than read,write,read,write etc...


Do you know the size of the read/transfer before you kick it off?
If your going to send this on a TCP stream there are addition things that can be done to speed things up...
Post Reply