February 19, 1998
Overview
Version 1.6.1 of the V6M6 host software and FPGA configurations includes the following changes:
The ioctl request passes a pointer to a pci_sem_info structure to the device driver which controls the interrupt handling mode for the interrupt sources of the module referenced by the file descriptor passed to the ioctl call. The structure contains two SEM_ID members:
struct pci_sem_info {
SEM_ID semid_A; /* semaphore for interrupt A */
SEM_ID semid_B; /* semaphore for interrupt B */
};
The first is the semaphore to be given on the occurrence of a module's
INT A or the TDM or VME-PCI interface interrupt.
The second is the semaphore to be given on the occurrence of
a module's INT B.
A valid SEM_ID enables the semaphore interrupt handling mode for the
corresponding interrupt source.
A SEM_ID with a value of NULL returns interrupt handling for the
corresponding interrupt source to the default software signal mode.
In addition, interrupt handling is reset to software signal mode
when the last reference to a given resource is closed.
For PCI modules, both semid_A and semid_B may be the same so that both the module's INT A and INT B sources are handling with the same semaphore. In fact, the same SEM_ID may be used for as many module or other resource interrupt sources as desired.
For an example of using semaphore interrupt handling mode, see the demonstration program source code, intdemo.c and c51int.c, in the $CAC/vxworks/demos directory. Note: in order to successfully run this program, the V6M6 flash must be updated with the new FPGA configuration for DM4C51 modules (dm4c5126.mcs) included in this release.
The device driver's interrupt handling routine has also been modified
to only check for interrupt status from the six module locations from which
interrupts are possible.
Host-driven VME DMA Datat Transfers under VxWorks
The additional code to support DMA transfers for VxWorks utilize the sysVmeDma functions that are in the Power Core 604 BSP.
Modifications to the SunOS & Solaris Device Drivers
In some cases a process may require notification that board is being initialized in order to perform some cleanup operations. For this purpose, a new ioctl request has been added to change the signal to be sent. The ioctl request is PCI_PURGESIG and its argument is a pointer to an integer containing the value of the new signal to be sent. For example:
#include
PCI_MOD *pci;
int newsig;
struct sigaction hup_action;
void hup_handler();
main()
{
pci = pciopen("pci0a");
newsig = SIGHUP;
hup_action.sa_handler = hup_handler;
sigaction(newsig, &hup_action, NULL);
ioctl(pci->fd, PCI_PURGESIG, &newsig);
/* continue with application code */
}
hup_handler(sig)
int sig;
{
/* cleanup code */
pciclose(pci); /* must close the resource */
}
Note that the application program is responsible for closing the
resource and must not perform any other operations on the
resource such as data transfer or ioctl requests.
Also note that the device driver will send SIGKILL to the application
for other resources it has open so the application must set the
purge signal (using PCI_PURGESIG) for all resources it opens on a given V6M6.
Another modification made to the device drivers is that the interrupt handling routine now only checks for interrupt status from the six module locations from which interrupts are possible. This results in a modest, perhaps insignificant, performance improvement.
New Function for Reading DM4C51 Interrupt Status
int
dm4c51_hostistatall(pci)
PCI_MOD *pci - pointer to PCI_MOD structure for DM4C51 module.
The function returns an integer
with bit-mapped interrupt status as follows:
bit 0 - set if DSP 0's interrupt A is active
bit 1 - set if DSP 0's interrupt B is active
bit 8 - set if DSP 1's interrupt A is active
bit 9 - set if DSP 1's interrupt B is active
bit 16 - set if DSP 2's interrupt A is active
bit 17 - set if DSP 2's interrupt B is active
bit 24 - set if DSP 3's interrupt A is active
bit 25 - set if DSP 3's interrupt B is active
-1 - error indicated
A value of -1 is returned in case of an error such as an invalid
PCI_MOD pointer or an error occurred accessing the module.
Any active status bits are cleared on the module by the action of reading
the status.
New Default E1 Line Build Out in TDM Configurator
Modification to pcimemslice Diagnostic
New FPGA configuration for DM4C51 modules fixes problems encountered when the DSPs are halted during TDM or PCI data access. This new version also fixes a bug that kept PCI interrupt B status from being cleared when the interrupt status register is read.
The FPGA configurations for the VME-PCI interface logic on all revisions of the V6M6 to fix two problems. The new version is fixed so that it will not respond to PCI memory space accesses when it is the master of the transaction. The timing of the VME DTACK/ signal is delayed by 25 nanoseconds to allow time to capture incoming VME data when the VME master responds too quickly and changes the data driven onto the bus, such as when using a host CPU's DMA controller to transfer data to the VME bus.