Closed ekfriis closed 11 years ago
Well, the amount transferred in each exchange should be min(data_in_tx_buffer, size_of_ram)
where size_of_ram
is determined in the FPGA firmware by Mathias. The examples I made assume that size_of_ram = 1
- this will definitely have to be updated. It should be somehow configurable in the protocol (maybe a member of the VMEStream state struct).
NB that regardless, cbuffer_pop_front will always return a single value. See here [1] for cbuffer_pop, which will return a buffer with more than one element.
[1] https://svnweb.cern.ch/trac/cactus/browser/trunk/cactuscore/softipbus/include/circular_buffer.h#L75
In this case size_of_ram = 1
means 1 word, correct?
Yes.
On Tuesday, August 20, 2013, Austin Belknap wrote:
In this case size_of_ram = 1 means 1 word, correct?
— Reply to this email directly or view it on GitHubhttps://github.com/dabelknap/VMEStream/pull/2#issuecomment-22948959 .
I got VMEStream to where it passes the tests.
Cool! Now I would try to update the tests to be a bit more general
1) size_of_ram > 1 2) a test where there is more space in the RAM than there is data to transfer (it should just transfer the right amount) 3) where there is not enough space in the RX buffer to read the input data (nothing should happen, the data should stay in limbo until there is enough space to read it out)
I added in a few more tests with these conditions. Everything appears to work fine.
On Aug 21, 2013, at 3:02 PM, Evan K. Friis notifications@github.com wrote:
Cool! Now I would try to update the tests to be a bit more general
1) size_of_ram > 1 2) a test where there is more space in the RAM than there is data to transfer (it should just transfer the right amount) 3) where there is not enough space in the RX buffer to read the input data (nothing should happen, the data should stay in limbo until there is enough space to read it out)
— Reply to this email directly or view it on GitHub.
Hi Austin,
Here are some additional (failing) tests which I think should exercise the protocol. I wrote this quickly so please be advised that I may have gotten something wrong and don't take it as gospel. Here is the data exchange protocol description again for posterity.
Let me know if this doesn't make sense!
Evan