December 22, 1997
Overview
Versions 1.5.0 and 1.5.1 of the V6M6 host software and FPGA configurations include the following changes:
The PM4700A has two configuration options:
The PM4700A is software compatible with the PM4600 and PM4700 modules, using the same V6M6 host library functions and MIPS executable files.
The PM5000 has two configuration options:
The PM5000 is nearly software compatible with the PM4600, PM47600 and PM4700A modules.
The R5000's internal data and instruction caches are twice as large as the R4600 and R4700 processors. Some MIPS executables may require recompiling with new start-up code to clear the larger caches.
Although functionally equivalent, new functions are included in the V6M6 host library to control the PM5000 module. These functions are listed below:
The pm5000_init function resets the R5000 and initializes registers on the module.
int
pm5000_init(pci)
PCI_MOD *pci - pointer to open PCI_MOD structure
The pm5000_run and pm5000_halt functions control
program execution of the R5000 by asserting or deasserting the
processor's reset signal.
int
pm5000_run(pci)
int
pm5000_halt(pci)
PCI_MOD *pci - pointer to open PCI_MOD structure
The pm5000_hostistat function reads the status of the
R5000-to-PCI interrupt.
The function returns a 1 if the R5000-to-PCI interrupt is active.
Calling this function clears status bit, if active.
int
pm5000_hostistat(pci)
PCI_MOD *pci - pointer to open PCI_MOD structure
The pm5000_mipsiset function sets the PCI-to-MIPS interrupt.
The pm5000_mipsistat function
interrupt and is used to check if the R5000 has serviced a previous interrupt.
It returns 1 if the PCI-to-MIPS interrupt is active.
int
pm5000_mipsiset(pci)
int
pm5000_mipsistat(pci)
PCI_MOD *pci - pointer to open PCI_MOD structure
The pm5000_clock function determines the R5000's clock frequency.
The value is calculated from the clock generator control word
stored in the module's EEROM.
It returns the clock frequency in Megahertz.
double
pm5000_clock(pci)
PCI_MOD *pci - pointer to open PCI_MOD structure
New Flash Format for FPGA Configuration Data
The new format includes a directory stored in the flash which allows configuration data for the modules to use more than one flash segment and to be located in at variable locations in the flash. This is necessary to accommodate modules that require more than 32 Kbytes of configuration data and to accommodate an increasing number of different module types.
The new version of the pciflashup program manages which configuration data files are stored in the flash and where they are located. The new version of the V6M6 micro-controller program is able to locate configuration data based on information in the flash directory.
New V6M6 boards are being shipped with the new flash format. When boards with the old flash format are update with pciflashup their flash memories will be rewritten in the new format.
The main effect of this new format is that only configuration data for the module types installed on a V6M6 is stored in the flash. The flash must be updated if a new module type is installed on the board. This means that when a board is first reinstalled in a system, after having a new module type added, it will not be able to configure the new modules.
In order to initialize these boards during system startup, the pciinit program has been enhanced to compare the flash directory of the boards it initializes with the modules installed. If there are modules installed without configuration data in the flash, pciinit will invoke pciflashup to add the missing configuration data. In systems that are unlikely to have new module types added to V6M6 boards, pciinit may be run with the -f option, telling the program not to check the flash contents and saving some time.
IMHC4 Host Library and TDM Configurator Support
Several functions were added to the V6M6 host support library for the IMHC4 dual, stereo codec module. These new functions, plus the original set, are briefly described here. Each of them require, as their first argument, a PCI_MOD pointer which is obtained using the pci_open function to access an IMHC4 module. For example:
PCI_MOD *pci;
pci = pciopen("pci0c") /* open IMHC4 on module C of pci0 */
The imhc4_init function initializes the codecs on the IMHC4, clears the module's interrupt mask and loads certain PCI access control registers. It is primarily intented for use by the pciinit program but may be used by application programs.
int
imhc4_init(pci)
PCI_MOD *pci - pointer to open PCI_MOD structure
The imhc4_tdmclkdiv function sets TDM clock divider for the frequency
synthesizer on an IMHC4.
This function must be called to set the divider for the current TDM clock
frequency.
int
imhc4_tdmclkdiv(pci, clkdiv)
PCI_MOD *pci - pointer to open PCI_MOD structure.
int clkdiv - 0 if TDM clock is 16.048 MHz
1 if TDM clock is 8.192 MHz
2 if TDM clock is 4.096 MHz
3 if TDM clock is 2.048 MHz
The imhc4_sample function controls the sample rate and data format
for codecs on an IMHC4.
int
imhc4_sample(pci, chip, rate, format)
PCI_MOD *pci - pointer to open PCI_MOD structure.
int chip - specifies which codec chip: 0 or 1.
int rate - sample rate in kHz.
Supported values are: 8, 16, 32 or 48.
int format - data format, macros from <pciutil.h>:
IMHC4_ULAW, IMHC4_ALAW, IMHC4_LIN8,
or IMHC4_LIN16.
The imhc4_inputgain function controls the input gain for
a specified codec and audio channel on an IMHC4.
int
imhc4_inputgain(pci, chip, chan, gain)
PCI_MOD *pci - pointer to open PCI_MOD structure.
int chip - specifies which codec chip: 0 or 1.
int chan - specifies which channel: 0 for left,
1 for right or 2 for both.
double gain - input gain value: 0.0 to 42.5 dB in
1.5 dB increments. Values greater than
22.5 enable the 20 dB Mic input gain.
The imhc4_outputatten function controls the output attenuation
for a specified codec and audio channel on an IMHC4.
int
imhc4_outputatten(pci, chip, chan, atten)
PCI_MOD *pci - pointer to open PCI_MOD structure.
int chip - specifies which codec chip: 0 or 1.
int chan - specifies which channel: 0 for left,
1 for right or 2 for both.
double atten - output attenuation: 0.0 to -94.5 dB
in 1.5 dB increments. Values less
than -94.5 specify to mute the output.
The following functions provide access to the direct and indirect
registers in the codecs on an IMHC4 module for cases where additional
or more specific control of the codecs is required.
The _rd functions return the 8 bit value read from
the specified register.
int
imhc4_direct_rd(pci, codec, reg);
int
imhc4_direct_wr(pci, codec, reg, val);
int
imhc4_indirect_rd(pci, chip, reg);
int
imhc4_indirect_wr(pci, chip, reg, val);
PCI_MOD *pci - pointer to open PCI_MOD structure.
int codec - specifies which codec chip: 0 or 1.
int reg - register to read
(0 - 3 for direct, 0 - 31 for indirect)
int val - lower 8 bits are written to register.
The imhc4_instat function reads interrupt status from an
IMHC4 module, which indicates the states of the INT signals from
the two codecs.
The return value has the state on codec 0 INT in bit 0 and
codec 1 in bit 1.
Calling this function does not service the interrupt condition or
clear the status.
int
imhc4_intstat(pci)
PCI_MOD *pci - pointer to open PCI_MOD structure.
The imhc4_intenb function enables PCI interrupts from the
codecs on an IMHC4 module.
int
imhc4_intenb(pci, intmask)
Enable interrupts from IMHC4 interface
PCI_MOD *pci - pointer to open PCI_MOD structure.
int intmask - specifies which codec INT signals are
enabled to PCI INTA and INTB. A 1 in
each bit enables interrupts as follows:
Bit 0 - Codec 0 Int to PCI INT A
Bit 1 - Codec 1 Int to PCI INT A
Bit 2 - unused
Bit 3 - unused
Bit 4 - Codec 0 Int to PCI INT B
Bit 5 - Codec 1 Int to PCI INT B
The TDM Configurator now supports the specification of sampling modes, initial input gain and output attenuation for the codecs on IMHC4 modules. The new HC4 keyword and its parameters, in the TDM description file, specify these values on a per-codec basis.
Each of the the two codecs on the IMHC4 handle two channels of audio: codec 0 handles channels 0 and 1, codec 1 handles channels 2 and 3.
HC4 mod.codec samp=rate:format levels=gain:atten
where:
The HC4 parameter lines must appear before any TDM slot definitions in the TDM description file.
The TDM Configurator will initialize the codecs on IMHC4 modules during
its board initialization phase, prior to loading the TDM connection map data.
Functions to Determine DSP and MIPS Clock Frequency
double
dm2c31_clock(pci)
double
dm4c51_clock(pci)
double
pm3081_clock(pci)
double
pm4600_clock(pci)
double
pm5000_clock(pci)
PCI_MOD *pci - pointer to open PCI_MOD structure
The dm2c31_clock function is used for DM2C31 modules.
The dm4c51_clock function is used for DM4C51 modules.
The pm3081_clock function is used for PM3081 modules.
The pm4600_clock function is used for PM4600, PM4700
and PM4700A modules.
The pm5000_clock function is used for PM5000 modules.
They all return the clock frequency in Megahertz.
Solaris Device Driver Modifications
Minor modifications were made to the Solaris version of the V6M6 device driver for compiling under Solaris 2.6. The changes involved using Solaris version dependent macros defining the functions and data type declarations for probing the boards when the driver and devices are loaded during system boot up.
Currently, at the time of this writing, the V6M6 software and drivers have been tested under Solaris 2.6 only on Force CPU-5V and CPU-8VT Sparc boards, with Force Computer's VME device driver version 2.2.1.
Note: Under Solaris 2.4 and previous versions of Solaris, the V6M6 library includes implementations of the usleep and ualarm functions which were not included in the C library. Under Solaris 2.5 and higher, these routines are not included in the V6M6 library. Therefore, binaries of the V6M6 library compiled under Solaris 2.5 or higher cannot be copied and used on earlier versions of Solaris.