Hi Aniket I am sending a copy of this reply to the CASPER mailing list as others may be able to help or benefit from the help.
Firstly, if you have not already done so, I would recommend doing the CASPER tutorials available at (https://github.com/casper-astro/tutorials_devel). In particular, tut1 demonstrates communication via the PPC, and tut3 demonstrates the use of the Shared BRAM block, including some python to read from it. The Shared BRAM is a BRAM with two independent ports. One port is available to your DSP design, and one is available to be accessed from the PPC. The port available to the PPC is a fixed width of 32 bits. The port available to your DSP design is a whole fraction or multiple of this size (so 8, 16, 32, 64, 128) and is a parameter setting. The number of values to be stored must also be set as a parameter. The Shared BRAM functionality seen by your DSP design should simulate correctly in Simulink. In answer to some of your specific questions; 1. The address applied to the block should be the address location you want to access on that clock cycle. It can change on every clock cycle to any location that is needed. 2. The speed that it can be accessed from your DSP design is the same as for the rest of your design, one value can be accessed per clock cycle. The amount of data that can be accessed from software is determined (mostly) by the speed at which transactions can be done on the bus linking PPC to FPGA, and network latencies (if being accessed via katcp). Trying to get high data rates from software across this interface is generally not recommended. 10Gbe (or the 1Gbe direct connection to the FPGA available on ROACH2) should be used instead. 3. There is a software process on the PPC that can be used to access the Shared BRAMs via a protocol called KATCP. The tutorials recommended above give you more information and show you how to use this interface. Regards Andrew On Wed, Apr 29, 2015 at 7:14 AM, Aniket Hendre <[email protected]> wrote: > Dear Andrew, very good morning. > > Let me tell you first that I am new to CASPER environment and I am > learning it. I am working on ROACH 2. In ROACH 2 environment we have a > shared BRAM block. I am trying to understand how it works. So I did a very > simple design in which I want to write a data from counter to shared BRAM > and after storing I want to read or rather plot on scope. I have used 10 > bit counter. Now I have some doubts regarding its working as follows > > 1. What should be the input to the addr port of shared_BRAM block? Should > it be a constant starting address or should it be update to next address > for every iteration ? > > 2. What is maximum writing speed that supported by shared BRAM ? > > 3. How can I read or plot data stored in it, in simulation ? > > Thanks and Regards, > > *Aniket S. Hendre,* > *Project Engineer -C, * > *Giant Metrewave Radio Telescope,* > *Khodad, Pune, India 410504.* >

