Wan,
I think that depends on how your programming language of choice treats the
file. For example, in C if you just open the file, you can read out one byte
at a time, or you could read 4 bytes at a time and cast it as a 32 bit
integer.
Glenn

On Mon, Jun 1, 2009 at 5:05 PM, <wan.ch...@csiro.au> wrote:

>  HI Glenn:
>
> Thanks for your great help. By the way, what's the offset when I read from
> snap_bram? 1 or 4?
>
> Thanks
>
> Wan
>
>  ------------------------------
> *From:* G Jones [mailto:glenn.calt...@gmail.com]
> *Sent:* Wednesday, 27 May 2009 11:31 AM
> *To:* Cheng, Wan (ATNF, Marsfield)
> *Cc:* casper@lists.berkeley.edu
> *Subject:* Re: [casper] FW: How to use snap?
>
> Wan,
> The simplest operation of the snap block is as follows:
> Write 0 to the snap_ctrl file/register
> Write 7 to the snap_ctrl file/register to force enable, trigger, and write
> enable to be true (look under the snap mask to see how it works)
> Read snap_addr and wait for it to be snaplength - 1 (2047 by default).
> Usually this is essentially instantaneous, so no need to actually check
> unless you want to be sure the snap captured something.
> Read the snap_bram file, which should be snaplength 4-byte words (2048x4
> bytes).
> Glenn
>
> On Tue, May 26, 2009 at 4:47 PM, <wan.ch...@csiro.au> wrote:
>
>>  Hi Henry:
>>
>> Could you please give me some idea about snap block?
>>
>> Thanks
>>
>> Wan
>>
>>  ------------------------------
>> *From:* Cheng, Wan (ATNF, Marsfield)
>> *Sent:* Tuesday, 26 May 2009 4:44 PM
>> *To:* 'casper-boun...@lists.berkeley.edu'
>> *Subject:* FW: How to use snap?
>>
>>  Any idea? How can I access the whole block ram of snap from the CPU?
>>
>> Thanks
>>
>> Wan
>>
>>  ------------------------------
>> *From:* Cheng, Wan (ATNF, Marsfield)
>> *Sent:* Monday, 25 May 2009 5:10 PM
>> *To:* 'casper-boun...@lists.berkeley.edu'
>> *Subject:* How to use snap?
>>
>>  Hi:
>>
>> I find the snap_addr of snap block is output only. Is there anyway, I can
>> read out all the data from the snap block memory. Is there anyway I can
>> specify the read address?
>>
>> Thanks
>>
>> Wan
>>
>
>

Reply via email to