uwcms / cms-calo-layer1

Xilinx Microblaze Projects for RCT Upgrade
2 stars 8 forks source link

Write oRSC BE VMEStream -> SPIStream code #9

Closed ekfriis closed 11 years ago

ekfriis commented 11 years ago

This standalone package should live on the oRSC backend, receive data over VMEstream and forward it via SPIStream to the backend.

Will be 1/2 based on the validation code in #8, and half on orsc_be_spi_echo_test.

ekfriis commented 11 years ago

Hi @dabelknap, can you try to do this? It should live in orsc_be_ipbus and the first version should be similar to #8 and orsc_be_spi_echo_test, except instead of echoing like #8 you connect the VMEstream receive cbuffer to the SPIStream transmit cbuffer, and vice versa.

dabelknap commented 11 years ago

In other words, I use orsc_fe_spi_echo_test/src/spiecho.c and orsc_be_vmestream_echo_test/src/vmestream_echo.c as starting points, and place the result in orsc_be_ipbus. Call it vme2spi.c, or something simliar. Sound right?

ekfriis commented 11 years ago

Exactly!

On Fri, Oct 4, 2013 at 1:44 PM, Austin Belknap notifications@github.comwrote:

In other words, I use orsc_fe_spi_echo_test/src/spiecho.c and orsc_be_vmestream_echo_test/src/vmestream_echo.c as starting points, and place the result in orsc_be_ipbus. Call it vme2spi.c, or something simliar. Sound right?

— Reply to this email directly or view it on GitHubhttps://github.com/uwcms/cms-calo-layer1/issues/9#issuecomment-25692953 .

dabelknap commented 11 years ago

How exactly is a SPI transfer triggered? I don't see any "transfer" calls made in the loop: https://github.com/uwcms/cms-calo-layer1/blob/master/orsc_be_spi_echo_test/src/spiecho.c#L122

dabelknap commented 11 years ago

Okay, so data is transferred automatically in/out of the SPIStream buffers without explicit calls (https://github.com/dabelknap/cms-calo-layer1/tree/master/spistream/README.md), correct?

ekfriis commented 11 years ago

Yes, it is "interrupt driven" - however, there may be an error in how it is setup, since it is untested.

Checkout uart_echo_test for a working example of interrupt handling (for a different device type).

On Mon, Oct 7, 2013 at 10:27 AM, Austin Belknap notifications@github.comwrote:

Okay, so data is transferred automatically in/out of the SPIStream buffers without explicit calls ( https://github.com/dabelknap/cms-calo-layer1/tree/master/spistream), correct?

— Reply to this email directly or view it on GitHubhttps://github.com/uwcms/cms-calo-layer1/issues/9#issuecomment-25791853 .

ekfriis commented 11 years ago

Done, to be tested.