VXI and VME

cancel
Showing results for 
Search instead for 
Did you mean: 

BLT Transfers with VME-PCI8015

I am trying to do BLT reads and writes from/to a VME memory card in my chassis using the subject cards and am having some trouble.  I know that I have set the block transfer mode appropriately in the attributes (using SetAttributeInt16(AttributeType.SrcAccessPriv, AccessPrivilege.BlockNonprivileged for reads and the .DestAccessPriv for writes) as I have verified it with a logic analyzer.  I also know that the VME memory card supports BLT transfer modes.  Finally, other transfer modes (D8E0, D16) seem to work perfectly, it is only BLT that is causing trouble.

In my test, I use BLT transfer mode to write 32 bytes of 0x0A to address 0x500.  If I then read back this 32 bytes (using D8E0 transfer mode), I can see only certain bytes have been set to 0x0A.  If I instead read back the 32 bytes using BLT transfer mode, the first byte comes back as 0x0A but all subsequent bytes are 0xFF.  Clearly, I am doing something wrong.  In all cases, I am using a MoveIn8 and MoveOut8 command (after first setting the attributes properly).  This is a VB.Net project.

Here is a snip from my own application's log that shows what is happening:


05/03/2008-11:51:58.174> Address Modifier: Block--NonPriv
05/03/2008-11:51:58.215> WRITE offset=0x000500, size=32, dtm=BLT, tmout=N/A, action=CONTINUE, values=0x0A | 0x0A | 0x0A | 0x0A | ...
05/03/2008-11:51:58.264> offset 0x000500=0x0A | offset 0x000501=0x0A | offset 0x000502=0x0A | offset 0x000503=0x0A |
05/03/2008-11:51:58.303> offset 0x000504=0x0A | offset 0x000505=0x0A | offset 0x000506=0x0A | offset 0x000507=0x0A |
05/03/2008-11:51:58.346> offset 0x000508=0x0A | offset 0x000509=0x0A | offset 0x00050A=0x0A | offset 0x00050B=0x0A |
05/03/2008-11:51:58.386> offset 0x00050C=0x0A | offset 0x00050D=0x0A | offset 0x00050E=0x0A | offset 0x00050F=0x0A |
05/03/2008-11:51:58.427> offset 0x000510=0x0A | offset 0x000511=0x0A | offset 0x000512=0x0A | offset 0x000513=0x0A |
05/03/2008-11:51:58.470> offset 0x000514=0x0A | offset 0x000515=0x0A | offset 0x000516=0x0A | offset 0x000517=0x0A |
05/03/2008-11:51:58.512> offset 0x000518=0x0A | offset 0x000519=0x0A | offset 0x00051A=0x0A | offset 0x00051B=0x0A |
05/03/2008-11:51:58.554> offset 0x00051C=0x0A | offset 0x00051D=0x0A | offset 0x00051E=0x0A | offset 0x00051F=0x0A |
05/03/2008-11:53:44.864> Address Modifier: NonBlock--Data--NonPriv
05/03/2008-11:53:44.917> READ offset=0x000500, size=32, dtm=D8EO, tmout=N/A, action=CONTINUE
05/03/2008-11:53:44.974> offset 0x000500=0x0A | offset 0x000501=0x00 | offset 0x000502=0x00 | offset 0x000503=0x0A |
05/03/2008-11:53:45.014> offset 0x000504=0x0A | offset 0x000505=0x00 | offset 0x000506=0x00 | offset 0x000507=0x0A |
05/03/2008-11:53:45.055> offset 0x000508=0x0A | offset 0x000509=0x00 | offset 0x00050A=0x00 | offset 0x00050B=0x0A |
05/03/2008-11:53:45.100> offset 0x00050C=0x0A | offset 0x00050D=0x00 | offset 0x00050E=0x00 | offset 0x00050F=0x0A |
05/03/2008-11:53:45.150> offset 0x000510=0x0A | offset 0x000511=0x00 | offset 0x000512=0x00 | offset 0x000513=0x0A |
05/03/2008-11:53:45.200> offset 0x000514=0x0A | offset 0x000515=0x00 | offset 0x000516=0x00 | offset 0x000517=0x0A |
05/03/2008-11:53:45.249> offset 0x000518=0x0A | offset 0x000519=0x00 | offset 0x00051A=0x00 | offset 0x00051B=0x0A |
05/03/2008-11:53:45.297> offset 0x00051C=0x0A | offset 0x00051D=0x00 | offset 0x00051E=0x00 | offset 0x00051F=0x0A |
05/03/2008-11:54:18.416> Address Modifier: Block--NonPriv
05/03/2008-11:54:18.460> READ offset=0x000500, size=32, dtm=BLT, tmout=N/A, action=CONTINUE
05/03/2008-11:54:18.502> offset 0x000500=0x0A | offset 0x000501=0xFF | offset 0x000502=0xFF | offset 0x000503=0xFF |
05/03/2008-11:54:18.543> offset 0x000504=0xFF | offset 0x000505=0xFF | offset 0x000506=0xFF | offset 0x000507=0xFF |
05/03/2008-11:54:18.583> offset 0x000508=0xFF | offset 0x000509=0xFF | offset 0x00050A=0xFF | offset 0x00050B=0xFF |
05/03/2008-11:54:18.622> offset 0x00050C=0xFF | offset 0x00050D=0xFF | offset 0x00050E=0xFF | offset 0x00050F=0xFF |
05/03/2008-11:54:18.663> offset 0x000510=0xFF | offset 0x000511=0xFF | offset 0x000512=0xFF | offset 0x000513=0xFF |
05/03/2008-11:54:18.703> offset 0x000514=0xFF | offset 0x000515=0xFF | offset 0x000516=0xFF | offset 0x000517=0xFF |
05/03/2008-11:54:18.745> offset 0x000518=0xFF | offset 0x000519=0xFF | offset 0x00051A=0xFF | offset 0x00051B=0xFF |
05/03/2008-11:54:18.785> offset 0x00051C=0xFF | offset 0x00051D=0xFF | offset 0x00051E=0xFF | offset 0x00051F=0xFF |

I have attached the NI Spy log for this sequence of transfers.  Can anyone tell me what I'm doing wrong?  Much appreciated.

Best,
-felben
0 Kudos
Message 1 of 5
(7,774 Views)
Felben,

I noticed some time elapsed between the write and your reads, is there a chance something else wrote to that memory space since it is shared memory? Also, wanted to note that it looks like your D8E0 is also not responding correctly, the code you sent has it only getting every other offset correct.
-Marshall R
0 Kudos
Message 2 of 5
(7,755 Views)
The time between the write and read is as programmed in my application.  The time between lines of dumped data are due to dumping only 4 bytes at a time.  I can guarantee there is nothing going on between the write/read - it is a very simple application.

You are correct that the D8E0 read yields improper data - that is part of the problem I am reporting.  If I write the block (of 0x0A) bytes using D8E0 instead of BLT, the read back is all 0x0A values - as expected.  I did not include this in the example as it is working properly.  Also, if I write using D16 and read back using D16 (or D8E0), the result is all 0x0A values - again, as expected.  It is only when I write using BLT that the improper values are seen in the read back of the data.

Does that make sense?  Thanks for the help!

-felben
0 Kudos
Message 3 of 5
(7,753 Views)
Sorry for the delay in posting, but I wanted to let you know that I have made the developers aware of this and they are actively looking into it. If we discover anything, I will make sure to post again.
-Marshall R
0 Kudos
Message 4 of 5
(7,695 Views)
Thanks Marshall, much appreciated.

I was actually doing some further investigation today and I am starting to wonder if maybe the driver is reading the wrong part of the bus during the BLT transfers (today I was only looking at read operations)...  When you look at DS0* DS1* LWORD* and A01, the data for a given byte (of any transfer, including BLT) can appear on data lines D15..D8 or D7..D0.  This all depends on which byte (0, 1, 2, or 3 offset from an even 4-byte boundary) is being accessed.  Is it possible that the driver is always grabbing D7..D0 on a MoveIn8 call?  I wasn't able to finish my investigation, but will pick it up again on Friday.

I'll stay tuned for further information.  I am getting close to the point where I really need this to work in BLT mode, so this may all come together just in time. Thanks!

-felben
0 Kudos
Message 5 of 5
(7,693 Views)