![Solflower SFPCI -VME SERIES Скачать руководство пользователя страница 50](http://html.mh-extra.com/html/solflower/sfpci-vme-series/sfpci-vme-series_user-manual-and-installation-manual_1315249050.webp)
Byte Swapping Capability
rev 2.0
SFPCI -VME SERIES User’s Guide and Installation Manual
50
6.5 Byte Swapping Set Up Utility with Linux 2.4 Kernel
Solflower provides an utility program called “swp_ctl” to enable/disable byte swapping
function. With SF_VME rev F installed and flat cable connected, power on the VME
crate and your host that runs Linux 2.4 Kernel. The "swp_ctl" program is used to
enable/disable hardware byte-swapping. When it's first started, it needs to know the
address of the cmd register. There are jumpers on the board which allow us to set this
address. The available range is from 0x0000CF00 to 0x0000FF00. After setting these
jumpers, we can tell “swp_ctl” where the address is set. After byte swapping function is
set up, user can run his/her own software to talk to VME devices. The following is an
example of execution. Commands are in bold.
[root@localhost ]# ./swp_ctl
Type "?" for help.
Command
swp_ctl>?
-------
disable [bs|ws|ls|all] -- Disable swapping
enable [bs|ws|ls|all] -- Enable swapping
exit -- Exit swp_ctl
help -- Print command list with syntax
print [cmd|sta|bid] -- Display the specified register's state
? -- Print command list with syntax
quit -- Exit swp_ctl
set <address> -- Specified the address of the cmd register
swp_ctl> set ff00
cmd register address: 0x0000FF00
Now we can examine the cmd, status, and id registers.
swp_ctl> pr cmd sta bid
cmd register: 0x08FF