! EpcToVmeNotes.txt

The Ariel DSP cards see the shared memory at 0x8D00000.
The VME address of the same area is 0x34000000.

Several mappings can be valid at the same time.

The Radisys EPC-5 can access VME space in different
modes: A16, A24 or A32.

For A24 or A16 modes, the upper 4 bits specify the access mode.
For A32 the upper 2 bits define the mode.
Because of this, only 1 Gig of A32 is visible.  All of A16 and
A24 is visible.

The mode determines two things: the address size (16, 24, or 32) 
and if byte swapping should be performed. The PC is a little-endian
machine, so when talking to a TMS320xx DSP (which is big-endian) we
need to ask for byte swapping.

For the COOPS links, we are using A32 mode with byte swapping
most of the time. On page 39 of the EPC-5 manual, the table
tells us that this mode combination has a base address of
0x80000000.  The shared memory seen by the DSP has a VME address
of 0x34000000, so to access this memory from the PC, we add the 
0x8000000 to obtain a PC physical address of 0xB4000000.

Under NT, physical memory is not accessable to normal processes, we
we use a special device driver to make these mappings. Our NT supervisor
calls the driver, specifying 0xB4000000 as the desired address. We also
specify a size parameter. The driver sets up mapping registers and returns
to the calling process a valid virtual address that will access the VME
memory. This address will vary from process to process.

The VME driver was made for MTS by a contractor.
It is used to map VME address/length pairs to a
process virtual address under NT. This driver is 
configured by setting up the registry with values
that specify pairs of physical address & size values
for each physical memory page to be mapped. These
values are stored in the file vme.ini as text. The
vme.ini file is used as paramter to regini.exe. 
Copies of this program and the vme.ini file are in
the NTDrive/DriverInstaller directory which is part
of every project.


