Hi, Danny,

I think you have two options:

1) Learn about mmap ("man mmap" is a good place to start) and use the info in 
core_info.tab (or the newer "*.info" files) to find the offsets to the 
device(s) you want.

OR

2) Use the KATCP "read" command which should be fairly fast if you run the 
client software on the ROACH2 and connect via "localhost".

Option 1 will run faster, but option 2 may be more than fast enough.  Option 2 
will be easier to develop provided you can find a KATCP client library that is 
compatible with your other (existing?) PPC codebase.  Option 2 will also be 
easier to manage long term since KATCP handles all the bof file specific 
details (e.g. device offsets) for you.

HTH,
Dave

On Feb 16, 2015, at 7:04 PM, Danny Price wrote:

> Hi all
> 
> I'd like to read data from the FPGA on the ROACH2 powerpc, then pack it into 
> UDP and send it out over Ethernet. Is there a straightforward and reasonably 
> efficient way to read registers/bram from the FPGA on the ROACH2 powerpc? 
> Better yet, has anyone implemented something already that they're happy to 
> share? We need a ~0.5MB transfer, triggered when a register is incremented 
> (once per second), so speed shouldn't be a major issue.
> 
> I know on the ROACH1 the BRAMs were available in /proc, and that the new 
> tcpborphserver3 on the ROACH2 memory maps through the 'device nodes' in 
> /dev/roach, but I'm not clear on how to read desired registers on the PPC 
> though this...
> 
> Thanks
> Danny
> 


Reply via email to