Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

Remap PCI 6509 below 1 MB (Register Level)

Hi All,

 

 

 

my name is Wolfgang and I ask fo your help with Regiser Level Programming of the PCI 6509

 

 

 

I refer to this manual:

 

 

 

DAQ

 

Static DIO Register-Level Programmer Manual

 

for NI 6509, 651x, 6520, 6521, and 6528 Devices

 

 

 

 

found here:  ftp://ftp.ni.com/support/manuals/371580a.pdf

 

 

 

Accoding to chapter 3 I want to remap the device below 1 MB to 0xD0000 (PCI MITE adress) and 0xD1000 (device adress)

 

 

 

I do the following steps according to page 3-3:

 

 

 

1.) "CWrite(0x10,0x000D0000)"

 

 

 

I do this by BIOS Int 1A and it works, I can read it back.

 

 

 

2.) "Write(0xD0340,0x0000AEAE)"

This also works, I can read the values back with the DOS-Tool "debug":

0xD0340 is 0xAE

0xD0341 is 0xAE

0xD0342 is 0

3.) "CWrite(0x14,0x000D1000)"

 

I also do this by BIOS Int 1A and it works, I can read it back.

 

4.) "Write(0xD00C0,0x000D1080)"

This step seems to be the problem:  After this, the device should be seen at 0xD1000, but it is not there, the space is empty.

When I read the value back I get:

0xD00C0 is 0x80

0xD00C2 is 0x00 instead of the writen value 0x0D

0xD00C3 is 0x00

 

What is my mistake?

Thank's for all help.

 

 

0xD00C1 is 0x10

0xD0343 is 0

0 Kudos
Message 1 of 5
(7,513 Views)

Sorry, the text seems to be mixed up then sending.

 

Let me post this part again:

 

 

I do the following steps according to page 3-3:


1.) "CWrite(0x10,0x000D0000)"

 

I do this by BIOS Int 1A and it works, I can read it back.

 

2.) "Write(0xD0340,0x0000AEAE)"

 

This also works, I can read the values back with the DOS-Tool "debug":

 

0xD0340 is 0xAE

0xD0341 is 0xAE
0xD0342 is 0

0xD0343 is 0

 


3.) "CWrite(0x14,0x000D1000)"
 

I also do this by BIOS Int 1A and it works, I can read it back.

 


4.) "Write(0xD00C0,0x000D1080)"

 

This step seems to be the problem:  After this, the device should be seen at 0xD1000, but it is not there, the space is empty.

 

When I read the value back I get:

 

0xD00C0 is 0x80
0xD00C1 is 0x10

0xD00C2 is 0x00 instead of the writen value 0x0D

0xD00C3 is 0x00

0 Kudos
Message 2 of 5
(7,511 Views)

Hello Wolfgang,

 

The final write is simply granting you access to the remapped device registers in bar1.  After performing the "Write(0xD00C0,0x000D1080)", you will be able read and write from the remapped registers at offset 0x000D1000.  The real test to see if it worked is to check the ID Register on the board (offset 0x0 from 0x000D1000).

 

What do you get when you do an 8 bit register read on offset 0x000D1000?  The ID Register should contain the last two digits of the device you are using 0x09. 

 

I hope this helps,

Steven T.

0 Kudos
Message 3 of 5
(7,435 Views)

Hello Steven,

 

thanks for your reply.

 

"What do you get when you do an 8 bit register read on offset 0x000D1000?"

 

There is empty space, read as 0xff.

 

But meanwhile I tried a different method:

 

Instead of the "Write(0xD00C0,0x000D1080)" I write the bytes visa versa, like this:

 

"Write(0xD00C0,0x80100d00)".

 

which means in 8 bit:

 

0xd00c0 = 0x00

0xd00c1 = 0x0d

0xd00c2 = 0x10

0xd00c3 = 0x80

 

And since then I can see the device and read 0x09 at 0xd1000.

 

Meanwhile I also tested it on a PCI DIO 96 and its exactly the same thing. (The reason for that is that the 6509 makes trouble with some older mainboards).

 

How is that possible?

 

Is all the documentation and all the example programs provided by NI wrong?

0 Kudos
Message 4 of 5
(7,418 Views)

Hello,

 

I'm glad that you figured out the problem.  The symptoms that you are describing sound like a mis-match with endian-ness.  You may find that you need to re-arrange the data bytes during multibyte reads/writes to the board.

 

The documentation is correct, however the documentation was probably written assuming a certain endian-ness about the user's system.  Since you've placed the solution in the forums, others that are caught by this trap will be reminded that these kinds of incompatibilities exist.

 

If you have any specific questions or see any other peculiar behavior, I'll be happy to look into it further.

 

Thanks,

Steven T.

0 Kudos
Message 5 of 5
(7,376 Views)