Home
        LeMans - Spectrum Signal Processing
         Contents
1.       This system allows for multiple nested calls to VX8_Lock and VX8_Unlock as long as  they are symmetrical  as can be seen in the following example  This is useful for  modular function development because you do not have to worry about whether an  address region has been locked by a calling function     Part Number 500 00330 41  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software    void functionl  void          VX8_Lock  0x88000000       lock to SCV64 Register Set          manipulate SCV64 registers     function2         VX8_UnLock              void function2  void          VX8_ Lock  0xA000000       lock to DRAM          manipulate DRAM      OS Oy   VX8_UnLock              void function3  void        VX8_Lock 0x94000000      lock to Node C          manipulate Node C       VX8_UnLock       return        Functions that perform single address reads or writes  such as VX8_ReadReg and  VX8_WriteReg  perform a lock and an unlock internally  but do not change the lock  stack pointer     42 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software    6 3  VXIbus Interface Module    Part Number 500 00330  Revision 2 05    6 3 1  Description    The VXIbus Interface Module provides the capability for the C4x DSP nodes to write to  the SCV64 for initialization  setup of VXIbus Mastering  VXIbus Interrupt Generation  and Handling  and setup of the SCV64 DMA
2.      SSVX8_ERROR_VX8_STILL_IN_CONFIG At least one DSP in the system  is still asserting CONFIG     SSVX8_ERROR_LDFOPENLDF_FAILED An error occurred during the  parsing of the LDF    SSVX8_ERROR_SYSTEM_RESET_TIMEOUT One of the VX8 devices in the       system failed to initialize after  being reset     SSVX8_ERROR_READFIRMWAREREV_TIMEOUT Timed out waiting to read a  VX8 firmware revision    SSVX8_ERROR_READSELFTESTRES_TIMEOUT Timed out waiting to read a  VX8 self test result    SSVX8_ERROR_NO_VX8_IN SYSTEM STRUCT No VX8 devices were found       in the system definition     The software to be loaded is specified in a Load Definition File  LDF   If no LDF is  specified here  the LDF that was previously parsed by ssVX8_SystemOpen will be  used  If an LDF is specified  it will override the previously parsed LDF and load the  DSP applications specified by this new LDF  The new LDF will also serve as the new  software definition if the ssVX8 SystemLoadCode is invoked again without an LDF  defined     If an LDF was not specified in the previous call to ssVX8_SystemOpen  an LDF must  be specified here  See Section 9 4 4  for more information about the LDF format     Invoking this function resets the VX8 system  This will abruptly terminate all  applications currently running on the system  If your application requires to be     gracefully    terminated  you should implement a scheme to halt activities on the  processors on the system before calling the system load code function     In o
3.      When interconnected by the front panel COMM ports and JTAG connectors  VX8s  form a multi board network of DSPs and TIM 40 modules  or a    VX8 System     The  Instrument Driver was written to communicate to VX8s as a System rather than on an  individual board by board basis  Viewing VX8s as a System is required for the  following two reasons     e The directional power on state of the TMS320C4x COMM ports requires that  interconnected DSPs be reset together  and    e A general DSP application loader for TIM 40 modules requires loading via COMM  ports  Not all TIM 40 modules or C4x processors on TIM 40 modules have global  bus connectivity  Outside of loading from ROM  COMM port loading is the only  viable alternative     The reset requirements and COMM port loading scheme together require that  without a  resident OS to maintain communication links through COMM ports  all processors in a  system be loaded together     The functions in the System Module perform their actions on VX8s as a System  comprised of multiple boards  each with multiple processors  Two configuration files  define a VX8 System     e System Definition File  SDF   and  e Load Definition File  LDF    The SDF defines the hardware configuration of a VX8 system  the VX8 boards  TIM 40    modules  DSPs  COMM port connections  etc  The LDF defines the DSP application  software that is to be loaded onto a VX8 system defined by an SDF     The VX8 Instrument Driver parses these files to generate  internally  
4.     Character Timeout Indication    interrupt pending  on the DUART channel    DUART_INT_TX 0x02    Transmitter Holding Register Empty    interrupt  pending on the DUART channel    DUART_INT_MODEM 0x00    MODEM Status    interrupt pending on the  DUART channel     Upon receiving an IIOF3 interrupt from the DUART on Node B the source of the  interrupt is unknown  This function reads the interrupt identification  IIR  register of the  selected channel of the DUART     This function should only be called in Node B DSP application software     55    VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    VX8_DUARTDisable nterrupt    Spectrum Signal Processing    Function Disables one of the interrupt sources on channel   and or channel 2 of the DUART     Include File vx8 h    Interface STATUS VX8 DUARTDisablelnterrupt  UINT8 channel  UINTS int_level      Parameters channel 0   program both channels  1   program channel 1  2   program channel 2    int_level Interrupt s  to disable   Interrupt Value Description   DUART_INT_LINE 0x06    Receiver Line Status    interrupt on the DUART  channel    DUART_INT_RX 0x04    Receiver Data Available    interrupt on the  DUART channel    DUART_INT_TIMEOUT 0x0C    Character Timeout Indication    interrupt on the  DUART channel    DUART_INT_TX 0x02    Transmitter Holding Register Empty    interrupt  on the DUART channel    DUART_INT_MODEM 0x00    MODEM Status    interrupt on the DUART    Returned Value DUART SUCCESS    DUART_ER
5.     Returned Values State of the HP Local Bus Read FIFO Almost Empty  RAE  flag  RAE is indicated by  bit D6 in the HSTATUS register     e 0  Read FIFO is below the almost empty flag level   e     Read FIFO is above the almost empty flag level     74 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    VX8_HPGetRAFBit    Function Gets the value of the Read FIFO Almost Full bit in the HSTATUS register   Include File vx8 h  Syntax  macro  UINT8 VX8 HPGetRAFBit  void    Parameters None    Returned Values State of the HP Local Bus Read FIFO almost full  RAF  flag  RAF is indicated by bit  D5 in the HSTATUS register     e 0  Read FIFO is above the almost full flag level   e 1 Read FIFO is below the almost full flag level     Part Number 500 00330 75  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPGetReadDone    Function  Include File  Syntax  macro   Parameters    Returned Values    76    Gets the value of the READDONE bit in the HREADEOB register   vx8 h   UINT8 VX8 HPGetReadDone  void     None    State of the HP BALLISTIC READDONE line indicated by bit DO in the HREADEOB  register     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    VX8_HPGetREBit    Function Gets the value of the Read FIFO Empty bit in the HSTATUS register
6.    Host applications can open multiple sessions to a VX8 device by calling  ssVX8_SystemOpen with the same SDF multiple times or by directly calling I O  library routines  It will be necessary for the host application to be aware of which  invocation has the duty of initializing the VX8  Host applications should also be  handling the possibility of another host session having placed a VX8 into reset     137    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 SICL VISA Instrument Driver    138    If your host program needs to reset a device on the HP Local Bus  the host program first  has to retrieve the ID for that device and then do a reset of that device by specifying its  ID  The reset order of devices is determined by their ID sequence  not their physical slot  sequence     Accessing the VX8 through multiple sessions will be non exclusive since the host task  switching is OS dependent  It is left to the host applications to implement software  constructs  semaphores  which will provide exclusive VX8 accesses between  contending host sessions  Allowing multiple sessions to obtain resource handles to a  single VX8 will provide the most flexibility for developers at a cost of enabling  sessions to contend for VX8 resources     9 4 2  System Definition File  SDF  Description    The SDF is a text based file that defines the hardware configuration of your VX8  System  The SDF modularly defines the hardware components in a logical manner   From top down  a VX8
7.    Include File vx8 h  Syntax  macro  UINT8 VX8_HPGetREBit  void    Parameters None    Returned Values State of the HP Local Bus Read FIFO empty  RE  flag  RE is indicated by bit D7 in the  HSTATUS register     e 0   Read FIFO is empty   e     Read FIFO contains data     Part Number 500 00330 77  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPGetRFBit    Function Gets the value of the Read FIFO Full bit in the HSTATUS register   Include File vx8 h  Syntax  macro  UINT8 VX8_HPGetRFBit  void    Parameters None    Returned Values State of the HP Local Bus Read FIFO full  RF  flag  RF is bit D4 in the HSTATUS  register     e 0 Read FIFO is full   e   Read FIFO is not full     78 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    VX8_HPGetStripBit    Function  Include File  Syntax  macro     Parameters    Returned Values    Part Number 500 00330  Revision 2 05    Gets the state of the STRIP input to the BALLISTIC HP Local Bus interface chip   vx8 h  UINT8 VX8_HPGetStripBit  void      None    State of the HP BALLISTIC STRIP line indicated by bit D3 in the HCONTROL  register     79    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPGetWAEBit    Function Gets the state of the Write FIFO Almost Empty bit in the HSTATUS register   Include File vx8 h  Syntax  
8.    MULT_RESULT_REG  MULT_LDF_FILE  MULT_REG_OFFSET    MULT_SDF_FILE  SCV_ISR    UART_ISR  VX8_A32_SLV_DRAM_OFFSET  VX8_BOARD240  VX8_MULT_UNINIT   VX8_MULT_LOADED   VX8_MULT_START   VX8_MULT_DONE   VX8_MULT_END    Part Number 500 00330  Revision 2 05    Example program   Description and or Value    vemuth PA    Address increment  is 4 or 1 depending on  whether the target is byte or long word  addressed  It will be 1 for C4x  4 for VXlbus  devices    vx8hpgen c 0x10    vx8vxi c 0x28000000  channel number  1    vx8mult h  vx8mult c   vx8mult h    vx8duart c  vx8duart c channel number  2  vx8vxi c    BOARD2_BASE_ADDR    VX8_A32_SLV_DRAM_OFFSET  vx8hpcon c rename the ISR  c_int04    vx8mult c  mult example registers  vx8mult h    vx8mult c     offset into the DRAM space to have  vx8mult h registers    vx8lm c  rename the ISR  c_int03  VX8DMA C   vx8vxi c    Vx8duart c rename the ISR  c_int06   vxi 240  or  VXI0  240  INSTR     vx8mult c  MULT control register defined values  vx8mult h       19    VX8 Carrier Board Programming Guide Spectrum Signal Processing  Software Overview    3 3  Data Types  The following header files define the data types used in VX8 host and DSP code     e ssvx8 htop level header file for VX8 VXIpnp instrument driver   e sstype h defines data types used in VX8 host code   e type c3x h defines data types used in VX8 DSP code   e ssp _visa hre maps Spectrum internal type declarations to VISA defined types    e ssp _sicl hre maps Spectrum internal type decla
9.    Part Number 500 00330  Revision 2 05    Determines which source or event generated an interrupt from the HP Local Bus   vx8 h  UINT8 VX8 HPCheckInterrupt void      None    HP Local Bus interrupt sources  0x10  EOB  0x20  gt WAE  0x40  gt WAF    Upon receiving an ITOF2 interrupt from the HP Local Bus controller  the source of the  interrupt is unknown  This function can be used to determine the source  However  this  function does not clear the source  The three interrupt sources are EOB  end of block    WAE  write FIFO almost empty   and WAF  write FIFO almost full      Note  A WAE ora WAF interrupt from the HP Local Bus only indicates a   FIFO level transition to the WAE or WAF levels  Before acting on the interrupt   your code should verify the current FIFO level by checking the FIFO flag levels  in the HSTATUS Register  The VX8 C4x Support Software has several  functions  VX8_HPGet Bit  to read the FIFO level bits in the HSTATUS  Register     Note  One or more of the HP Local Bus interrupts may occur simultaneously   This condition is indicated by the ORing of the returned flags     63    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPClearInterrupt    Function    Include File    Syntax    Parameters    Returned Values    Remarks    64    Clears an HP Local Bus interrupt source or event   vx8 h    STATUS VX8_HPClearInterrupt  UINT8 hp_int      hp_int HP Local Bus interrupt sources to be cleared  0x10   gt EOB 
10.    Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    VX8 C4x Support Software Functions    SCV64_SUCCESS DMA setup and initiated  SCV64 ERROR DMA ACTIVE VXIbus DMA transfer currently in  progress     SCV64 ERROR UNALIGNED TRANSFER Invalid VXIbus address  Must be  word or longword aligned     The SCV64 DMA controller is configured for DMA transfers between the VXIbus and  DRAM SRAM  DMAs can only be word  longword transfers  or D64 transfers     When determining the SCV64 DMA source destination  keep in mind that the SCV64  IC views the VX8 as being byte addressable  That is  the SCV64 DMA address registers  are in terms of bytes  not long words  Both the local_addr and vxi_addr parameters to  VX8_SCVDMA Transfer are byte addresses  as the function does not modify the  parameters before writing them to the SCV64 DMA registers     D64 DMA transfers will only work when communicating with other D64 capable  devices  D64 transfer addresses must be double long word aligned  The D64 DMA  length is expressed in long words like the D32 modes  However  the length must be a  multiple of double long words  D2  D1  and DO of the DMA transfer count are 0 for  D64  MBLT  DMA transfers     The SCV64 counter is setup by the Node A Kernel to be 20 bits  The SCV64 counter  can be reduced to a 12 bit counter by clearing the DTCISIZ  bit 31 in the SCV64 Mode  Control Regis
11.    The following is an example of a BootProc section      Boot Proc   Boardl  SiteA Proc0 VX8_ BASE ADDR1        Board2 SiteA Proc0 VX8_ BASE ADDR2     9 4 3  System Definition File  SDF  Examples    To meet your system requirements  Spectrum has provided three different SDFs for the  following hardware configurations     e asingle VX8 board with a base configuration  e a single VX8 board populated with additional TIM 40 modules    e amulti board VX8 system    The following three sections contain the example SDF files     145    VX8 Carrier Board Programming Guide  VX8 SICL VISA Instrument Driver    Spectrum Signal Processing    SDF Example 1   Base VX8 Configuration    146    The following is a sample SICL System Definition File  SDF  containing a single VX8  board with the base configuration at a logical address of 240  Note that the board base  addresses use SICL nomenclature  These descriptors must be modified if you using    VISA      common   VX8 BASE ADDR_1   vxi 240      C40_PROC_VX8EMBED   Type   Processor   Model   C40   BootPort   ALL   Speed   60    LMCR   0x3e840000   GMCR   0x3a4c0000      VX8_EMBEDDED_ SITE   Type   TIM   Model   VX8EMBED        one of  C44  C40  S62  S60      Can boot from any COMM port    Components     Proc0  6  C40 PROC _VX8EMBED     comMMConnections        Src  ID  Dst      Proco  TIM         GENERAL SITE   Type   SITE      Custom_Board1   Type   Board   Model   VX8           one of    BaseAddress   VX8_ BASE ADDR_1     Components        T
12.    void VX8 WriteBit  PVUINT32 dest  UINT32 mask  UINTS8 state      dest Volatile pointer to destination address  Can be in the calling  C4x s local or global address space    Mask Register mask for bits to be set or cleared  A mask of 0x0000  0003 should be used to set bits DO and D1    State Value to set the masked bits   0   clear  1   set    None    This routine performs locking and unlocking of the global shared bus  Unnecessary  operations will be performed if the register in question is local to the DSP  internal   local  or near global      125    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_WriteReg    Function  Include File  Syntax    Parameters    Returned Values    Remarks    126    Write a single value to a VX8 board peripheral  SRAM  or DRAM   vx8 h    void VX8_WriteReg  PVUINT32 dest  UINT32 value      dest Volatile pointer to destination address  Can be in the calling  C4x s local or global address space    Value Value to write to the destination address    void    This routine performs locking and unlocking of the Global Shared Bus  Unnecessary  lock and unlock operations will be performed if the register in question is local to the  DSP  internal  local  or near global      When accessing a processor   s Near Global  Local  or internal memories  direct register  access is recommended     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 Ho
13.   Controller    Embedded  JTAG  CAx Debug                                Near Global Bus Buffer K6  A Buffer K gt  Near Global Bus      Buffer        DRAM  Shared    Ballistic DRAM Bank 2 kK  Bus Sovet  j l enea   Interface  Bus IC DRAM Bank 1                                                                      HP VME Bus  Local  Bus                            VXIBus Connector P2 r      VXIBus Connector P1 g          Figure 4 Bus Architecture    2 6  C4x Interrupt Architecture    Part Number 500 00330    Revision 2 05    The four configurable IIOF lines from each    C4x are used for interrupts    Between other C4x nodes on the board  From the SCV64 VXTIbus interface chip  From the HP Local Bus interface    From the Dual 16550 UART  DUART   Node B only     VX8 Carrier Board Programming Guide Spectrum Signal Processing    Hardware Overview    10    e From the VXIbus A16 Interface  Node A only     The following figure shows the VX8 interrupt architecture                                                                                                                             VXlbus      OF0 HHOFOs abs  ort   A more nore     Cax OF  C4x 4x  HP Local Bus               Node 6 i Node H HP Local Bus    CONFIG    19F3_   OFS CONFIG   See Note   See Note   VXIbus     OF0  OFO Vy tous  TIM40 Oks mora   MA  HP Local Bus ORT  C4x C4x IOF1 HP Local Bus  Node E Node F  ICONFIG HOF   LHOFS CONFIG   See Note   See Note   Interrupt  Routing  Matrix  Vxibus     OF  LEO bus  nor TAO ora nora  T
14.   Part Number 500 00330  Revision 2 05    Enables or disables the SUSPEND  line to the HP Local Bus DMA controller   vx8 h  void VX8 HPSuspendDMA  UINT32 state      state 0   de assert the  SUSPEND line  1   assert the  SUSPEND line    None    This function can be called by Node A only  The functionality of the  SUSPEND line is  to allow a processor to stop the HP Local Bus transfer  On the VX8  the  SUSPEND  line gives Node A the ability to acquire the Global Shared Bus when HP Local Bus  transfers are occurring  This is particularly useful for Node A to service time critical  interrupts     101    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPWriteECL    Function  Include File  Syntax  macro     Parameters    Returned Values    Remarks    102    Asserts or de asserts the data bit for the ECL trigger line ECLTRGO   vx8 h    STATUS VX8 HPWriteECL  UINTS state      state 0   de assert the ECL out line  1   assert the ECL out line    VX8 SUCCESS The ECLTRGO was enabled     A write to the ECLTRG register latches the data indicated by state to bit DO  The data is  provided to P2 through Emitter Coupled Logic  ECL  drivers  The output from this  latch is then re synchronized to the ECLTRGI clock signal  so if there is no clock  present on ECLTRG1  then the value of ECLTRGO will not be clocked out to the P2  connector     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Gui
15.   Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    VX8_SCV64Disablelnterrupt    Function Disables a SCV64 interrupt   Include File vx8 h  Syntax STATUS VX8_ SCV64DisableInterrupt UINTS int_level      Parameters   int_level VXIbus or local SCV64 interrupt number to disable  1   7   VXIbus interrupt from level 1 to 7  8   local timer interrupt    9   local location monitor interrupt    Returned Values SCV64_ SUCCESS The interrupt was disabled on the SCV64     SCV64_ERROR INT LEVEL VALUE The interrupt number was out of range     Remarks Interrupts sources can be either local to the SCV64 or from the VXIbus  VXIbus  interrupts can be any interrupt level between 1 and 7  Local SCV64 interrupts include  the location monitor interrupt and the timer interrupt     The local timer interrupt should not be disabled  Disabling the local timer interrupt will  disable the VX8 hardware   s ability to notify your software of a local bus timeout     VX8_SCV64DisableInterrupt does not allow the disabling of the SCV64 local interrupt  which handles DMA transfers and errors  LIRQS   This is because the SCV64  VME VXIbus error is indicated by the same interrupt conditions as the SCV64 DMA  done and errors  Applications should always be made aware of exceptions and fatal  errors     See VX8_SCV64AckInterrupt for more information about the various interrupts     Part Number 500 00330 113  Revision 2 05    VX8 Carrier Board Programming Guide  VX8 C
16.   ViString SDF file  ViString LDF file     ViUInt32 flags    Parameters y  Unique logical identifier to a session  VX8SystemHndlPtr Pointer to a system handle storage  SDF file SDF filename and path  LDF _file LDF filename and path  flags Flags described below  Flag Value Description  SSVX8_SYSOPEN_NOACTION 0x0 Does not reset the boards or load  DSP application   SSVX8_SYSOPEN LOADSYSTEM 0x1 Load the DSP applications described    by the LDF onto the system   SSVX8_SYSOPEN_RESETSYSTEM  0x2 Reset the boards in the system           Returned Values VI SUCCESS Successfully opened the VX8 system   SSVX8_ERROR BAD RSRC DESCRIPTOR Unknown rsrcName   VI_ERROR_FAIL_ID_QUERY The device rsrcName is not a VX8   VI_WARN_NSUP_RESET Soft resetting is not supported     Remarks This function is only applicable to VISA VXIpnp applications  A call to ssVX8_open  must be preceded by a call to ssVX8_init     Part Number 500 00330 163  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 Instrument Driver Functions    ssVX8_reset    Function  Include File  Syntax    Parameters    Returned Values    Remarks    164    This is a    stubbed    function that returns VI WARN NSUP_ RESET when called   vx8 h    ViStatus _VI FUNC ssVX8 reset  ViSession vi      vi Unique logical identifier to a session    VI_WARN_NSUP_RESET Reset not supported     This function is only applicable to VISA VXIpnp applications  Although non   functional  this function must exist for VXIpnp compli
17.   error QUe i renra ti 161   IA aS a e AEE ve AES AR ATOA T 162   SEVA OPM tod a enata 163  A NY 164  ENAMORA 165  AA A ca tiles taste dev eet ladon ds tae dae Aaland a aar Adana anet Ees 166  ssVX8_SystemCheckConfiY  cooococccnnnococinnnococcnnnononcnnnnnn cnn r nono nc nr nan n rra rrnnn rca 167  ssVX8_SySteMClOS8 unen ani iari a i Oi ASO LEEA R 168  ssVX8_SystemErrorMessage         eee eeeeecceceeeeeeeeeeneeeeseeeaeeeeeeneeeeseneeeeeeneeeeeeaes 169  SSVX8B_SysteMREVISIONQUETY          cece ceeeeeeeeeeeneeeeeeaeeeeeeaaeeeeeeaeeeseenieeeeeeaaes 170  ssVX8_SystemGetDriverReV ooooooconnnonoccnnnococccnnnnnncnnnnnnnnnn nano nn nr nnnn nn rra rara 171  ssVX8_SystemLoadCo0d8 ccoococonnccccconococccocononcnnnnnonnnnnnnn nn nr nnnn nn nr non nn nr rn rra 172   SSVX8 SYSTEM Open recio aida ees ae eine 175  SSVXB_SysteMRead          cececceccesceceesenceteeseeneceeseeeneceasenseseeneenecteneaaeeteneeneeeenease 178  SSVX8B_SysteMREset           ccceesecceceeseececeeeeeeeeeensececeenenseseeesececeeneaceeeeeseseeeenenees 180   ss VX8  System Writez  s saria eae cece cece eee daan tet ees ceanaeeeeeeeseeeeeeeaeeeeeeeeteees 181   11 Example SOM mennan nnmnnn 183  11 1  Floating Point Multiplication Example                 ccccccsccecceceeeeeeeceeeeeeeeeeeeeseneeeeees 183  11 2  Node B DUART and C4x ISR Example                  ccccceceeeeeeeeceeceeeeeseseenineeeeeeees 185  11 3  C4x HP Local Bus Consume Mode and ISR Example                      cseceeeeeeees 187  11 4  C4x HP Local Bus Ge
18.   functions ranging from low level I O to higher level interactions like message based  communication  The I O library simplifies host software development by isolating the  host software from the underlying host operating system  OS  and interface hardware   Together  the VX8 specific functions contained in the VX8 Instrument Driver and the  VO library provide application developers with a standard  easy to use software  interface for developing the host based component of your VX8 application     The I O libraries supported by the VX8 Instrument Driver are the VXIpnp Alliance  defined VISA  Virtual Instrument Software Architecture  and SICL  Agilent  Technologies Standard Instrument Control Library      SICL is available from Agilent Technologies for many of its VXIbus products  VISA is  an open software standard defined by the VXIpnp Systems Alliance  VISA is available    Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Part Number 500 00330  Revision 2 05    Software Overview    on a variety of VXIbus products from Agilent Technologies and National Instruments   among others     The VXIpnp components of the VX8 Instrument Driver  the VXIpnp module  do not  apply to systems using the SICL I O subsystem     3 1 2  DSP Software Environment    The development environment for the TMS320C4x DSP software is relatively  straightforward  You can develop C4x DSP application code for the VX8 on any  platform which supports Tex
19.   will be written to on the next write cycle     VX8_HPGetDMAEnable Gets the value of the DMA_ON bit in the  HCONTROL register  This indicates a read DMA  transfers from the HP Local Bus FIFO are enabled     VX8_HPGetDMAIncrement Gets the value of the DMA_INCR bit in the  HCONTROL register  This value indicates whether  DMA transfers are to consecutive addresses or to a  port  consecutive writes to a single address      VX8_HPGetFrameBit Gets the value of the FRAME bit in the  HWRITEEOB register     VX8_HPSetDMAEnable Sets the value of the DMA_ON bit in the  HCONTROL register  This enables read DMA  transfers from the HP Local Bus FIFO to one or  more TIM 40 module s  Near Global SRAM     VX8_HPSetDMAIncrement Sets the value of the DMA_INCR bit in the  HCONTROL register     VX8_HPSetDMATarget Sets up address information for read DMA transfers  from the HP Local Bus FIFO to a TIM 40 module   s  SRAM     VX8_HPSuspendDMA Enables or disables the  SUSPEND line to the HP  Local Bus DMA controller  This function can be  called by Node A only     Table 11 HP Local Bus GENERATE Functions    VX8_HPSetFrameBit Sets the value of the FRAME bit in the HWRITEEOB  register    VX8_HPSetWriteBlockSize Writes the HP Local Bus outbound block size to the  HBLOCK register     VX8_HPWriteFIFO Single cycle 32 bit data block transfers to the HP  Local Bus output FIFO        Caution  The VX8 C4x Support Software Library provides functions that can  be used to extend the basic functionality and modes 
20.   writes to the Location Monitor in the A32 address space  and then waits to count the  number of interrupts received     Note  A second VX8 board must perform a write to the board running this  example  You can use the Vx8vxi example to perform this write operation   Ensure the VME address used is valid for the board under test  See the  readme txt file for the Vx8vxi example for information about calculating the  address     Part Number 500 00330 191  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  Example Software    192    VXIbus  Configuration    PC Configuration    System Configuration    Controller HP E1497A   v743    Operating System HP UX version 10 2    I O Library HP SICL version 3 0   VISA 1 1  Mainframe HP 75000 Series C   VX8 Logical 240   Address    VX8 Configuration Embedded near global memory 128k X 32 or 512k X 32  No TIM 40 modules  DRAM optional    PC At least 4Mbytes of memory  16Mbytes recommended   Texas Instruments XDS510 for C4x JTAG debugging   Operating System Windows NT or Windows 2000    Running the Program    The vx8Im c example should be run from JTAG  It is compiled with the appropriate C  initialization routines for Node A  The C4x code  vx8lm c  has been compiled and  linked to generate the COFF file VX8LM OUT  To rebuild vx8Im c  simply call  build bat  This batch file calls bldc40a bat  which compiles vx8lm c and links it with  the C boot routine boot_a asm and the VX8 C4x Support Software library  The  TMS3
21.  0x20  gt WAE  0x40  gt WAF   HPBUS_ SUCCESS Interrupt s  acknowledged     HPBUS_ERROR_INT_NOT_SET No interrupt source was set     The three interrupt sources are EOB  end of block   WAE  write FIFO almost empty    and WAF  write FIFO almost full   This function will trigger the next DMA transfer if  the data is ready     Note  Multiple HP Local Bus interrupts can be acknowledged simultaneously   This is performed by ORing the hp _int values together     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    VxX8_HPDisablelnterrupt    Function  Include File  Syntax  macro     Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    Disables an HP Local Bus interrupt source or event   vx8 h  STATUS VX8 HPDisablelnterrupt UINTS hp_ints      hp_ints HP Local Bus interrupt sources to be disabled  0x10   gt EOB  0x20  gt WAE  0x40  gt WAF    VX8 SUCCESS The interrupts were disabled     The three interrupt sources are EOB  end of block   WAE  write FIFO almost empty    and WAF  write FIFO almost full      Note  Multiple HP Local Bus interrupts can be disabled simultaneously  This  is performed by ORing the hp_ints values together     65    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPEnablelnterrupt    Function  Include File  Syntax  macro     Parameters    Returned Values    Remarks    66    Enables an HP
22.  COMM Ports in the wrong direction after  a DSP is reset     e Front Panel JTAG   If the  GRESET line on the front panel JTAG connector is  asserted  the VX8 board will generate a local reset to the board     Note  The SYSFAIL LED will light if a board is reset by its A16 control  register  Boards reset via front panel JTAG will not light their SYSFAIL LEDs     25    VX8 Carrier Board Programming Guide  Reset Conditions and Initialization    Spectrum Signal Processing       4 2  Boot Kernel Initialization  The Node A Embedded C40 Boot Kernel is responsible for initializing the VX8 on  power up and interacts with several instrument driver functions  The initialization must  be performed by Node A since it is the only DSP on the VX8 with access to the VXIbus  defined A16 registers   The A16 Interrupt Service Routine  ISR  portion of the Node A boot kernel must  remain resident on Node A to perform actions triggered by writes to the A16 VXIbus  registers by the host  This is accomplished by linking in the ISR for IOF3 on Node A  with your DSP application code for Node A   The following table illustrates the sequence of events that takes place after a reset   Table 3 Boot Kernel Initialization  Asserts  then releases  RESET Boots kernel code from the Boot Kernel Configured to boot from  PEROM and runs board self test COMM Port  so they are  waiting for instruction  Writes to A16 Configuration Receives an interrupt on IIOF3  reads the Still waiting  Registers to setup A32 offset a
23.  Controller     Note  C4x DSP Nodes use only 32 bit long word addresses  so special  attention must be given to D08 and D16 reads and writes  The software  overhead for the SCV64 and byte lane manipulation increase the number of  cycles required for SRAM to VXIbus transfers  D32 transfers between SRAM  and the VXIbus are preferred over D08 and D16 transfers where possible     D16 and DO8EO slave cycles to Near Global SRAM are not recommended     6 3 2  VXibus Functions    Table 8 VXlbus Related Functions    VX8_SCV64Ackinterrupt Generates a VXIbus  IACK cycle   used after  an interrupt is received from the SCV64 on  IIOFO     VX8_SCV64Disablelnterrupt Disables an interrupt line from the VXIbus     VX8_SCV64DMATransfer Initiates DMA transfers between the VXIbus  and DRAM SRAM     VX8_SCV64Enablelnterrupt Enables an interrupt line from the VXIbus   VX8_SCV64Generatelnterrupt Generates a VXIbus interrupt     VX8_SCV64SetSysFail Asserts or de asserts the SYSFAIL  line on  the VXlbus from the SCV64    VX8_SCV64SetVXIBusReqRel Sets VXlbus request and release  parameters     VXIbus transfers can be performed via VX8_ Read  VX8_ Write  or  VX8_SCV64DMATransfer routines  All VX8_ SCV64 prefixed functions lock to the  SCV64 using the mailbox registers        See Chapter 11 for VXIbus software examples     43    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software    6 4     44    HP Local Bus Interface Module    6 4 1  Description    The Local Bus de
24.  Local Bus interrupt source or event   vx8 h    STATUS VX8 HPEnablelnterrupt UINTS hp_ints      hp_ints HP Local Bus interrupt sources to be enabled  0x10   gt  EOB  0x20  gt  WAE  0x40  gt  WAF    VX8 SUCCESS The interrupts were enabled     The three interrupt sources are EOB  end of block   WAE  write FIFO almost empty    and WAF  write FIFO almost full      Note  Multiple HP Local Bus interrupts can be enabled simultaneously  This  is performed by ORing the hp_ints values together     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    VX8_HPGetContBit    Function  Include File  Syntax  macro   Parameters    Returned Values    Part Number 500 00330  Revision 2 05    Gets the state of the CONT line to the BALLISTIC HP Local Bus interface chip   vx8 h  UINT8 VX8_HPGetContBit  void      None    State of the HP BALLISTIC CONT line indicated by bit D2  of the HCONTROL register     67    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPGetDMABuffer    Function  Include File  Syntax  macro     Parameters    Returned Values    Remarks    68    Gets the value of the DMA_BUFFER bit in the HSTATUS register   vx8 h  UINT8 VX8 HPGetDMABuffer  void      None    HP Local Bus Buffer state  e   the next write cycle will be to buffer 0 on the target node    e 1  the next write cycle will be to buffer 1 on the target node    Typically  this ma
25.  None    State of the HP BALLISTIC FRAME line indicated by bit DO of the HWRITEEOB  register     71    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPGetMode    Function  Include File  Syntax  macro   Parameters    Returned Values    Remarks    72    Gets the mode of the BALLISTIC HP Local Bus interface chip   vx8 h   UINT8 VX8 HPGetMode  void     None    Value of the BALLISTIC MODE 3  0  bits  The BALLISTIC MODE bits correspond to  bits D7 D4 in the HCONTROL register     See VX8_HPSetMode or the VX8 Carrier Board Technical Reference Manual fora  description of the HP BALLISTIC IC modes     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    VX8_HPGetPauseBit    Function Indicates whether the BALLISTIC HP Local Bus interface chip is in a paused state   Include File vx8 h  Interface  macro  UINT8 VX8_HPGetPauseBit  void    Parameters None    Returned Values State of the HP BALLISTIC PAUSE line indicated by bit D3 in the HSTATUS register   e 0 The BALLISTIC is not paused   e     The BALLISTIC is paused     Part Number 500 00330 73  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPGetRAEBit    Function Gets the value of the Read FIFO Almost Empty bit in the HSTATUS register   Include File vx8 h  Syntax  macro  UINT8 VX8 HPGetRAEBit  void    Parameters None
26.  SRAM can cause a variety of errors  see section  3 1 2 for a description of the problems that may be encountered     Part Number 500 00330 39  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software    40    6 2 3  Shared Bus Transfers    Shared bus accesses to another C4x   s Near Global SRAM  the Global Shared DRAM   the LED register  the SCV64  the HP Bus registers  or the VSTATUS VCONTROL  register can be done with the generic global bus functions defined in this module     For information on Bus Locking  see section 6 5     6 2 4  The Global Shared Bus Lock Stack    Since the interrupt service routines or multi tasking operating systems may require  access to the Shared Buses  a Lock Stack has been implemented to support seamless   LOCK operation     Note  Use of the Global Shared Bus Lock Stack is seamless if the VX8 C4x  Support Software Library functions are used to access the Shared Buses  This  section is provided for reference purposes only  If the VX8 C4x Support  Software Library functions are not used then the issues described here must be  dealt with directly by your application code     The global bus lock stack is a 16 deep global buffer on each C4x that holds current and  previous global bus addresses  The stack is initialized by c_int00 and manipulated by  the functions  VX8_Lock and VX8_ UnLock  All other functions manipulate the lock  stack through calls to these base functions     Note  The size of the G
27.  System is composed of boards and COMM connections  Boards  are comprised of TIM 40 modules  COMM connections  and a base address  TIM 40  modules are comprised of processors and their COMM connections  Processors are  comprised of attributes only     Note  Currently  there is no SDF editor available  you    ll be required to use a  text editor to modify the SDF used by your application  However  an SDF editor  will be available in future product releases     Sections    The SDF is broken up into sections which are identifiable by a name enclosed in square  braces  for example  common  and  Test System   Sections identify TIM 40  modules  VX8 boards  VX8 systems  processors  and boot processors  Each section can  contain several attributes describing the section  For example  TIM 40 module and VX8  board sections contain Component and COMMConnection attributes identifying  processors and COMM port connections  Section names cannot contain spaces and are  case sensitive     The parsing software does not perform multiple passes over the SDF  Sections must be  defined before they are referenced by other sections  SDFs should be defined with the   common  section at the top  followed by processor sections  TIM 40 sections  Board  sections  the System section  and finally the Boot Processor section     Reserved Section Names     e common  symbol table   e BootProc    e End    Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX
28.  This is required for processor less TIM 40 modules or for processors  booting from ROM     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing    ssVX8_SystemOpen    VX8 Carrier Board Programming Guide  VX8 Instrument Driver Functions    Function Opens a VX8 System and optionally resets the system or loads DSP software onto the    system     Include File vx8 h    Syntax RESULT SS FUNCssVX8_SystemOpen  SYSHANDLE  VX8SystemHndlPtr     Parameters  X8SystemHndlPtr    STRING SysDefFile   STRING LoadDefFile   UINT32 flags      Pointer to VX8 system handle storage    SysDefFile Path and filename for the System Definition File  LoadDefFile Path and filename for a Load Definition File  Specify        if  you are specifying an LDF in a subsequent call to  ssVX8 SystemLoadCode  flags Flags described below  Flag Value Description  SSVX8_SYSOPEN_NOACTI  N 0x0 Does not reset or load code on to the  system   SSVX8_SYSOPEN_LOADSYSTEM 0x1 Performs an    ssVX8_SystemLoadCode call     SSVX8_SYSOPEN_RESETSYSTEM  0x2 Resets the boards in the system     Part Number 500 00330  Revision 2 05    175    VX8 Carrier Board Programming Guide  VX8 Instrument Driver Functions    Returned Values VI SUCCESS    176    Remarks    SSVX8_ERROR_NODEA_TIMEOUT    SSVX8_ ERROR PROCLOADCODE COFFPARSE FAILED    SSVX8_ERROR_VX8 STILL _IN_CONFIG       SSVX8_ ERROR LDFOPENLDF FAILED    SSVX8_ ERROR SDFOPENSDF FAILED    SSVX8_ERROR SYSTEM RESET TIMEOUT       SSVX8_ERROR _READFIRMWAREREV_TIMEOUT    SSVX8_ E
29.  Type   TIM   Model   MDC44ST   Components     Proc0  6  C44 PROC STA    Procl  6  C44 PROC STB       comMMConnections       Src  ID  Dst    Proco  1  Procl     On TIM connection     Proco  TIM     TIM module connector  Proco  TIM      Proco  TIM        Procl      Procl      Procl               GENERAL SITE   7   SITE      Custom_Board1   Type   Board   Model   VX8     one of  V8  VX8             BaseAddress   VX8 BASE ADDR 1     Addr is defined above    Components       SiteA  VX8_EMBEDDED SITE   Embedded C40  i VX8_EMBEDDED SITE   Embedded C40  MDC40SS   Single processor module  MDC40SS    Single processor module  MDC40SS    Single processor module  MDC40SS    Single processor module  MDC44ST   Dual processor module  MDC44ST  Dual processor module               COMMConnections   SiteA          UA WNHE O I  OrPrRPUKU    URWNO  OrRPWUU    OU BWDN  OrRNO       Part Number 500 00330 149  Revision 2 05    VX8 Carrier Board Programming Guide    Spectrum Signal Processing  VX8 SICL VISA Instrument Driver     TestSystem   Type   System   Model   Development    Components              coMMConnections        Src  ID  ID     Boardl    Boardi     front panel   Boardl  Boardl     front panel           Board1  8  CUSTOM _Boardl      Board1  section defines sites     Boardl  Boardl     front panel  Boardl  Boardl     front panel     Boot Proc   Board1 SiteA Proc0O   VX8 BASE ADDR1         End     150 Part Number 500 00330    Revision 2 05    Spectrum Signal Processing    Part Number 500 0
30.  VISA 1 1  HP 75000 Series C   240    Embedded near global memory 128k X 32 or 512k X 32    No TIM 40 modules  DRAM optional    2  VX8 Logical 241  Address    2    VX8 board Another VX8 at a base address of 0x28000000  No TIM 40 modules    DRAM  minimum of 8 Mbytes     PC Configuration PC At least 4Mbytes of memory  16Mbytes recommended     Texas Instruments XDS510 for C4x JTAG debugging     Operating System Windows NT or Windows 2000    Running the Program    The vx8vxi c example should be run from JTAG  It is compiled with the appropriate C  initialization routines for Node A  The C4x code  vx8vxi c  has been compiled and  linked to generate the COFF file VX8VXLOUT  To rebuild vx8vxi c  simply call  build bat  This batch file calls blde40a bat  which compiles vx8vxi c and links it with  the C boot routine boot_a asm and the VX8 C4x Support Software library  The  TMS320C4x compiler environment may have to be set to point to the respective  directories in the VX8 C4x software     Part Number 500 00330 195  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  Example Software    In Code Composer  load and run vx8vxi   out  Refer to the  ReadCodeComposer txt file in  lt  nstallPath gt  etc for information about setting up  Code Composer  and running programs on the LeMans   lt  nstallPath gt  is the SDK  installation root  by default C  VXIPNP WINNT ssVX8     Put the variable errors in the watch window     After the execution  the value    errors    
31.  access to the DUART on its C4x Local Bus  Functions are provided in the  VX8 C4x Support Software Library that can be used to initialize the device  configure  interrupts  and transfer data between the DSP and the DUART  Both channels are  brought to the front panel for connection with other standard RS 232 asynchronous  interfaces in the VXIbus system  Use Cable VX8 60  rev 2 0  to connect the DUART  with other interfaces  This cable can be ordered from Spectrum  part    00203629      Note  The VX8 C4x Support Software Library does not provide a DUART  Interrupt Service Routine because the functionality is typically very application  specific  Refer to the DUART example software for a demonstration of how to  configure and use interrupts for Asynchronous data transfer     6 6 2  DUART Functions    Table 14 DUART Functions    Fon J oescnron OOOO O    VX8_DUARTCheckinterrupt Checks which DUART interrupt was asserted on  IIOF3 on Node B    VX8_DUARTEnablelnterrupt Enables a Node B DUART interrupt source for  IIOF3     VX8_DUARTDisablelnterrupt Disables a Node B DUART interrupt source for  IIOF3    VX8_DUARTSetBaudRate Sets the baud rates on the channels of the Node  B DUART     Table 15 DUART Macros    Macro Name Macro Description    VX8_DUARTInByte Reads an 8 bit value from the receive register of a  DUART channel           VX8_DUARTOutByte Writes an 8 bit value to the transmit register of a  DUART channel     51    VX8 Carrier Board Programming Guide  VX8 C4x Support Softwar
32.  and  allocated  and    e Assignment statements   define and assign values to global symbols     Eight linker command files are provided with the VX8 Carrier Board  vx8c40a cmd   vx8c40ar cmd  vx8c40b cmd  vx8c40br cmd  vx8c40t cmd  vx8c40tr cmd   vx8c44t cmd and vx8c44tr cmd  These files are for use with Node A embedded C40   Node B embedded C40  standard MDC40Sxx TIM 40 modules and standard  MDC44Sxx TIM 44 modules respectively  The    r    variants of these command files  generate    register    argument passing versions     5 2 6  C4x DSP Local and Global Memory Maps    Refer to the VX8 Carrier Board Technical Reference Manual for detailed processor  memory maps     Resources Required by the VX8 C4x Support Software Library    Memory    Some system resources are not available to you at various stages of initialization   booting  and at runtime  This section describes what resources the VX8 C4x Support  Software Library requires  when they are required  and what the limitations are to your  code     5 3 1  Node A TMS320C40    Node A requires external memory for executing the Node A Boot Kernel and it requires  external memory as storage for data passed from the host  You cannot place any code    text section  or initialized variables   cinit section  from your application code in the  memory space allocated for the Node A Boot Kernel     After loading the application code  this memory space is free for use by your  application  The default Node A linker command file vx8c40
33.  and data transfer  for the HP Local Bus Interface    e DUART Module providing initialization  data transfer and interrupt support for the  dual UART on Node B   s Local Bus    e Node A Initialization Kernel Module supporting VXIbus A16 register access  from the host and VX8 initialization after a board reset  The Node A C40 DSP must  service any requests made by the host through the A16 configuration registers   Users must link the supplied interrupt service routine for HOF3 in with their Node  A DSP application code and enable this interrupt  This is taken care of by the  boota asm boot initialization routine    Source code is provided for the C4x Support Software Library     3 2 3  Example Programs    The VX8 Support Software provides several example programs which demonstrate how  to use the various interfaces on the VX8 as well as how to combine host and DSP    Part Number 500 00330  Revision 2 05    Spectrum Signal Processing    VX8 Carrier Board Programming Guide  Software Overview    software to form an application  Some of the examples require additional hardware to  run  Please refer to the example program notes in the Chapter 11 of this manual for    system requirements     The following table lists the symbolic constants used in the example programs     Table 1 Symbolic Constants Used in the Example Programs    Constant  _FROM_DRAM    ADDR_INC    blockSize  BOARD2_BASE_ADDR  CH1   CH2   DEST    HP_CONSUME_ISR  LENGTH   LENGTH  MULT_CTRL_REG   MULT1_REG   MULT2_REG
34.  be preceded by a call to  VX8_Lock and followed by a call to VX8_Unlock     VX8_Lock Locks the global bus for access by the calling C4x  The  previous location on the lock stack is unlocked and the  new global bus address location is locked    VX8_Read Sets up and reads a block of data from a defined address  space on the global bus or the VXIbus    VX8_ReadAsyncReg Reads a single memory location from an asynchronous    register on the VX8 board  This function reads the memory  location until two consecutive reads return identical values     VX8_ReadBit Reads the value of a particular bit from a memory location  on the global bus and returns the bit value    VX8_ReadReg Reads a 32 bit value from a single memory location on the  global bus  This routine should not be used when  referencing a DSP   s own local or near global memories    VX8_SetUserLED Sets the state of the front panel user defined LED    VX8_UnLock Unlocks the current global bus resource  and locks the  previous global bus address location according to the lock  stack    VX8_Write Sets up and writes a block of data to a defined address  space on the global bus  or the VXIbus    VX8_WriteBit Sets the state of individual bits in a memory location on the  board  Should not be used for transfers to a DSP   s own  RAM     VX8_WriteReg Writes a 32 bit value to a single memory location on the  global bus  This function should not be used for transfers  to a DSP   s own RAM        Note that writing code to Near Global
35.  boot from any    of  C44     C40     boot from any    ID     ID        Dst   TIM     TIM module connector  TIM   TIM   ProcO   Proco   ProcO        TIM module connector       151    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 SICL VISA Instrument Driver     MDC44ST   Type   TIM   Model   MDC44ST   Components     Proc0  6  C44 PROC STA    Procl  6  C44 PROC STB       COMMConnections       Src  ID  Dst    Proco  Procl     On TIM connection     Proco  TIM     TIM module connector   Proco  TIM       Proco  TIM        Procl  PIM      Procl  PIM      Procl  TIM               GENERAL SITE   Type   SITE      Custom_Board1   Type   Board   Model   VX8     one of  V8  VX8             BaseAddress   VX8_ BASE ADDR 1     Addr is defined above    Components        SiteA  VX8_EMBEDDED SITE   Embedded C40  VX8_EMBEDDED SITE   Embedded C40  MDC40SS    Single processor module  MDC40SS    Single processor module  MDC40SS    Single processor module  MDC40SS    Single processor module  MDC44ST   Dual processor module  MDC44ST  Dual processor module               COMMConnections   SiteA          0N wWNnNRAO I  OrPrRPUKBRWY    UPBWNO  orwuu    UH uN  OorRnNOoO    un wn       152 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing     Custom_Board2   Type   Board   Model   VX8     BaseAddress      Components       SiteA        one of  V8  VX8     VX8_BASE ADDR 2     VX8_EMBEDDED S11    VX8 Carrier Board Programming Guide  VX8 SICL VISA Instrument Driver       
36.  editor to modify the LDF used by your application  However  an LDF  editor will be available in future product releases     The LDF is composed of a single section called  Files   In the Files section  simply list  the processor  defined by its case sensitive resource name  and equate it to the C4x  COFF file that you wish to have loaded by the Instrument Driver  The order in which  the processors are listed is not important  but the processors must correspond to a  processing node defined in the SDF file     The resource name syntax is    lt Board Name gt   lt Site Name gt   lt Processor Name gt     lt COFF file name gt      The following is an example Load Definition File  LDF       Files     Board1 SiteA ProcoO   c  vx8 examples vx8mult out     Embedded TIM A       154 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Part Number 500 00330  Revision 2 05    VX8 SICL VISA Instrument Driver    9 4 5  Calling I O Library Routines Directly    You can choose to bypass the ssVX8_SystemRead and ssVX8_SystemWrite functions  and directly call the I O library routines to fine tune or increase the performance of your  VX8 application     This can be done by opening the VX8 system normally and then using ssVX8_Deref to  obtain an I O library session to the specified VX8  You can then directly call the I O  library read write routines to transfer data to and from the globally accessible memories  on the VX8     You can also open 
37.  familiar with this manual in order to develop  system architecture and data flow paths  The TRM is also the primary reference for  modifying or extending the functionality of the driver        Caution  The hardware interfaces of the VX8 Carrier Board are extremely  complex and interrelated  We strongly urge you to make use of the supplied  C40 software control libraries to initialize and transfer data to the hardware  interfaces        1 2  Reference Documents    Part Number 500 00330  Revision 2 05    Refer to the following documents in conjunction with this guide     VX8 Carrier Board Technical Reference Manual available from Spectrum  VX8 Carrier Board Installation Guide available from Spectrum    VMEbus Extensions for Instrumentation  VXIbus  VXI 1  Revision 1 4  authored by  the VXIbus Consortium  Inc     TMS320C4x User   s Guide available from Texas Instruments  TMS320C4x C Source Debugger User   s Guide available from Texas Instruments    TMS320 Floating Point DSP Assembly Language Tools User s Guide available  from Texas Instruments    TMS320 Floating Point DSP Optimizing C Compiler User   s Guide available from  Texas Instruments    Code Composer Getting Started Guide from Texas Instruments  VXIpnp documents   VXIplug amp play Systems Alliance    SCV64 User Manual   VMEbus Interface Components Manual from Tundra  Semiconductor Corporation    BALLISTIC VXTbus Interface Chip Data Sheet available from Hewlett Packard    VX8 Carrier Board Programming Guide Spectrum Sign
38.  h     FLOAT64   PFLOAT64   VFLOAT64   PVFLOAT64   string types   STRING  STRING256 MAX_STR_LEN   Boolean types   BOOLEAN    float  volatile float  pointer to an float    float  pointer to an float  volatile float    pointer to a volatile float    Q    y  o       string of 256 characters       unsigned long    22 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Software Overview    3 4  Hardware and Software Requirements    Part Number 500 00330  Revision 2 05    VX8 application developers should be familiar with VISA and or SICL software  development  Knowledge of ANSI C software development on VME VXIbus systems  and TMS320C4x software development in ANSI C assembly is vital     VX8 Support Software for HP UX 10 2 SICL VISA was developed on an HP V743  Embedded controller with HP UX 10 2 and VISA G 01 00  This version of VX8  Support Software is to be used with the following hardware and software  configurations     Hardware Software    e  VXIbus mainframe chassis with a e ANSI C compiler    minimum of 2 slots  for slot O controller  TI TMS320C4x development tools  and a single VX8 card   VISA G 01 00    e  VXIbus slot 0 controller  HP V743    VXIbus Embedded Controller for e HP UX 10 2  example     e VX8 Carrier Board    e Windows NT Windows 2000 PC and  an external JTAG interface for  TMS320C4x DSP software  development    The VX8 VISA Windows NT Windows 2000 Instrument driver was developed under  Windows NT using M
39.  in the VX8 System Structure  A number indicates to the SDF software to attempt  loading using the specified COMM port only  If a processor is not reachable for loading  by COMM port  the SDF software will produce an error     LMCR and The LMCR and GMCR values are used during loading to set the Local Memory Control  GMCR Register  LMCR  and the Global Memory Control Register  GMCR  on the C4x DSP   The LMCR and GMCR values should be set to the values indicated by your TIM  documentation     Note  TIM 40 module processors that are connected to the Global Bus must  configure themselves to have STRBO and STRB1 controlled by external RDY  signal     TIM 40 Module Definition  TIM sections define a TIM 40 module by its processors and their COMM port  connections  The processors are defined in the Components attribute  The COMM    port connections are specified in the COMMConnections attribute     The following is an example definition of a TIM 40 module with two processors      MDC44ST     TIM     MDC44ST   Components     Proc0  6  C44 PROC STA    Procl  6  C44 PROC STB       comMMConnections       Src  ID  Dst    Proco  1  Procl  H    On TIM connection     Proco  2s TIM  k    TIM module connector  Proco  F TIM    kp    Proco  3 TIM          Procl     TIM   Procl  P TIM   Procl    TIM              142 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 SICL VISA Instrument Driver    Board Definition    Boards are comprised o
40.  links  it with the C boot routine boot_a asm and the VX8 C4x Support Software library  The  TMS320C4x compiler environment may have to be set to point to the respective  directories in the VX8 C4x software     In Code Composer  load and run vx8hpgen  out  Refer to the  ReadCodeComposer txt file in  lt  nstallPath gt  etc for information about setting up  Code Composer  and running programs on the LeMans   lt  nstallPath gt  is the SDK  installation root  by default C  VXIPNP WINNT ssVX8     Program Description    The HP BALLISTIC IC is reset then configured  The BALLISTIC is set to  GENERATE mode and the block size is set  vx8hpgen c then generates 2 blocks of 16  long words onto the HP Local bus     It is possible to implement and set up the VX8 to have an HP Local Bus interrupt  handler to continually write data out to the HP Local Bus  The Write FIFO Almost Full   WAF  and Write FIFO Almost Empty  WAE  interrupts can be enabled to trigger the  HP Local Bus interrupt     189    VX8 Carrier Board Programming Guide Spectrum Signal Processing  Example Software    11 5  C4x IIOF2 Interrupt Matrix Example    190    VXIbus  Configuration    PC Configuration    The vx8iiof2 c example shows you how to use the IIOF2 interrupt matrix accessible  from the Node A processor  The IHOF2 matrix is set up by Node A so that all node  TOF2 lines are connected on matrix line number 7     It is left to developers to write and install ISRs on HOF2 of other nodes  You can use  JTAG to examine th
41.  or third party debug monitors from an external PC or SUN  workstation     A JTAG OUT connector allows the VX8 to be part of a multi module JTAG path  The  open collector  CONFIG and  GRESET signals are bussed between boards via the  JTAG connectors  The JTAG cable allows multi board resetting  required if the front  panel COMM ports are connected between boards  and  CONFIG to be bussed between  devices     Note  Because of the directional reset state of C4x COMM ports  all VX8s  connected together via COMM port MUST be connected by their front panel  JTAG connectors  The front panel JTAG connectors will reset JTAG connected  VX8s together  thereby damage to COMM ports on reset will be avoided     Each of the C4x processors has a JTAG interface for debugging purposes  The JTAG  chain is controlled by the JTAG PAL  which routes the data lines to each available C40  node in turn  If a TIM site is not occupied then the JTAG chain bypasses that node  The  full JTAG sequence is JTAG IN  Node A  C  E  G  B  D  F  H  JTAG OUT  For multiple  processor TIM 40 modules  refer to the TIM 40 module documentation for information  on the order in which the processors are connected in the JTAG scan path  When an  external debugger is connected to the JTAG IN connector of a board  the on board TBC  is disabled     For further details on the JTAG interface  refer to the VX8 Carrier Board Technical  Reference Manual     2 7 1  JTAG Connection    Connect the JTAG cable from your external debugg
42.  point to the respective directories in the VX8 C4x software     In Code Composer  load and run vx8duart   out  Refer to the  ReadCodeComposer txt file in  lt  nstallPath gt  etc for information about setting up  Code Composer  and running programs on the LeMans   lt  nstallPath gt  is the SDK  installation root  by default C  VXIPNP WINNT ssVX8     Put the variable sum in the watch window     After the execution  the value    sum    should be 45     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing    VX8 Carrier Board Programming Guide  Example Software    Program Description    The DUART program example vx8duart c performs the following actions     e Sets up the baud rate and data formats for channel 1 and channel 2 on the DUART     e Disables interrupts  installs the UART_ISR to service Node B   s IIOF3 interrupt   and then re enables the interrupts     e Writes Data out to channel 1 on the DUART    e When the ISR is triggered  the data is read from channel 2 and summed     11 3  C4x HP Local Bus Consume Mode and ISR Example    VXIbus  Configuration    PC Configuration    Part Number 500 00330  Revision 2 05    The vx8hpcon c example demonstrates how to set up the VX8 in order for it to  consume data from the HP Local Bus  and how to use the HP Local Bus interrupt on  IIOF1 to process the data     A second HP Local Bus device is required to be placed upstream  to the left  of the  VX8 that   s running this example code  The block size of the data should m
43.  s  is now gone  application code   Since there is a Boot Kernel running on Node A and intermediate boot loaders are  downloaded to each DSP at initialization  some DSP resources are not available to you  26 Part Number 500 00330    Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  Reset Conditions and Initialization    at various times  The next section describes what these resources are and how  contention is avoided     For information on the SCV64 configuration after a reset  refer to the SCV64 Default  Configuration section of the VX8 Carrier Board Technical Reference Manual     Part Number 500 00330 27  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  Reset Conditions and Initialization    28 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Software System Description    5 VX8 C4x Software System Description    5 1  Introduction    A library of DSP function calls is provided that allow you to start developing  application code faster by not having to fully understand the complexities and register  level functionality of the hardware interfaces  These function calls provide initialization  and control functionality for all hardware interfaces  as well as optimized data transfer  routines for moving data between the various memory banks on the board  Complete  source code for the C4x Support Software is provided allowing you to expand on the  fun
44.  when the SCV64 IC drives  the VXlbus SYSFAIL line     2 3 2  Connectors    JTAG IN Texas Instruments    XDS510 can be connected to the JTAG IN  connector for use with a debug monitor   JTAG OUT The JTAG OUT connector allows the VX8 to be part of a multi     module JTAG path   RS232 Serial Ports Two RS232 Serial ports are supported by the Node B embedded       C40 DSP   Communication These connectors bring one communication port from each of the  Ports Nodes to the front panel     2 4  C4x Communication Port Architecture    The C4x Communications ports provide high speed parallel interface communications    20 Mbytes sec  to other DSPs and I O sources  The communication is inherently bi   directional and point to point  There is no latency for access and you can use a single  COMM port for half duplex communication between two devices     The TMS320C40 provides 6 COMM Ports and the TMS320C44 provides 4 COMM  Ports  COMM Port routing on the VX8 Carrier Board accounts for fewer COMM Ports  on a C44 by ensuring that the front panel connections are valid for Spectrum   s C40 and  C44 based TIM 40 Modules     6 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  Hardware Overview    Front Panel                      L T  o0  o  o0                COMM Port  Routing          Unused for   single C44   processor  nodes          a  C40 and C44                                                                      Figure 3 Communication P
45. 00330  Revision 2 05    vii    VX8_HPSetDMAT arget           ccceeeeeeeeeeeeeeeeeeeeeeeeeeeaeeeeeeaaeeeseeaeeeeeenaeeeeeenaeeeeneaas 92    VX8_HPSetFrameBit                 ccccceccceccccceceeeeeeeeeaeeeceeeeeseseneaeeeceeeeesessenieeeeeeeeeeees 94   VX8 APS etMode ici tier as esti eet 95  VX8_HPSetReadDone                ccccccececceeceeeceeeeeeeecaeeeeeeeeesecceaeeeeeeeseesenueaeeeeeeeees 97   VX HPSetStipBitin dae ai de 98  VX8_HPSetWriteBlockSiZe      oooooociinncocccinnnccccncononcconcnnnnononccnnnnnnnannnnnnncnnnaninanns 99  VX8_HPSetWriteDoneBit    oooooccccnnnncococccccocononnononccnncnnnnnnnoncnnnnnnnnnnnnnnnnnnnnnnnnanns 100  VX8_HPSUSPendDMA sessar r iee naes ARIE AA EEA AT A TEE 101   VX8 APWiriteE C Cremna a a eed 102   YE HPW BRIEF O St EEE Ai 103   VAO  APYE TT eie e A ee 104  A Mares lend EE O 105  A A AO 106  VX8_ReadASyNCREJ coocccccococccccononcnccnnoncnccnnonnncnnnn nn nc cnn inpia di iira aeina Paliani 108  VX84ReadBliuri a e o eo tdo del ted enla as dedo 109  A O 110  VX8_SCV64AcKkInterrupt o oooooocccccinocococococccccnnnnononncnnnnnnnnnnnnnnnnnnnnnnnnnmnnnnnnnnnnnanns 111  VX8_SCV64Disablelnterrupt    oooooconcoocccnnnncccnonononcconcnnnnnononcnncnnnnnnnnnnnnncnnnnnnnnnns 113  VX8_SCV64DMA Transfer oie einhinne a a a 114  VX8_SCV64Enablelnterrupt            2    cc cceccceceeeeeeeee cece eeeeeeeeeeaeceeeeeeseenueeeeeeeeeeees 116  VX8_SCV64Generatel nterrupt               ccceceeeeceecee cece cess seceeeaeeeeeeeeeeecnaeeeeeeeeeees 117  VX8_SCV64SetSySFa
46. 0330    Revision 2 05    VX8 Carrier Board Programming Guide  VX8 SICL VISA Instrument Driver    SDF Example 3   Multiple VX8 Configuration    The following is a sample SICL System Definition File  SDF  containing two VX8  boards with TIM 40 modules  Notice how the multiple board base address  resource  names  are defined in the common section and also referenced in the individual board  definition sections  Note that the board base addresses use SICL nomenclature  These  descriptors must be modified if you are using VISA      common     VX8_BASE ADDR_1    VX8 BASE ADDR 2       C40_PROC_VX8EMBED     Type   Processor   Model   C40   BootPort   ALL   Speed   60    LMCR   0x3e840000   GMCR   0x3a4c0000      c40_PROC_ss     Type   Processor   Model   C40   BootPort   ALL   Speed    60    LMCR   0x3dec2050   GMCR   0x3a4c0000      C44_PROC_STA     Type   Processor   Model   C44   BootPort   ALL   Speed   60    LMCR   0x3d74a850   GMCR   0x3a4c8000      C44_PROC_STB     Type   Processor   Model   C44   BootPort   ALL   Speed   60    LMCR   0x3d74a850   GMCR   0x3a4c8000      VX8_EMBEDDED_ SITE   Type   TIM    Model   VX8EMBED   Components     Proc0  6  C40 PROC _VX8EMBED       COMMConnections       MDC40SS     Type   TIM   Model   MDC40SS     Components     Proc0  6  C40 PROC SS     COMMConnections         Src    Proco    Proco    Proco    TIM A   TIM     TIM            Src    Proco        of  C44     C40     boot from any    of  C44     C40     boot from any    of  C44     C40    
47. 18    Part Number 500 00330    Revision 2 05    3 2 3  Example Programs  enice e a nano nc nc nano nc nc nan rra AAA 18    3 3  Data TYDS ia A POO AA A medal 20  3 4  Hardware and Software RequireMentS      ocococccococonococononononononono nono nonononononononon 23  Reset Conditions and Initialization          oocccccnnnnccccnoncnnnnononnnnnnnnnnnanano 25  4 1  RET E EE E chet ed TEA 25  4 1 1  Hard Reset cc ii el a a aia 25  4 1 2  SOf RESE a r a a tcl ie a mien a T iain 25  4 2  Boot Kernel Initialization             ccccccccccccceseecesseeseeeeeeeseeeeeeeseseseseeeseseseseseeeseeeeeeees 26  VX8 C4x Software System DescriptiON    ooommmccncccconnnnnnnnnnncncnnnnnnnananans 29  5 1  Introductions sii da o eta o dedo de e valo e do a o DU do a 29  5 2  Fundamentals of C4x Code DevelopMeNt  oooccccconocccccccccononnononnconcnnnnnnnononnnnnnns 29  5 2 1  C4x Library preparation     oooooonnonococcccnnccccnnononcnnnnnnnnnnnononcnnnnnnnnnnnnnnnno 29  5 2 2  Procedure for Getting a DSP C Program Running    30  5 2 3  Compiler Batch Files        ooooonooninnccnncnnnnnnnnococcccconccnnnnononcnnnnnnnnnnnnnennnn 32  5 2 4  Boot  Startup   Fla Seniau eaa aa E EEEN es 33  5 2 5  Linker Command FilesS    oooococococococacanananonononononononono nono no nononononononononona 34  5 2 6  C4x DSP Local and Global Memory Maps     oooocccccconccccnnonccccnnancccnnno 34  5 3  Resources Required by the VX8 C4x Support Software Library                        34  5 3 1  Node A TMS320040 0000 coccio
48. 2  to be used as  respective offsets on the host     The syntax for board_name will differ depending on whether your I O library is SICL  or VISA  For SICL  the syntax will resemble    vxi 240     For VISA  the syntax will  resemble    V XI0  240  INST     Refer to the I O library documentation for the proper  resource descriptor nomenclature     The SICL implementation by default maps 64k at a time  ssVX8_SystemRead maps and  unmaps the memory window for transfers which span 64k pages  The Instrument Driver  map window size is set at compile time by the SSVX8_RW_WIN_NUM_64K_ PAGES       Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 Instrument Driver Functions    define in ssvx8brd c  If your SICL application performs transfers of more than 64k  the  instrument driver may be more efficient if the number of 64k pages mapped is  increased  This will require you to modify this define and recompile the instrument  driver     Accessing C4x global memories from the host is intrusive  especially if your DSP  application uses the Global Shared Bus extensively  Using the shared DRAM to buffer  data will isolate the host from colliding with C4x and HP BALLISTIC traffic on the  global shared bus     Depending on your host interface  it may be more efficient to use DMA from the host or  through the SCV64 DMA controller to perform data transfers     Note that reads to any broadcast areas will return invalid data     The followi
49. 20C4x compiler environment may have to be set to point to the respective  directories in the VX8 C4x software     In Code Composer  load and run vx81m  out  Refer to the  ReadCodeComposer txt file in  lt  nstallPath gt  etc for information about setting up  Code Composer  and running programs on the LeMans   lt J nstallPath gt  is the SDK  installation root  by default C  VXIPNP WINNT ssVX8    Put the variable hit in the watch window     Perform a write operation to this board  See NOTE above     After the execution  the value    hit    should be 1     Program Description    The SCV_ISR is installed to handle the LM interrupts and the location monitor interrupt  is enabled on the SCV64  The main program will then wait forever for LM interrupts     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing    VX8 Carrier Board Programming Guide  Example Software    When a location monitor interrupt is received  the ISR acknowledges the interrupt by  reading the location monitor FIFO and incrementing the number of location monitor  interrupts received     Again  this example requires another device to write the location monitor on the SCV64   the uppermost long word in the VX8 s A32 memory      VXibus  SCV64  DMA Example    The vx8dma c example demonstrates how to perform SCV64 DMA memory transfers   The example sets up a single SCV64 A32 D32 DMA to another VX8     System Configuration    VXIbus  Configuration    PC Configuration    Running the Program    Controller    
50. 3  Compiler Batch Files    Compiler batch files for the TI Floating Point Tools are supplied with the VX8 Carrier  Board C4x Support Software Disk  The batch files are stored in the directory   lt VXIPNPPATH gt  WinNT ssvx8 bin     Note  Several batch files are provided for the various processing nodes on the  VX8 Carrier Board because different boot routines and linker command files  are needed for the specific processing nodes     The following batch file is named bldc40a bat and should be used for compiling and  linking C DSP code for the Node A embedded C40     c130  v40  1  z  x  cr    boot boot_c obj  o  1 out   vxipnp winnt ssvx8 etc vx8c40a cmd  m  1 map    The following batch file is named bldc40b bat and should be used for compiling and  linking C programs for the Node B embedded C40     c130  v40  1  z  x  cr    boot boot_b obj  o  1 out   vxipnp winnt ssvx8 etc vx8c40b cmd  m  1 map    The following batch file is named bldc40t bat and should be used for compiling and  linking C programs for MDC40Sxx TIM modules  This batch file uses an example  linker command file  Please refer to the User Manual for the specific TIM 40 module  that you are using  as it will highlight any particular hardware requirements for the  linker command file or the boot file     c130  v40  1  z  x  cr    boot boot_t obj  o  1 out   vxipnp winnt ssvx8 etc vx8c40t cmd  m  1 map    Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Part N
51. 4x Support Software Functions    VX8_SCV64DMATransfer    Initiates DMA transfers between the VXIbus and Shared DRAM  Near Global SRAM     114    Function    Include File    Syntax    Parameters    vx8 h    Spectrum Signal Processing    STATUS VX8_SCV64DMATransfer PVUINT32 local_adar     PVUINT32 vxi_addr    UINT32 direction    UINT32 length    DMA TRANSFER_TYPE transfer_mode      local_addr Volatile pointer to local DRAM or Global SRAM address    vxi_addr Volatile pointer to byte addressed VXIbus physical address    direction 0 DMA READ for data transferred from VXIbus to Near  Global SRAM or shared DRAM    1  DMA _ WRITE for data transferred from Near Global  SRAM or shared DRAM to VXIbus    length Block length or transfer    transfer_mode Transfer Flags listed below    Transfer Flag  A32 D64 NONPRIV    A32 D32 PRIV  A32 DI6 PRIV    A32 D32 NONPRIV  A32 D16 NONPRIV  A24 D32 PRIV    A24 D16 PRIV    A24 D32 NONPRIV  A24 D16 NONPRIV    Description    32 bit supervisory data transfer to A32 space on the  VXIbus    32 bit supervisory data transfer to A32 space on the  VXIbus    16 bit supervisory data transfer to A32 space on the  VXIbus    32 bit user data transfer to A32 space on the VXIbus  16 bit user data transfer to A32 space on the VXIbus    32 bit supervisory data transfer to A24 space on the  VXIbus    16 bit supervisory data transfer to A24 space on the  VXIbus    32 bit user data transfer to A24 space on the VXIbus  16 bit user data transfer to A24 space on the VXIbus 
52. 5    Sets the value of the DMA_INCR bit in the HCONTROL register   vx8 h    STATUS VX8 HPSetDMAIncrement  UINTS8 state      state 0   no address incrementing  for DMA transfers to a Port   1   increment DMA address    VX8 SUCCESS The DMA increment bit was written     This function allows the DMA transfers to write to a single address  or successive  memory locations     91    VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    VX8_HPSetDMATarget    Function Writes the target of an HP Local Bus read DMA transfer to the HP DMA controller  and  sets the buffer addresses of the target and the wait states of the buffer memory     92    Include File    Syntax    Parameters    Returned Values    Remarks    vx8 h    Spectrum Signal Processing    STATUS VX8 HPSetDMATarget  PVUINT32 buf_0  PVUINT32 buf 1     buf 0    buf _1    wait    flags    UINTS wait  UINT32 flags      Volatile pointer to global memory  Must be on a 1kword  0x400   boundary  This is an offset from the base of the Global Shared  memory of the targets specified by HTARGET and not an absolute  address     Volatile pointer to global memory  Must be on a 1kword  0x400   boundary  This is an offset from the base of the Global Shared  memory of the targets specified by HTARGET and not an absolute  address    Number of wait states for the DMA transfers    Valid values are 0   7  See the following note     Target modifier flags  listed on the next page     Note  A 60 MHz MDC40Sxx TIM 40 module cannot 
53. 8 SICL VISA Instrument Driver    Types and Models    The type of each section  except for the reserved sections  is identified by the Type  attribute  Type is equated to one of several keywords     Type Keywords     e Processor   e TIM   e Board   e Resource   e System   e Prototype   Sections may also have a Model attribute  which is simply a text identifier that can be    used to provide information about the component  The Model attribute does not affect  the SDF and can be anything you want     Components    Depending on the type of section  the Components attribute identifies the components  belonging to that specific section     Section names are used in the Component s attribute of TIM 40 module  Board  and  System sections to specify which section the components belong to  However  the  sections must be defined before they are referenced in Components attributes     Components Syntax     Components       lt identifier gt    lt   COMM ports gt    lt defining section name gt       lt identifier gt    lt   COMM ports gt    lt defining section name gt      The following is an example of a Components attribute declaration of a TIM 40 module  with two processors     Components     Proc0  6 C44 PROC ST1    Procl  6  C44 PROC ST2          Part Number 500 00330 139  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 SICL VISA Instrument Driver    COMMConnections    The COMM port connections for TIM 40 modules and VX8 boards and systems are  id
54. 800004 from VXIbus A32      This function can be found in al6ctrl c  This function is called in the Node A Boot  Initialization kernel and must be linked with Node A   s DSP application software  see  Figure 7 in section 5 2 2        This function should not be called by Node A   s DSP application code     54    Note  This macro is called automatically by TI code when needed and is thus  transparent to the user  Under most circumstances the user does not need to call  this function manually and it is only included here for reference     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    VX8_DUARTCheckInterrupt    Function    Include File    Interface    Parameters    Returned Value    Remarks    Part Number 500 00330  Revision 2 05    Determines which event generated the interrupt from the DUART     The associated DUART channel will freeze all interrupts and only indicate the highest  priority interrupt pending     vx8 h    UINT8 VX8 DUARTCheckInterrupt UINTS8 channel      channel 1   check interrupts on channel 1  2   check interrupts on channel 2    int_level Interrupt pending on channel   Interrupt Value Description   DUART_INT_NONE 0x01 No interrupt pending on the DUART channel    DUART_INT_LINE 0x06    Receiver Line Status    interrupt pending on the  DUART channel    DUART_INT_RX 0x04    Receiver Data Available    interrupt pending on  the DUART channel    DUART_INT_TIMEOUT 0x0C
55. 8_SUCCESS The CONT bit was written     This macro allows the HP BALLISTIC interface chip to switch between modes in a  continuous manner  The continuous mode overrides the default paused restart  handshake mode of operation  With the CONT bit set  the BALLISTIC IC will  immediately transition out of its paused state     Setting the CONT bit will restart the BALLISTIC IC from a paused state and the  current HP BALLISTIC mode will be assumed     The CONT bit is typically set after the HP Local Bus interface is reset  with  VX8_HPReset  and the HP BALLISTIC mode is set  with VX8_HPSetMode      89    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPSetDMAEnable    Function    Include File  Syntax  macro     Parameters    Returned Values    90    Sets the value of the DMA_ON bit in the HCONTROL register  and initiates a read  DMA transfer from the HP Local Bus FIFO to a C40   s Near Global SRAM     vx8 h  STATUS VX8_HPSetDMAEnable  UINTS8 state    state Value of the DMA_ON bit in the HCONTROL register    1  enable DMA transfers  0   disable DMA transfers    VX8 SUCCESS An HP Local Bus Read DMA was initiated  VX8 is  CONSUME ing data      Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    VX8_HPSetDMAIncrement    Function  Include File  Syntax  macro     Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 0
56. ART   This means that STRIP will not take affect until the next RESTART  STRIP should  only be set when the BALLISTIC IC is in a PAUSED state     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    VX8_HPSetWriteBlockSize    Function  Include File  Syntax  macro     Parameters    Returned Values    Part Number 500 00330  Revision 2 05    Writes the HP Local Bus outbound block size to the HBLOCK register   vx8 h    STATUS VX8 HPSetWriteBlockSize  UINT32 block_size      block_size The block size of outgoing HPbus transfers in long words    VX8 SUCCESS The block size was written     99    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPSetWriteDoneBit    Function  Include File  Syntax  macro     Parameters    Returned Values    Remarks    100    Sets or clears the write done line to the BALLISTIC HP Local Bus interface chip   vx8 h  STATUS VX8 HPSetWriteDoneBit  UINTS8 state      state State of WRITEDONE  bit D1  in the HWRITEEOB register     VX8 SUCCESS The WRITEDONE bit was written     The next end of block  HP_INT_EOB  output to the BALLISTIC IC will trigger the end  of transfer     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    VX8_HPSuspendDMA    Function  Include File  Syntax  macro     Parameters    Returned Values    Remarks  
57. Addr is defined above    TE         VX8_EMBEDDED_S17  MDC40S8S    MDC40SS       TE      Embedded C40  Embedded C40  Single processor module  Single processor module    MDC40SS     MDC40SS       Single processor  Single processor    module  module    MDC44S1    R       MDC44S1    a            1    Dual processor module  Dual processor module         COMMConnections     SiteA     Part Number 500 00330  Revision 2 05         OUP WNFE O Il  orru    0 5   2 5   3  3   4 1   5 0     UR DN  OPNO    un wN       153    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 SICL VISA Instrument Driver     TestSystem   Type   System   Model   Development    Components            Board1  8  CUSTOM Boardl       Board1  section defines sites    Board2  8  CUSTOM Board2      Board2  section defines sites             COMMConnections        Src  ID    Boardl  Board2   Boardl  Board2   Boardl  Board2   Boardl  Board2   Board2  Boardl   Board2  Boardl   Board2  Boardl                           Board2  Boardl     NANOHDKNO     Boot Proc   Boardl  SiteA Proc0 VX8_ BASE ADDR1   Board2  SiteA Proc0 VX8_ BASE ADDR2      End        9 4 4  Load Definition File  LDF     The LDF defines the software configuration of your VX8 system  It contains the paths  and filenames for the C4x DSP executables that are to be loaded by the Instrument  Driver  The LDF syntax is similar to the SDF  but is much simpler     Note  Currently  there is no LDF editor available  you   ll be required to use a  text
58. DSP SYSTEMS WORLDWIDE Ss    LeMans  VX8 Carrier Board  Programming Guide  Document Number 500 00330  Revision 2 05  April 2002    Copyright    2002 Spectrum Signal Processing Inc   All rights reserved  including those to reproduce this document or parts thereof in any form without permission in writing from    Spectrum Signal Processing Inc   All trademarks are registered trademarks of their respective owners   Spectrum Signal Processing reserves the right to change any of the information contained herein without notice     Part Number 500 00330  Revision 2 05    Preface    About  Spectrum       Contacting  Spectrum    Customer  Feedback    Spectrum Signal Processing offers a complete line of DSP hardware  software and I O  products for the DSP Systems market based on the latest DSP microprocessors  bus  interface standards  I O standards and software development environments  By delivering  quality products  and DSP expertise tailored to specific application requirements   Spectrum can consistently exceed the expectations of our customers  We pride ourselves  in providing unrivaled pre  and post sales support from our team of application  engineers  Spectrum   s excellent relationships with third party vendors provide customers  with a diverse and top quality product offering     In 1994  Spectrum achieved ISO 9001 quality certification     Spectrum   s Applications Engineers are available to provide technical support Monday to  Friday  8 00 AM to 5 00 PM  Pacific Standard T
59. Definition file  LDF   mult ldf  specifies that VX8MULT OUT is to be  loaded onto Node A of Boardl defined in mult sdf     Program Description  The multiplication program example mult c performs the following actions     e Opens the VX8 System   e Initializes the MULT control register   e Loads DSP software onto the VX8   e Asks you to input 2 floating point numbers   e Writes the numbers to the VX8 and asks the DSP to perform the multiplication    e The VX8 performs the multiplication  with the necessary IEEE to TI floating point  conversions   places the result in the result memory location  and signals the host  that the transaction is done     e The host reads and displays the result  then asks for a key hit to continue     11 2  Node B DUART and C4x ISR Example    The VX8duart c example is a simple C4x program that shows you how to set up the  dual UARTs  DUARTSs  on the VX8 Node B processor and how to install an interrupt  service routine to handle incoming UART data     Note  This example program is meant to be run only on Node B and should be  loaded via JTAG so that you can watch the program as it executes     The front panel RS 232 connectors must be connected using a NULL modem cable     The main program of the VX8duart c example writes a ramp of data to channel 1 of the  DUART and the data is received on channel 2 via the NULL modem cable  An ISR is  set up to receive the data on channel 2  The ISR simply generates a sum of all data  received through the UART chan
60. ID PARAMETER Invalid transfer mode flag     Data widths less than 32 bit are right justified in the destination address space  That is   D16 and DO8EO0 reads will place data in the destination space    unpacked     Therefore   for two consecutive D16 reads  the data will appear in the bottom 16 bits in two  consecutive 32 bit memory locations     This routine performs locking and unlocking of the global shared bus  The destination  address must be local to the DSP  internal  local  or near global SRAM         C44 based TIM 40 module writes must remain within a 64 Mbyte page     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing    Transfer Flag  VX8_ D32  VXI_A32 D32 PRIV    VXI_A32 DI6 PRIV    VXI_A32 D08 PRIV    VXI_A32 D32 NONPRIV    VXI_A32 D16 NONPRIV    VXI_A32 D08 NONPRIV    VXI_A24 D32 PRIV    VXI_A24 D16 PRIV    VXI_A24 D08 PRIV    VXI_A24 D32 NONPRIV    VXI_A24 D16 NONPRIV    VXI_A24 D08 NONPRIV    VXI_A16 D16 PRIV    VXI A16 D08 PRIV    VXI_A16_D16 NONPRIV    VXI_A16_D08_NONPRIV    Part Number 500 00330  Revision 2 05    VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    Description  32 bit data transfer to on board SRAM or DRAM    32 bit supervisory data transfer to A32 space on  the VXIbus    16 bit supervisory data transfer to A32 space on  the VXIbus    8 bit supervisory data transfer to A32 space on the  VXIbus    32 bit user data transfer to A32 space on the  VXIbus    16 bit user data transfer to A32 space on the  VXIb
61. IM module connector  TIM    TIM    Proco    Proco    ProcO         V8  VX8             Addr is defined above     SiteA     VX8_ EMBEDDED SI1    TE         VX8 EMBEDDED SI       GENERAL _SI1  GENERAL SIT  GENERAL SIT  GENERAL SIT  GENERAL SIT  GENERAL SIT       1    1  1  1  1    TE   TE   TE   TE   TE   TE             COMMConnections   SiteA          UPWNEe  OC I  OrPrRPUKBU    URWNO  orwuu    OrRNO    TE         Embedded C40  Embedded C40    Empty  Empty  Empty  Empty  Empty  Empty    Site  Site  Site  Site  Site  Site    Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 SICL VISA Instrument Driver     TestSystem   Type   System   Model   Development    Components       Board1  8  CUSTOM _Boardl      Board1  section defines sites           Boot Proc   Boardl SiteA ProcO0   VX8_BASE ADDR1         End     Part Number 500 00330 147  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 SICL VISA Instrument Driver    148       SDF Example 2   A Single VX8 Populated with TIM 40 Modules    The following is a sample SICL System Definition File  SDF  containing a single VX8  board populated with TIM 40 modules  Note that the board base addresses use SICL  nomenclature  These descriptors must be modified if you are using VISA     Notice how the C44 processors in the ST TIM 40 module are specified as having 6  COMM ports  The missing COMM ports on the TMS320C44  0 and 3  are not included  in the C
62. If you want your VX8 application to access the VX8 system using a VXIpnp compliant  instrument driver interface  your application should call the VXIpnp Module functions   to open  close and check error messages  See the following VXIpnp Module section for  more details  All other calls should be made to System Module functions or directly to   the I O library functions     User Application  VXIpnp Module   for VXlpnp compliance   VX8 System Module  VISA I O Library    Figure 10 VISA Instrument Driver Program Flow        VISA Instrument Driver    In certain instances  you may wish to bypass the instrument driver and call the I O  library functions directly  for example to optimize data transfer rates to the host  Refer  to your VISA documentation  if you are going to access the I O library functions  directly     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 SICL VISA Instrument Driver       Caution  Take extreme care when directly calling I O library routines as your  calls can easily affect components outside of the VX8 System        See Table 17 VXIpnp Module Functions for a list of the VXIpnp Module functions and  Table 18 System Module Functions for a list of the System Module functions     The Windows driver was compiled as a Win32 DLL under Microsoft Visual C version  6 0  If you are building VISA code under Windows NT or Windows 2000  the compiler  environment on the host should be set in the following mann
63. Node A is always allocated to VXIbus A16 Register  Support  The interrupt service routine for this interrupt is provided  BOOT_HOF3Isr     an alias for c_int06  the required nomenclature for ISRs   with the VX8 C4x Support  Software Library and must be linked with your application code  No other interrupts are  required for support of the VX8 C4x Support Software Library     Ensure that COMM Port transfers are not initiated until the loading process is complete   This will prevent DSPs that are attempting to boot via COMM port from being  corrupted  We recommend having the host use a flag to signal the DSP to continue code  execution once loading is complete     5 3 2  Node B TMS320C40 and TIM 40 Based DSPs    The Node B TMS320C40 and all TIM 40 Based C4x DSPs require external memory for  executing the intermediate COMM Port Boot Kernel  You cannot place any code   text  section  or initialized variables   cinit section  from your application code in the  memory space allocated for the Intermediate Boot Kernel  After loading of your  application code is complete  this memory space is now free for use as uninitialized  variables  working data memory  or as a target for HP Local Bus DMA transfers  The  default Node B linker command file vx8c40b cmd defines the space COM_KERNEL at  address 0x8000 0000 with length 0x100  1 Kbyte   The default TIM 40 based DSP  linker command file vx8c40t cmd also defines the space COM_KERNEL at address  0x8000 0000 with length 0x100  1 Kbyte   Th
64. OMMConnections declaration in the ST TIM 40 section  The ST TIM 40  module is also specified as having 2 processors in the Components declaration     Front panel COMM port connections are made between Nodes A and C  B and D  E and  G  and between F and H      common   VX8 BASE ADDR_1   vxi 240      C40_PROC_VX8EMBED   Type   Processor   Model   C40  of  C44  C40   BootPort   ALL  boot from any  Speed   60    LMCR   0x3e840000    GMCR   0x3a4c0000     C40 _PROC_SS   Type   Processor   Model   C40  of  C44  C40   BootPort   ALL  boot from any  Speed   60    LMCR   0x3dec2050    GMCR   0x3a4c0000     C44 PROC STA   Type   Processor   Model   C44  of  C44  C40   BootPort   ALL  boot from any  Speed   60    LMCR   0x3d74a850    GMCR   0x3a4c8000     C44 PROC STB   Type   Processor   Model   C44  of  C44  C40   BootPort   ALL  boot from any  Speed   60   LMCR 0x3d74a850   GMCR 0x3a4c8000      VX8_EMBEDDED_SITE    Type   TIM    Model   VX8EMBED    Components     Proc0  6  C40 PROC VX8EMBED     comMMConnections        Src  ID  Dst     Proco  TIM     TIM module connector   TIM     TIM   Proco   Proco   Proco        1  1  1  1       Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 SICL VISA Instrument Driver     MDC40SS    Type   TIM    Model   MDC40SS    Components     Proc0  6  C40 PROC SS      comMMConnections        Src  ID  Dst     Proco  TIM     TIM module connector   TIM   TIM   Proco   Proco   Proco            MDC44ST  
65. Operating System  I O Library  Mainframe    VX8 Board 1  Logical Address    VX8 Configuration    VX8 Board 2  Logical Address    2    VX8 board    PC    Operating System    HP E1497A   v743    HP UX version 10 2   HP SICL version 3 0   VISA 1 1  HP 75000 Series C   240    Embedded near global memory 128k X 32 or 512k X 32  No TIM 40 modules   DRAM  minimum of 8 Mbytes    241    Another VX8 at a base address of 0x28000000  No TIM 40 modules  DRAM  minimum of 8 Mbytes     At least 4Mbytes of memory  16Mbytes recommended   Texas Instruments XDS510 for C4x JTAG debugging   Windows NT or Windows 2000    The vx8dma c example should be run from JTAG  It is compiled with the appropriate C  initialization routines for Node A  The C4x code  vx8dma c  has been compiled and  linked to generate the COFF file VX8DMA OUT  To rebuild vx8dma c  simply call  build bat  This batch file calls bldc40a bat  which compiles vx8dma c and links it with  the C boot routine boot_a asm and the VX8 C4x Support Software library  The  TMS320C4x compiler environment may have to be set to point to the respective  directories in the VX8 C4x software     Part Number 500 00330  Revision 2 05    193    VX8 Carrier Board Programming Guide Spectrum Signal Processing  Example Software    In Code Composer  load and run vx8dma   out  Refer to the  ReadCodeComposer txt file in  lt  nstallPath gt  etc for information about setting up  Code Composer  and running programs on the LeMans   lt  nstallPath gt  is the SDK  ins
66. ROR_CHANNEL_VALUE    channel     The interrupt s  were disabled   Unknown channel specified     Remarks Multiple interrupts can be disabled simultaneously  This is accomplished by ORing the    desired interrupt levels together     This function should only be called in Node B DSP application software     56    Part Number 500 00330  Revision 2 05    Spectrum Signal Processing    VX8_DUARTEnablelnterrupt    VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    Function Enables one of the interrupts sources on channel   and or channel 2 of the DUART     Include File vx8 h    Syntax STATUS VX8 DUARTEnableInterrupt  UINT8 channel  UINTS int_level      Parameters channel 0   program both channels  1   program channel 1  2   program channel 2    int_level Interrupt s  to enable  Interrupt Value Description  DUART_INT_LINE 0x06    Receiver Line Status    interrupt on the DUART    DUART_INT_RX 0x04  DUART_INT_TIMEOUT 0x0C  DUART_INT_TX 0x02    DUART_INT_MODEM 0x00    Returned Value DUART SUCCESS    DUART_ERROR_CHANNEL_VALUE    channel        Receiver Data Available    interrupt on the  DUART channel        Character Timeout Indication    interrupt on the  DUART channel        Transmitter Holding Register Empty    interrupt  on the DUART channel        MODEM Status    interrupt on the DUART  channel     The interrupt s  were enabled   Unknown channel specified     Remarks Multiple interrupts can be enabled simultaneously  This is accomplished by ORing the    desir
67. RROR READSELFTESTRES TIMEOUT    SSVX8_ ERROR_NO_VX8 IN SYSTEM STRUCT       SSVX8_ ERROR BAD RSRC_DESCRIPTOR       SSVX8_ERROR_NO_SSVX8_FOUND       SSVX8 ERROR MEMORY ALLOCATION    Spectrum Signal Processing    Successfully opened the VX8 system     An error occurred during loading  Node  A is no longer responding      An error occurred during the parsing of a  C4x COFF file     At least one DSP in the system is still  asserting CONFIG      An error occurred during the parsing of  the LDF     An error occurred during the parsing of  the SDF     One of the VX8 devices in the system  failed to initialize after being reset     Timed out waiting to read a VX8  firmware revision     Timed out waiting to read a VX8 self  test result     No VX8 devices were found in the  system definition     A VX8 in the SDF does not exist in the  chassis  check your LA settings      A device in the SDF is NOT a VX8     Failed to map memory through the I O  library     This is the main initialization routine for the VX8 system  The VXIpnp applications  should call ssVX8_ open  after calling ssVX8_init  instead of ssVX8_SystemOpen     If the SSVX8_SYSOPEN LOADSYSTEM flag is indicated  the LoadDefFile  parameter must indicate a valid LDF and ssVX8_SystemLoadCode will be called  internally by this function  The VX8 System will be reset before the DSP application    software is loaded     If the SSVX8_ SYSOPEN LOADSYSTEM flag is not indicated  the VX8 system will  not be loaded  This option should only 
68. RW_NODEF 0x07000000 dst relative to Node F Global base  SSVX8_RW_NODEG 0x08000000 dst relative to Node G Global base  SSVX8_RW_NODEH 0x09000000 dst relative to Node H Global base  SSVX8_RW_ALLNODES 0x0A000000 dst relative to Broadcast ALL base  SSVX8_RW_CDEFGH 0x0B000000 dst relative to Broadcast TIM sites base  Rovere een 0x0C000000 dst relative to Broadcast C  D  G   amp  H  base  SSVX8_RW_EFGH 0x0D000000 dst relative to Broadcast E  F  G   amp  H  base  pay ney Ce 0x0E000000 dst relative to Broadcast C  amp  D base  Boy BAM 0x0F000000 dst relative to DRAM base    181    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 Instrument Driver Functions    Returned Values    Remarks    182          VI_SUCCESS Success  SSVX8_ERROR_RW_IO_FAILED TVO library read write error  SSVX8_ ERROR RW_BAD VX8 ADDRESS RANGE Bad DSP address or length  SSVX8_ERROR MEMORY ALLOCATION Mapping error   SSVX8_ WARN RW_ZERO LENGTH Length is zero       Refer to the VX8 Carrier Board Technical Reference Manual for the VX8   s A32 slave  memory map     Keep in mind that the host system views the VX8 as being byte addressed  Therefore   the Host code must increment the address by 4  bytes  for consecutive memory  locations on the VX8  All DSP defined offsets must be multiplied by 4  or left shift by  2  to be used as respective offsets on the host     The syntax for board_name differs depending on whether your I O library is SICL or  VISA  For SICL  the syntax resembles    vxi 240     For 
69. R_DMA_ACTIVE VXIbus DMA transfer currently in  progress    SCV64_ERROR_UNALIGNED_DMA_TRANSFER_   SCV64 DMA does not support  unaligned transfers     012D HPBUS_ERROR_INVALID_BLOCK_SIZE The block size is greater than 1024   012E HPBUS_ERROR_FIFO_FLAG_VALUE A FIFO flag level is out of range     012F HPBUS_ERROR_FIFO_INIT Error in programming the FIFO flag  levels  The FIFOs are in an unknown  state     0130 HPBUS_ERROR_WAIT_STATE_VALUE Wait state value out of range   0131 HPBUS_ERROR_BUF_ADDR_VALUE Invalid destination address     0132 HPBUS_ERROR_FLAG_VALUE The transfer flags are invalid        SCV64_ERROR_LOCAL_ACCESS An access error has occurred     SCV64_ERROR_BAD_IACK An access error occurred while  running the IACK cycle                 Part Number 500 00330 197  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  Appendix A  Status Codes    Error Status Code Description  Number   Base 16     0133 HPBUS_ERROR_MODE_VALUE The mode to be programmed is out of  range     0134 HPBUS_ERROR_NOT_PAUSED The BALLISTIC IC must be in a   paused state to be programmed   0135 HPBUS_ERROR_INT_NOT_SET No interrupt source was set   0191 DUART_ERROR_CHANNEL_VALUE Unknown channel number        198 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  Appendix A  Status Codes    Table 20 Status codes for Host functions    Error Number Status Code Description    Base 16    BFFC 0800 SSVX8_ERROR_ERROR_MESSAGE_UNKNOWN 
70. Signal Processing VX8 Carrier Board Programming Guide    Part Number 500 00330  Revision 2 05    Hardware Overview    To determine the source and initiate clearing of the interrupt  an interrupt acknowledge   IACK  cycle must be performed  VX8 software functions are available to configure  and acknowledge the interrupts for this     Vectored interrupts can also be generated from any node to the VXIbus using the  internal SCV 64 register set     2 6 2  HP Local Bus Interrupts  IIOF1     Three interrupts from the HP Local Bus interface are mapped to IIOF1 of all  C4x  nodes     e End of Block  EOB   e Write FIFO Almost Empty  WAE  sent once per transition of the WAE flag  e Write FIFO Almost Full  WAF     These interrupts are    OR    ed together onto the ITOF1 line  Use level triggered interrupts  to identify the source of the HP Bus interrupt  The HINTENABLE  HINTSTAT  and  HINTCLR registers on the Global Shared Bus are used to enable  identify  and clear the  interrupts  Refer to the HP Local Bus Interface section of the VX8 Carrier Board  Technical Reference Manual for more information on these interrupts     2 6 3  Interrupt Routing Matrix  IIOF2     The HOF 2 lines from each node can be used as an interrupt or as a general purpose I O  to signal other    C4x nodes  This interrupt scheme is under software control  allowing  IIOF2 lines to be tied together in any combination through the Interrupt Routing Matrix   The Interrupt Routing Matrix is configured by a register loca
71. Software disk and can be found in the examples debug directory  Using a  text editor  edit this file to properly reflect the VX8   s memory mapping  refer to the  VX8 Carrier Board Technical Reference Manual for details   If you are setting bus  control registers in the Vx8 gel file  refer to the VX8 Carrier Board Technical Reference  Manual and the TIM module documentation for the correct values to calculate     Note  If you are loading your application via JTAG  you must set the Global  Memory Control Register  GMCR  and Local Memory Control Register   LMCR  in the Vx8 gel file in order for your program to load  and for the  processors to access their memory correctly  You will need a separate Vx8 gel  file for each type of TIM module  Refer to the documentation provided with  your TIM modules for the correct GMCR and LMCR values     Refer to the Code Composer C3x 4x User Guide for further details     Part Number 500 00330 13  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing    Hardware Overview    14    2 7 3  Debugging tips    When debugging  keep in mind that memory windows to lockable regions  Near Global  SRAMs  HP registers  SCV registers  etc   may not refresh correctly or be visible if  other entities  other DSPs  SCV64  or BALLISTIC chip  are using global resources as  well  Writing code in the Near Global SRAM can cause unforeseen errors  see section  3 1 2 for more information     For information on accessing shared resources while 
72. TTLTRG3  0x10   Set TTLTRG4  0x20   Set TTLTRGS5  0x40   Set TTLTRG6  0x80   Set TTLTRG7    VX8_ SUCCESS The TTL triggers were written     TTLTRG  lines are open collector TTL lines used for intermodule communication  Any  module may drive these lines and receive information on these lines  They are general  purpose lines that may be used for trigger  handshake  clock  or logic state transmission     Note  Multiple TTLTRG lines can be set or cleared simultaneously  This is  performed by ORing the appropriate byte values together to assert or de assert  the respective TTLTRG lines     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8_Lock    VX8 C4x Support Software Functions    Function    Include File    Syntax    Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    Locks the Global Shared Bus for access by the calling C4x processor   vx8 h    void VX8_Lock  PVUINT32 dest      dest Volatile pointer to destination address  This pointer can reside  in the calling C4x s internal  local  or Global SRAM     None    This function internally unlocks the previous lock location and locks the new  destination address     Generally  the provided libraries handle bus locking transparently to the user  For more  information  see sections 6 5 1  and 6 5 2       Lock addresses are confined to the Global Shared Bus  1 e  Locks to Near Global  Local   and internal are not allowed      This function mus
73. Unknown error return  value    BFFC 0801 SSVX8_ERROR_MEMORY_ALLOCATION Error in memory  allocation    BFFC 0802 SSVX8_ERROR_IO_UNMAP_FAILED Error in memory  deallocation    BFFC 0803 SSVX8_ERROR_SELF_TEST_FAILED VX8 device failed its self  test    BFFC 0804 SSVX8_ERROR_SELF_TEST_UNKNOWN_RESULT VX8 device reported an  invalid self test result     BFFC 080A SSVX8_ERROR_CLOSE_FAILED An error occurred during  the closing of an I O  handle     BFFC 080B SSVX8_ERROR_VX8_ALREADY_IN_RESET Before the VX8 system  reset operation  a VX8  was already in reset  mode  This can be  caused by the VX8  belonging to multiple  active SDF s or a failed  VX8     BFFC 080C SSVX8_ERROR_VX8_RESET_TIMEOUT VX8 device failed to  indicate passed and  ready in the allotted time     BFFC 080D SSVX8_ERROR_RESET_FAILED A VX8 failed reset     BFFC 080E SSVX8_ERROR_SYSTEM_RESET_TIMEOUT One of the VX8 devices  in the system failed to  reset     BFFC 0810 SSVX8_ERROR_NO_SSVX8_FOUND The board referenced by  the I O handle is not a  VX8     BFFC 0811 SSVX8_ERROR_BAD_RSRC_DESCRIPTOR A bad resource  descriptor     BFFC 0812 SSVX8_ERROR_NO_VX8_IN_SYSTEM_STRUCT A bad System Definition  File  SDF   The SDF  must contain at least one  VX8 device     BFFC 0813 SSVX8_ERROR_SDFOPENSDF_FAILED An error occurred during  the parsing of the System  Definition File  SDF    BFFC 0814 SSVX8_ERROR_LDFOPENLDF_FAILED An error occurred during  the parsing of the Load  Definition File  LDF    BFFC 0815 SSVX8_ERROR_SYSTEMCLOSE_FAILED A
74. VISA  the syntax will resemble     VXI0  240  INST     Refer to the I O library documentation for the proper resource  descriptor nomenclature     The SICL implementation by default maps 64k at a time  ssVX8_SystemRead maps and  unmaps the memory window for transfers which span 64k pages  The Instrument Driver  map window size is set at compile time by the SSVX8_ RW WIN NUM 64K PAGES  define in ssvx8brd c  If your SICL application performs transfers of more than 64k  the  instrument driver may be more efficient if the number of 64k pages mapped is  increased  This will require you to modify this define and recompile the instrument  driver        Accessing C4x global memories from the host is intrusive  especially if your DSP  application uses the Global Shared Bus extensively  Using the shared DRAM to buffer  data will isolate the host from colliding with C4x and HP BALLISTIC traffic on the  global shared bus     Depending on your host interface  it may be more efficient to use DMA from the host or  through the SCV64 DMA controller to perform data transfers     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  Example Software    11 Example Software    This chapter presents examples of specific routines that can be used to program the  VX8 Carrier Board  The examples demonstrate how to perform interrupt handling and  data transfers   DMA  on the VXIbus  HP Local Bus  and the RS 232 DUART     The example software can be fou
75. Volatile pointer to source address  length Block length of transfer   None    These transfers have no restrictions on the address space  You must  however  ensure  that any required setup for the data transfer has been performed prior to calling this  function  including a call to VX8_Lock to lock the shared bus to a specific target     This function is intended for high speed data transfers between memory blocks on the  VX8 Carrier Board  i e  transferring results from Near Global SRAM to shared  DRAM   VX8_FastTransfer can be used to transfer data to or from the VXIbus  Keep in  mind that if the Global Shared Bus is active  the transfer may take a long time  The  processor performing the VX8_FastTransfer will also starve other DSPs from accessing  the Global Shared bus     VX8_SCV64DMATransfer should be used instead of VX8_FastTransfer to perform  large transfers from VX8 memories  preferably from DRAM   to the VXIbus     You   ll want to use VX8 FastTransfer instead of SCV64 DMA if  for example  low  bandwidth data from a C4x   s Near Global SRAM is needed by the host in the presence  of high priority data from the HP Local Bus  The VX8_FastTransfer would yield the  Global Shared Bus to the HP Local Bus read DMA when in progress     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    VxX8_HPCheckinterrupt    Function  Include File  Syntax    Parameters    Returned Values    Remarks 
76. WAE    WAF    VX8 Carrier Board Programming Guide  Appendix B  Definitions and Acronyms    VME Interface IC from Tundra Semiconductor that is used on the VX8  Carrier Board to provide A32   D32  D16  DOS EO  transfers to the  board     System Definition File   a text based file which defines the hardware  configuration of your VX8 System     Agilent Tehnologies    Standard Instrument Control Library    A required VXIbus device which is responsible for driving several  VXIbus backplane signals  In the base hardware configuration  the Slot  0 device is the HPV743     Virtual Instrument Software Architecture    Versa Module Eurocard   a bus standard defined in IEEE 1014   VME is the standard which the VXIbus specification has expanded on     Spectrum Signal Processing   s TMS320C40 VXIbus board which  features 2 embedded C40   s  6 TIM 40 sites  and HP local bus     VME eXtensions for Instrumentation   a bus standard defined in  IEEE 1155    A VXIbus device which is responsible for controlling the VXIbus  mainframe  In the base hardware configuration  the controller is the HP  V743     VXI Plug and Play   Systems Alliance  This group has defined an  instrument driver specification that simplifies the integration of  VXIbus systems by standardizing the software interface to VXIbus  instruments  This group has also defined the VISA I O library  specification     A component of the VX8 instrument driver which contains the  required functions specified by the VXIpnp instrument drive
77. XIbus address to a long word address which  resides in the C4x DSP global memory map     The SCV64 DMA VXIbus  VMEbus  address is simply the desired VXIbus  address with no required translation  The SCV64 DMA Local address is based  on the VX8 A32 slave image  not the C4x global memory map     The VX8_SCV64DMA Transfer source address parameter is the VXIbus slave address  offset of shared DRAM with respect to the base address of the VX8  Shared DRAM    194 Part Number 500 00330  Revision 2 05    VX8 Carrier Board Programming Guide  Example Software    Spectrum Signal Processing    starts at an offset of 0x04000000  Refer to the VX8 Technical Reference manual for a  complete VX8 VXIbus A32 slave memory map     11 8  VX8 VXlbus Master Example    The vx8vxi c example demonstrates how to use the C4x to directly master the VXIbus   Mastering the VXIbus is accomplished by a simple call to VX8_Write or VX8_Read   Data is written from a data buffer in the DSP s RAM to the target VX8 s DRAM and  read back into a second buffer  The two buffers are then compared     This example requires an additional VX8 to serve as an A32 target  The software has    been set up for the second VX8 to be at a base address of 0x28000000 in A32 and  configured with at least 8 Mbytes of DRAM     System Configuration    VXIbus  Configuration    Controller    Operating System  I O Library  Mainframe    VX8 Logical  Address    VX8 Configuration    HP E1497A   v743    HP UX version 10 2   HP SICL version 3 0  
78. _A16_D16 PRIV  VXI_A16_D08_PRIV  VXI_A16_D16_NONPRIV  VXI_A16_D08_NONPRIV    Spectrum Signal Processing    Description   32 bit data transfer to on board SRAM or DRAM    32 bit supervisory data transfer to A32 space on the VXIbus   16 bit supervisory data transfer to A32 space on the VXIbus   8 bit supervisory data transfer to A32 space on the VXIbus   32 bit user data transfer to A32 space on the VXIbus    16 bit user data transfer to A32 space on the VXIbus    8 bit user data transfer to A32 space on the VXIbus    32 bit supervisory data transfer to A24 space on the VXIbus   16 bit supervisory data transfer to A24 space on the VXIbus   8 bit supervisory data transfer to A24 space on the VXIbus   32 bit user data transfer to A24 space on the VXIbus    16 bit user data transfer to A24 space on the VXIbus    8 bit user data transfer to A24 space on the VXIbus    16 bit supervisory data transfer to A16 space on the VXIbus   8 bit supervisory data transfer to A16 space on the VXIbus   16 bit user data transfer to A16 space on the VXIbus    8 bit user data transfer to A16 space on the VXIbus     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8_WriteBit    VX8 C4x Support Software Functions    Function    Include File  Syntax    Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    Sets or clears a single bit in a longword memory location on a VX8 board peripherals   SRAM  or DRAM     vx8 h 
79. a VXIbus based multiple DSP processing engine     2 1 1  TMS320C4x Nodes    The VX8 Carrier Board incorporates six TIM 40 sites and two on board 60 MHz  TMS320C40  C40  processors  The embedded C40s are nodes A and B  and the TIM   40 sites are nodes C to H  Each node has one buffered C4x communication port brought  to the front panel    Each embedded node  A and B  features     e One bank of 128k x 32 SRAM on both the local and global buses for 1 Mbyte per  C40  Upgradeable to 512 x 32 SRAMs at the factory      e One 32kx8 PEROM for booting or TIM 40 IDROM compatibility on the local bus     e Global bus signals routed to buffers to allow for HP Local Bus DMA controlled  data writes to global SRAM     e The capability to write to the HP Local Bus output FIFO or to access the shared  global DRAM through the global bus connector  and    e The capability to access the SCV64 IC to act as a VXIbus master   Node A has an additional 32k x 8 PEROM used for the board   s boot kernel     Node B has a DUART equipped with RS 232 drivers brought to the front panel Dual  RS 232 asynchronous serial ports     2 1 2  Bus Interfaces    The VX8 has a register based VXIbus interface incorporating an optional Hewlett   Packard  HP  local bus interface  The HP Local Bus interface uses a high speed  BALLISTIC interface chip and an intelligent DMA controller     VX8 Carrier Board Programming Guide Spectrum Signal Processing  Hardware Overview    The VX8 can function either as a Master or as a Slave 
80. a cmd defines the space  KERNEL at address 0x8000 0000 with length 0x800  8 Kbytes   This prevents the TI  Floating Point Tools from placing your application code within this space     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Lock Stack    Interrupts    COMM Ports    Memory    Part Number 500 00330  Revision 2 05    VX8 C4x Software System Description    Table 4 Node A Memory Restrictions    8000 0000h Used for firmware revision and self test results reporting to the  8000 0001h host  Can be modified at any time by the A16 Control Register ISR        8000 0002h Reserved for Node A Boot Kernel during loading and is free for use  8000 07FFh after loading     Note  Addresses 0x8000 0000 and 0x8000 0001 of Node A   s Near Global  SRAM are used by the A16 Control Interrupt Service Routine to return  Firmware Revision and Self Test Results back to the host when queried  If the  host needs to access this information at runtime  you should avoid using these  memory locations in your application     The lock stack is defined in the boot_  asm code as an uninitialized section  Istack of  size LOCK STACK SIZE  The  Istack section can be relocated to other regions of the  C4x memory map in the corresponding vx8  emd linker command file  No other  memory is required for support of the VX8 C4x Support Software Library  and no other  memory is reserved after booting of your application code     The external interrupt IIOF3 on 
81. a dummy read from a  VXIbus address     When performing VXIbus master cycles from a C4x  globally disable the C4x interrupts   by calling a RTS40 library function Int_Disable   When finished  re enable the  interrupts  Disabling the interrupts is necessary  if there is any chance of the SCV64  mode or  VCONTROL register being altered by any other processors on the board     The VXIbus interface can access the Shared DRAM Bus without stalling an HP Local  Bus DMA block transfer     Be aware that writing code to Near Global SRAM  NGSRAM  can cause unforeseen  errors  see section 3 1 2 for more details     49    VX8 Carrier Board Programming Guide  VX8 C4x Support Software    50    Spectrum Signal Processing    Table 13 Accesses to Shared Resources Affect Other Resources    Resource Accessed  being by what  accessed    Global Shared VXI bus  Bus transfers    a node   s  memory space    Global Shared VXI bus  Bus transfers     HP Local Bus  transfers    Global Shared Node A issuing   Bus a  SUSPEND  signal   Global Shared C4x node   Bus    What could  be affected    HP Local Bus  transfers    The C4x node     HP Local Bus  transfers    All C4x nodes    HP Local Bus  transfers    Other C4x  nodes    Things to consider    If the VXI interface attempts a slave access of  the shared bus during a HP Local Bus DMA  transfer on the HP Local Bus  the DMA transfer  will stall     Accessing a C4x   s global memory from the host  is intrusive  especially if your DSP application  uses the Gl
82. a eed aed deeds ead 4  2 3  Eront P ae lit A AA aN 5  2 3 1  Status LED Srni apn AE 6   2 3 2  Connectors  A Ee ee 6   2 4  C4x Communication Port Architecture      ooooccnnononcnnncnnnnnoneneneninineneninininineneneninenos 6  2 5  Bus  Architecture  ocu he ee ee A 7  2 6  C4x Interrupt Architecture  ooooooooccccncncnncocococcconcnonnnnnoncnncnnnnnnnnnnnn nn nncnnnnn nn nnnncnncnn 9  2 6 1  VXlbus Interrupts  MOFO     ooonnncccnnnnccccnnnoccconnnooccccnnnorcccnnnrnc cnn nn 10   2 6 2  HP Local Bus Interrupts  HOF 1     ooocoonoccccnonociccnonocinonananinnnanancnnnana no 11   2 6 3  Interrupt Routing Matrix   MOF2     oooonccccnnnnccconnnaccconnnonccannnarccnnnannnnns 11   2 6 4  IIOF3  Interrupts sgi r nde ee denied evade nied 11   2 7  STAG DODUQGING viii tdi pcia 12  2 7 1  JTAG Connection  2 2ci ciceseei aeise cavalo  ia 12   2 7 2  Software Setup  Code Composer Debugging      coooccccinocccccononccccnnns 13   2 7 3  Debugging tips oir da ra 14  Software OMA oia 15  3 1  SoftWare Environ MEN iio 15  3 1 1  Host Software ENvirONMeNt      ooococococncnononononononononononononononnnnnnnnnnnnnns 16   3 1 2  DSP Software EnNvirONMeNt      oooooccccccccnonononononononononononononononononononnnn 17   3 2  VX8 Support Software loredana a aaran Aa AE nan e aa AARE aaen ae OaD nn nn cn nnnnannnes 18  3 2 1  SICL VISA VX8 Instrument Driver                  ccccccccseeeseseseseseseseseeeees 18   3 2 2  VX8 C4x Support Software Library               cecececceeeeeeeeeeeteeeeeeeeeeeeees 
83. a new device session to a VX8 in the usual manner indicated by the  VO library you   re using  iopen for SICL  viOpen for VISA   In this case  your  application code will be responsible for closing the session when done  This is  particularly useful in VISA if your application needs to keep multiple regions of a VX8  mapped simultaneously  Opening additional sessions to maintain mapped regions on the  VX8 is more efficient than the constant mapping and unmapping that would occur with  a single session     155    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 SICL VISA Instrument Driver    156 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 Instrument Driver Functions    10 VX8 Instrument Driver Functions    This chapter presents the    C    language functions available in the VX8 Host Software  Library  The functions are listed in alphabetical order     Part Number 500 00330 157  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 Instrument Driver Functions    ssVX8_close    Function    Include File  Syntax    Parameters    Returned Values    Remarks    158    Closes a VX8 system by closing all session handles and freeing any resources used by  the system     vx8 h    ViStatus _ VI FUNC ssVX8 close  ViSession vi      vi Unique logical identifier to a session which contains the  handle to a VX8 system stored in its user defined attribute     VI_SUCCESS The system 
84. ad DMA transfer     All nodes are the target of the HP Local Bus read DMA  transfer     All TIM 40 nodes  C  D  E  F  G  H  are the target of the HP  Local Bus read DMA transfer     Only TIM 40 nodes C  D  G  H are the target of the HP Local  Bus read DMA transfer     Only TIM 40 nodes E  F  G  H are the target of the HP Local  Bus read DMA transfer     Only TIM 40 nodes C and D are the target of the HP Local  Bus read DMA transfer     Set HP Local Bus DMA to increment addresses     Set HP Local Bus DMA not to increment addresses  that is   writing to a Port      93    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    Vx8_HPSetFrameBit    Function  Include File  Syntax  macro     Parameters    Returned Values    Remarks    94    Set or clears the FRAME bit in the HWRITEEOB register    vx8 h   STATUS VX8_HPSetFrameBit UINTS8 state     State State of the FRAME bit in the HWRITEEOB register    0   do not append the current block with a frame bit  1   append the current block with a frame bit    VX8 STATUS The FRAME bit was written     A FRAME bit will be appended to the end of the current block being written to the  Write FIFO     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    Vx8_HPSetMode    Function    Include File  Syntax    Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    Sets the operating mo
85. al Processing  Introduction    1 3  Conventions Used in This Manual    This guide uses the following conventions     e Italic font designates placeholder names  such as command parameter names  cross   references  and references to other documents  For example     A second manual  the VX8 Carrier Board Technical Reference Manual   TRM   is the primary hardware reference     e Bold font emphasizes text within paragraphs  For example     If you edit the board cfg file  you will have to run composer exe with the  file     e This font designates contents of text files  source code  configuration files    filenames  directory names  text that appears on the screen  and commands that you  must enter in an interactive display  For example     Y our application should define these strings in the  common  section     e An    h    after a number indicates that this is hexadecimal notation  base 16   For  example     This write only register is located at address 8B00 0000h on the Shared  DRAM Bus     e    Ox    before a number indicates that this is hexadecimal notation  base 16   For  example     The default TIM 40 based DSP linker command file vx8_tim cmd also  defines the space COM_KERNEL at address 0x8000 0000 with length 0x100   1 Kbyte      2 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Hardware Overview    2 Hardware Overview    2 1  Features    Part Number 500 00330  Revision 2 05    Spectrum   s VX8 Carrier Board is 
86. an image of the  VX8 System  The System Module routines are then able to act on the VX8s as a system  based on the SDF description     The System Module functions are listed in the following table     Part Number 500 00330 135  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 SICL VISA Instrument Driver    Table 18 System Module Functions    ssVX8_Deref This function will return a valid open device session  to the device indicated by the resource name inputted   The application can use the device session to directly  call 1 O library functions     ssVX8_ SystemCheckConfig Determines if any VX8 devices in the system have  CONFIG  asserted  This indicates that at least one  processor in the system has not been loaded with DSP  application code     ssVX8 SystemClose Closes and frees up resources associated with an  opened VX8 system     ssVX8_SystemErrorMessage   Returns a text explanation for a given error code     ssVX8_ SystemRevisionQuery   Reads the firmware revisions of all the VX8 devices  present in the system structure and stores the results in  the system structure     ssVX8 SystemGetDriverRev   Returns a text string indicating the driver revision     ssVX8_SystemLoadCode Loads the DSP application code specified by the Load  Definition File onto the VX8 system  Loading DSP  software will reset the VX8 system     ssVX8 SystemOpen Opens and initializes a VX8 system defined by the  inputted System Definition File  This function will  op
87. ance     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 Instrument Driver Functions    ssVX8_revision_query    Function    Include File    Syntax    Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    This function reports the firmware revision of the VX8 in question and the driver  revision     vx8 h    ViStatus VI_FUNCssVX8_revision query  ViSession vi  ViString driver_rev   ViString instr_rev      vi Unique logical identifier to a session  driver_rev Instrument driver revision  instr_rev Instrument firmware revision    VI SUCCESS Successfully reported driver and instrument firmware revisions     This function is only applicable to VISA VXIpnp applications  Although non   functional  this function must exist for VXIpnp compliance     165    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 Instrument Driver Functions    ssVX8_self_test    Function  Include File    Syntax    Parameters    Returned Values    Remarks    166    This is a    stubbed    function that returns VI WARN NSUP_ SELF TEST when called   vx8 h    ViStatus VI FUNC ssVX8 self_test  ViSession vi  ViPInt16 test_result   ViString test_message      vi Unique logical identifier to a session  test result Result of self test  test_message String description of the self test results    VI_WARN_NSUP_SELF_TEST Self test not supported     This function is only applicable to VISA VXIpnp applications  Althoug
88. as Instruments    TMS320C4x tools     Currently  you may use Windows NT  Windows 2000 or Sun   HP UX based  environments to author and compile DSP software  TI Tools version 5 0 or later is  required under Windows NT and Windows 2000     JTAG based debugging can only be performed on platforms which have C4x JTAG  support  Windows NT  Windows 2000  SunOS Solaris   JTAG based debugging is  currently unavailable for HP UX based computers     In addition to the C4x tools available from TI  there are a number of tools available  from third party vendors which can help in your application development and  debugging     The VX8 C4x Support Software Library provides VX8 DSP applications with a simple  API for initialization  configuration  control  and I O routines tailored for the VX8  hardware  These routines reduce the amount of in depth information VX8 developers  require to generate their applications     Using the VX8 C4x Support Software Library is a simple chore  To gain access to the  calls in the library  simply include the required include files and link in the library as  you would with any other static library when you build your DSP software  Specific  information about the VX8C4xSS is detailed in later chapters     Note that writing code in the Near Global SRAM can cause unexpected errors and data  corruption due to cache misses  You will likely get errors if all of the following are true  on any node    e Code in NGSRAM   e Interrupts   e Non local access to NGSRAM   
89. atch the  block length specified in this example     Note  This example requires an HP Local Bus data source on a separate VX8  board to the immediate left of the board running this test  You can use a second  VX8 running the vx8hpgen c example  see next example  as the data source     System Configuration    Controller  Operating System  I O Library    Mainframe  VX8 Configuration    2    HP Local Bus  board    PC    Operating System    HP E1497A   v743    HP UX version 10 2   HP SICL version 3 0   VISA 1 1   HP 75000 Series C   Embedded near global memory 128k X 32 or 512k X 32  No TIM 40 modules   DRAM optional    Another HP Local Bus board set up to generate data  Block size  should match the length set in this example  A second VX8  running the vx8hpgen c example can be used to serve as an HP  Local Bus data source     At least 4Mbytes of memory  16Mbytes recommended   Texas Instruments XDS510 for C4x JTAG debugging   Windows NT or Windows 2000    187    VX8 Carrier Board Programming Guide Spectrum Signal Processing  Example Software    Running the Program    The vx8hpcon c example is to be run from JTAG  It is compiled with the appropriate C  initialization routines for Node A  The C4x code  vx8hpcon c  has been compiled and  linked to generate the COFF file VX8HPCON OUT  To rebuild vx8hpcon c  simply  call build bat  This batch file calls blde40a bat  which compiles vx8hpcon c and links  it with the C boot routine boot_a asm and the VX8 C4x Support Software library  Th
90. ating system  I O library  and compiler  Refer to your SICL or VISA  documentation that has been supplied with your VXIbus controller interface card for  information on compiling and linking with the I O libraries     The VX8 Instrument Driver is written in ANSI C and source code is provided allowing  you to expand its functionality or to further optimize the provided functions  The only  component of the VX8 Instrument Driver that is not supplied as source code is the  System Definition Module  described in Section 9 4 2        127    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 Host Software System Description    128 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing    VX8 Carrier Board Programming Guide  VX8 SICL VISA Instrument Driver    9 VX8 SICL VISA Instrument Driver    The instrument driver provides host applications with a software interface to basic  routines for configuring  controlling  and communicating with the VX8  The instrument  driver is written in ANSI C  and supports both VISA and SICL  The driver supports  multiple VX8s in a system  and allows multiple sessions on the host to open  communications to any single VX8     9 1  SICL Instrument Driver    Part Number 500 00330  Revision 2 05    The following diagram illustrates the SICL Instrument Driver software hierarchy     User Application    VX8 System Module   SICL Instrument Driver  SICL I O Library    Figure 9 SICL Instrument Driver Program Flow       In certain i
91. be used if you plan on loading the system at a  later time with a call to ssVX8_SystemLoadCode or are opening a system which has    already been loaded     If the SSVX8_SYSOPEN_RESETSYSTEM flag is indicated  ssVX8_SystemReset will  be called internally by this function  If SSVX8_ SYSOPEN LOADSYSTEM is also  indicated  the reset will occur before the DSP software loading     The calling function must allocate memory for the system handle     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Part Number 500 00330  Revision 2 05    VX8 Instrument Driver Functions    A device session to each VX8 system is opened and stored within the system structure  pointed to by VX8SystemHndlPtr  Use ssVX8_Deref to obtain the device session for a  particular VX8 in the system  This handle can then be used to call VO library functions  to access the device     Note that there is a mapping behavior difference between the SICL and VISA device  session handles  VISA session handles only allow a single mapping and any attempts to  map an already mapped session will block until the previous mapping is removed  SICL  session handles allow multiple mappings to different address spaces with a single  session handle     It is possible for another host session to open the same system with the same SDF  This  will allow multiple host applications to communicate to the VX8s in the system  Only  one application can reset or load the VX8 system and othe
92. ber 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  Appendix A  Status Codes    Appendix A  Status Codes    This appendix lists the possible VX8 status codes  Table 19 Status Codes for DSP  functions lists the status codes for the C4x Support Software functions  Table 20 Status  codes for Host functions lists the status codes for the Host Software functions     Table 19 Status Codes for DSP functions    Error Status Code Description  Number   Base 16     DUART_SUCCESS The interrupt s  were successfully  enabled or disabled     HPBUS_SUCCESS The HP Local Bus peripheral s  was  reset and or programmed  successfully  For  VX8_HPClearInterrupt  the interrupt  was successfully cleared    SCV64_SUCCESS The SCV64 operation completed  successfully        VX8_SUCCESS The operation completed successfully     VX8_ERROR_INVALID_PARAMETER Invalid parameter   VX8_ERROR_INVALID_ADDRESS Invalid source or destination address     VX8_ERROR_UNLOCK_MISMATCH A call to VX8_Unlock was made  without a successful matching call to  VX8_Lock     SCV64_ERROR_INIT_DELAY SCV64 delay line calibration failed   SCV64_ERROR_OFFSET_VALUE Bad A32 slave address     i  CB SCV64_ERROR_BUS_LEVEL_VALUE The bus request level was out of  range   cc SCV64_ERROR_BUS_TIMEOUT_VALUE The ownership timeout value was out  of range   z          SCV64_ERROR_BUS_INT_ACTIVE VXIbus interrupt is already active   SCV64_ERROR_BUS_INT_LEVEL_VALUE A bad local interrupt occurred     SCV64_ERRO
93. boardName     STRING driver_rev   STRING instr_rev      VX8_System VX8 system handle    boardName Name of the VX8 device   driver_rev Pointer to storage for the driver revision description   instr_rev Pointer to storage for the instrument firmware revision description  SUCCESS Successfully reported driver and    instrument firmware revisions   SSVX8_ERROR_READFIRMWAREREV_TIMEOUT The Node A DSP on a VX8 in the  system has failed to return its  firmware revision number or a  VX8 board in the system has       failed   SSVX8_ ERROR SYSTEM STRUCT_UNINITIALIZED The system structure was  uninitialized   SSVX8_ERROR_NO_SSVX8_FOUND The VX8 specified by boardName    was not found     The instrument driver revision is copied into driver_rev and the firmware revision of  the VX8 indicated by boardName is copied into instr_rev     The firmware revision will be valid only if the application on the Node A processor has  been built with the Boot_IIOF3Isr ISR installed to service the IIOF3 interrupt  a timeout  will occur otherwise  Both driver_rev and instr_rev should be pointers to allocated  strings of at least 8 characters     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 Instrument Driver Functions    ssVX8_SystemGetDriverRev    Function  Include File  Syntax    Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    Gets the instrument driver revision   vx8 h    void SS FUNC ssVX8_ SystemGetDrive
94. cal Bus GENERATE Mode example for an example of  a DSP generating data to the HP Local Bus through writes to the FIFO     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 C4x Support Software    6 4 2  HP Local Bus Interface Module Functions  amp   Macros       Caution  Before attempting to program the HP Local Bus Interface  you  should be familiar with the hardware implementation of the interface on the  VX8 Carrier Board  These details are fully documented in the VX8 Carrier  Board Technical Reference Manual        Table 9 HP Local Bus Initialization Status Functions    VX8_HPCheckInterrupt Determines the source of an interrupt from the HP  Local Bus     VX8_HPClearInterrupt Clears a specified HP Local Bus interrupt     VX8_HPDisablelnterrupt Disables an HP Local Bus interrupt source for  OF     VX8_HPEnablelnterrupt Enables an HP Local Bus interrupt source for IIOF 1   VX8_HPGetMode Gets the mode of the HP BALLISTIC IC     VX8_HPReset Resets and sets up the DMA controller  HP  BALLISTIC IC  and the HP Local Bus read and write  FIFOs     VX8_HPSetMode Sets the mode  continue  and strip bits on the HP  BALLISTIC IC        Part Number 500 00330 45  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software    46       Table 10 HP Local Bus CONSUME Functions    VX8_HPGetDMABuffer Gets the value of the DMA_BUFFER bit in the  HSTATUS register  Indicates which address buffer
95. chnical  Reference Manual for more information      6 5 2  Automatic Bus Locking    Generally  the provided libraries handle bus locking transparently to the user   Exceptions to this are VX8_FastTransfer  see section 6 2 2  Global Bus Functions and  chapter 7  and direct access from the user   s programs     6 5 3    Manual Bus Locking    For a DSP to access a resource on the Global Shared Bus or on the DRAM Shared Bus   the DSP must first be locked to that target by using the VX8_Lock function call  When  it has finished its access  the DSP must be unlocked from that target by using the   VX8_ Unlock function call     Nested locks unlocks are supported by a special Lock Stack  see section 6 2 4        6 5 4  How to Lock and Unlock the Global Shared Bus    A DSP must LOCK to a specific target  For example  Node A could lock to Node B   s  Near Global SRAM  however Node A can only communicate with Node B   s Near  Global SRAM  and cannot access another node   s Near Global SRAM or the DRAM   HP Local Bus  or VXIbus  A separate UNLOCK  from the first target   LOCK  to the  second target  sequence must be performed to switch targets     Because of this memory addressing constraint when locking the global bus  the lock  address is retained by the VX8_Lock and VX8_Unlock functions so that the memory  space can be unlocked successfully     A Global Shared Bus Lock Stack  see section 6 2 4    has been implemented to support  seamless  LOCK operation for such nested locks unlocks an
96. criptor nomenclature     159    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 Instrument Driver Functions    ssVX8_error_message    Function  Include File    Syntax    Parameters    Returned Values    Remarks    160    Gets a text description for a given error code     vx8 h   ViStatus VI FUNC ssVX8 error_message  ViSession vi  ViStatus error   ViString message     vi Unique logical identifier to a session   error Error number   message String description of error   VI_SUCCESS Successfully returned the    error string   SSVX8_ ERROR ERROR MESSAGE UNKNOWN Unknown error code       This function is only applicable to VISA VXIpnp applications and merely calls  ssVX8_SystemErrorMessage     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 Instrument Driver Functions    ssVX8_error_ query    Function    Include File    Syntax    Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    This is a    stubbed    function that returns VIL WARN_NSUP_ERROR QUERY when  called     vx8 h    ViStatus VI FUNC ssVX8 error_query  ViSession vi  ViPInt32 error   ViString error_message      vi Unique logical identifier to a session  error Pointer to error number storage  message String description of error    VI_WARN_NSUP_ERROR QUERY Error query not supported        This function is only applicable to VISA VXIpnp applications  Although non   functional  this function must exist for VXIpnp co
97. cro should be called by the HP Local Bus end of block interrupt  service routine  If this macro is called while a DMA is in progress  it will indicate the  current address buffer     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    VX8_HPGetDMAEnable    Function Gets the value of the DMA_ON bit in the HCONTROL register   Include File vx8 h  Syntax  macro  UINT8 VX8 HPGetDMAEnable  void    Parameters None    Returned Values The read HP Local Bus DMA enable state  e 0  Read DMA   s are disabled   e     Read DMA   s are enabled     Part Number 500 00330 69  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPGetDMAIncrement    Function Gets the value of the DMA_INCR bit in the HCONTROL register   Include File vx8 h  Syntax  macro  UINT8 VX8 HPGetDMAIncrement  void    Parameters None    Returned Values The HP Local Bus DMA increment  e 0  Read DMA transfers are to a single address     e     Read DMA transfers are to consecutive addresses     70 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    Vx8_HPGetFrameBit    Function  Include File  Syntax  macro   Parameters    Returned Values    Part Number 500 00330  Revision 2 05    Gets the state of the FRAME bit in the HWRITEEOB register   vx8 h   UINT8 VX8_HPGetFrameBit  void    
98. ctionality provided or to further optimize the provided functions     5 2  Fundamentals of C4x Code Development    Part Number 500 00330  Revision 2 05    Before rebuilding any examples or developing your own code  you must ensure the TI  C40 C44 libraries and  h files exist     5 2 1  C4x Library preparation    To rebuild the TI C40 C44 libraries and generate the  h files  use the following  procedure     1  Open a DOS command window    2  Change directory  cd  to your default egtools lib directory  normally  C  tic3x4x c3x4x cgtools lib    3  For the C40 processor  enter the following  mk30  v40 prts40 src  l prts40 1lib  4  To make the C40 register passing library enter  mk30  v40  mr  prts40 src  l prts40r lib  5  For the C44 processor enter  mk30  v44 prts40 src  l prts44 1lib  6  For the C44 register passing enter  mk30  v44  mr prts40 src  l prts44r lib    Use the following procedure for creating rts40 lib  rts40r lib  rts44 lib and rts44r lib     1  For the C40 processor  enter the following    mk30  v40 rts src  l rts40 1lib    29    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Software System Description    30    2  To make the C40 register passing library enter   mk30  v40  mr rts src  l rts40r lib  3  For the C44 processor enter   mk30  v44 rts src  l rts44 1lib  4  For the C44 register passing enter   mk30  v44  mr rts src  l rts44r lib    To generate the header and src files use the follow commands   x stands for extract      ar30  x p
99. cts with the CE marking     shown on the left     comply with the EMC  Directive  89 336 EEC   Compliance with this directive implies conformity to the  following European Norms     e EN55022  CISPR 22  Radio Frequency Interference  Class A  e EN50082 1 Electromagnetic Immunity    The product also fulfills EN60950  product safety  which is essentially the requirement  for the Low Voltage Directive  73 23 EEC      Board products with the CE marking have been tested in a representative system to show  compliance with the preceding requirements  A proper installation in a CE marked  system shall maintain the required EMC safety performance     Rev  Date Changes Section    2 05 Apr 5 2002 Support for Windows 2000 and Code Composer All  4 1  Minor corrections throughout     Part Number 500 00330  Revision 2 05    Table of Contents    EEIE 1o A e ene e Eee iii  Table of GOT osc ossacaaseea a eee eee sede Sessa essen v  IMEFOCUCTION  lt A aaa 1  1 1  Purpose of This Manual   ooooooococccnnncccononoccconnnonnononcnnnnnnnnnnnononnnnnnnnnnnnnnnnnncnnnnnannnns 1  1 2  Reference  DOCUMENTS  iis decee  diana 1  1 3  Conventions Used in This Manual                ccccccccccseecceeeeeeeeeeeeeeeseseeeeseeeeeeesesesesees 2  Hardware Over VIEW  3  2 1  Features cuidada alain 3  2 1 1  TEMS320C4K  Nodes uta A Rail ee 3   2 1 2  Bus  Interfaces  aia 3   2 1 3  Diagnostic Support oocooocccocococococoncncconnnononnnonnnnnnnnnnncnnnnnnnnnnnnnnnnnnnnannnnns 4   2 2  Board  Layout  sais nese acdavi d
100. d the TMS320 Floating Point DSP  Assembly Language Tools User   s Guide     e Four compilations of the vx8c4xss are supplied  vx8c40ss lib  vx8c44ss lib   vx8c40sr lib and vx8c44sr lib  vx8c40ss lib should be linked with DSP application  software which will be loaded onto    C40 based TIM 40 modules  including the  Node A and Node B embedded processors  vx8c44ss lib should be linked with DSP    31    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Software System Description    32    application software destined for    C44 based TIM 40 modules  For more  information  see section 5 2 3     e The VX8 C4x Support Software has been compiled using TI Floating Point Tools  version 5 11  The C4x Support Software library may require re compiling if you are  developing with a different version of the TI Floating Point Tools     e When building code with version 5 11 of the TI Floating Point Tools  use the COFF  version 0 flag   v0     e The batch files supplied with the VX8 C4x Support Software are written for  Windows NT Windows 2000 environments  To operate under UNIX  these batch  files require some modification     e You will be required to set up your Texas Instruments TMS320C4x tools  environment in order to build your code  Refer to the Getting Started Guide  supplied with the TI tools for instructions on installing the supplied TI C4x tools  and setting up the environment variables  path  A_ DIR  C_DIR  C_OPTION  and  TMP  used by the tools        5 2 
101. d to support the interrupt    Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Part Number 500 00330  Revision 2 05    VX8 C4x Support Software    service routines or multi tasking operating systems which may require access to the  Shared Buses     6 5 5  Debugging Code with Bus Locking    The debugger will not be able to access any of the shared resources  for example  for  displaying memory   unless the code running on the C4x is at a place that physically  locks to that resource  To view a shared resource  if this is not the case  do the  following     1  In your code  place a lock to the shared resource  immediately followed by an  unlock    2  Seta breakpoint on the unlock instruction    3  Run the code to the unlock instruction    4  View the shared resource    If the shared resource is visible from the VXI bus  for example  DRAM   use low level    peek and poke routines  usually supplied with the host  to non intrusively view the  shared resource     Alternatively  you could write small C4x programs to lock to various areas and load and  run them from your debugger as required  Since this is intrusive  you will need to reload  and run your application     6 5 6  Some Tips on Bus Locking  Avoid starving processors  do not deny them access to the Global Shared Bus     When locking to the VXIbus  perform the lock  VX8_Lock  to the mailbox registers on  the SCV64 as this operation will be much faster than performing 
102. de    VX8 C4x Support Software Functions    VX8_HPWriteFIFO    Function  Include File  Syntax    Parameters    Returns    Remarks    Part Number 500 00330  Revision 2 05    Performs back to back write cycles to the write FIFO port on the HP Local Bus   vx8 h    STATUS VX8_HPWriteFIFO  PVUINT32 src  UINT32 length      STC Volatile pointer to the source address  Can be internal RAM   local SRAM  or near global SRAM    length Length of block to transfer  Maximum value is 1024    VX8_ SUCCESS Transfer complete    VX8 ERROR INVALID ADDRRESS Invalid address  addresses cannot be on the  global bus  This includes DRAM  and the  VXIbus     VX8_ERROR_INVALID_BLOCK_SIZE The block size is greater than 1024     This routine is written in assembly language for high speed transfer to the HP Local  Bus  To achieve maximum performance  the source of the data transfer should be in  Internal or C40 Local Bus SRAM  If not  then a pipeline conflict plus the crossing of a  page boundary on the global bus will limit the throughput     103    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPWriteTTL    Function  Include File  Syntax  macro     Parameters    Returned Values    Remarks    104    Writes an 8 bit value to the TTL trigger lines  TTLTRGO through TTLTRG7 on P2    vx8 h  STATUS VX8 HPWriteTTL  UINTS8 byte      byte 8 bit value to write to the TTL trigger lines   0x01   Set TTLTRGO  0x02   Set TTLTRG1  0x04   Set TTLTRG2  0x08   Set 
103. de of the HP Local Bus BALLISTIC interface chip  the value for  the continue  CONT  bit  and the value for the STRIP bit     vx8 h    STATUS VX8 HPSetMode  UINT8 mode  UINT8 cont  UINTS strip      mode Sets the operating mode of the BALLISTIC IC   Valid inputs are 0   15  See the next page for a listing of modes  cont 0   set the state of the BALLISTIC IC to be PAUSED  after the  current reads or writes are completed  as indicated by  READDONE and WRITEDONE     1   the BALLISTIC IC will perform a transition out ofa  PAUSED state and will continuously operate in its current    mode    strip 0  the FRAME bit will not be stripped off any data being piped  through  1   the FRAME bit will be stripped off any data being piped  through   HPBUS_SUCCESS The operating mode of the BALLISTIC IC    was successfully programmed   HPBUS_ERROR_MODE VALUE _ The mode to be programmed is out of range     HPBUS_ERROR_NOT PAUSED The BALLISTIC IC must be in a paused state  to be programmed     The BALLISTIC chip must be in a paused state before the mode  CONT  and STRIP  bits can be written     MODE3  0  correspond to bits D7 D4 in the HCONTROL register  The HP  BALLISTIC modes are given in the table on the next page     If the CONT bit is set to 1  the HP BALLISTIC IC will immediately begin transmitting  or receiving data  depending on which mode it   s currently in  That is  a call to  VX8_HPRestart will not be required     Please refer to the VX8 Carrier Board Technical Reference Manual for deta
104. debugging  see section 6 5 5       Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Software Overview    3 Software Overview    3 1     Part Number 500 00330  Revision 2 05    The VX8 Support Software product provides hardware initialization  hardware control   host communications  DSP library functions  and examples  The VX8 Support Software  primarily consists of two libraries  the C4x DSP Library  VX8 C4x Support Software  Library  and the Host Library  the VX8 Instrument Driver      The C4x Support Software Library contains TMS320C4x functions which perform  common tasks  initialization and control  and data transfers required by all C4x  processors on the VX8 Carrier Board     The VX8 Instrument Driver provides a host API for performing configuration   control  and communications with a VX8 system  The primary functions of the VX8  Instrument Driver are to initialize and communicate with a VX8 system     The VX8 board does not ship with resident application software  The VX8 requires C40  and host software development  using the VX8 Support Software  in order to integrate a  VX8 DSP subsystem into a total VXIbus solution  The VX8   s overall functionality  depends on its hardware configuration and the host and C4x application software  through which the VX8 will be able to process data and communicate with other  devices     Note  The VX8 Carrier Board is not a typical VXIbus Instrument due to its  configurable nat
105. e    52    Spectrum Signal Processing    Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    7 VX8 C4x Support Software Functions    This chapter presents the    C    language functions available in the VX8 C4x Support  Software Library  The functions are listed in alphabetical order     Part Number 500 00330 53  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    BOOT_IIOF3Isr    Function Handles VXIbus requests via the A16 control offset register     Include File vx8 h    Syntax void BOOT_IIOF3Isr  void      Parameters None    Returned Value None    Remarks This function performs VX8 initialization on power up and is used in the servicing of  the IIOF3 interrupt on Node A  Note that BOOT_IOF3Isr   is a macro for c_int06   the syntax e_intXX prefix is required for ISR functions by the TMS320C4x compiler      This function performs the following A16 control register actions     Sets the VX8 base address whenever the A16 Offset register is written     Enables or disables the A32 slave interface to the VX8 depending on the state of the  A32 enable bit in the A16 Control Register     Writes the firmware revision number to the bottom of Node A   s near global  memory  0x80000000 from the DSP  Base   0x800000 from VXIbus A32      Writes the self test results to Node A   s near global memory  0x80000001 from the  DSP  Base   0x
106. e  TMS320C4x compiler environment may have to be set to point to the respective  directories in the VX8 C4x software     In Code Composer  load and run vx8hpcon  out  Refer to the  ReadCodeComposer txt file in  lt  nstallPath gt  etc for information about setting up  Code Composer  and running programs on the LeMans   lt  nstallPath gt  is the SDK  installation root  by default C  VXIPNP WINNT ssVX8     Put the variable sum in the watch window     After the execution  the value    sum    should be 240     Program Description    The example first installs the ISR for the HP interrupt line  110F1  and enables End of  Block  EOB  interrupt from the BALLISTIC  The ISR simply performs a sum of all the  data received     The HP BALLISTIC IC is reset and configured to be in consume mode  The HP Local  Bus Read DMA is then configured by setting the block size and DMA targets  The HP  Local Bus Read DMA is then enabled and the BALLISTIC is restarted  When a block is  received  determined by an EOB   it generates an interrupt and the ISR will sum the  data in the buffer just written  The HP Local Bus interrupt is then cleared at the end of  the ISR     11 4  C4x HP Local Bus Generate Mode Example    The vx8hpgen c example demonstrates how to set up the VX8 in order for it to write  data  generate  to the HP Local Bus  This example uses the VX8_HPWriteFIFO  function to move the data from Node A   s memory to the HP Local Bus     A second HP Local Bus device is required to be placed down
107. e Cache enabled    The default linker command files supplied with the VX8 software do not locate  anything in NGSRAM  so no problems should arise under normal circumstances     17    VX8 Carrier Board Programming Guide Spectrum Signal Processing    Software Overview    3 2     18    VX8 Support Software    The VX8 Support Software provides host and DSP initialization  communications  and  control functions for the VX8 Carrier Board  The VX8 Support Software consists of  several major components     e SICL VISA Instrument Driver  e VX8 C4x Support Software Library    e Example programs    3 2 1  SICL VISA VX8 Instrument Driver    The VX8 Instrument Driver provides a host API for your application to initialize   control  and communicate with a VX8 system  The device driver consists of ANSI C  host code which will function with either VISA or SICL VO libraries     Source code is provided for the VX8 Instrument Driver     3 2 2  VX8 C4x Support Software Library    The VX8 C4x Support Software Library provides your DSP application with routines to  configure and communicate with the various VX8 interfaces     The C4x library can be separated into the following components     e Global Bus Interface Module supporting accesses from a DSP to the global shared  or DRAM shared buses    e WXIbus Interface Module supporting direct mastering of the VXIbus from a DSP   SCV64 DMA initialization  and VXIbus interrupt support    e HP Local Bus Interface Module supporting setup  initialization 
108. e File  Syntax  macro   Parameters    Returned Values    86    Reads an 8 bit value from the TTL trigger lines  TTLTRGO through TTLTRG7  on P2   vx8 h   UINT8 VX8_HPReadTTL  void     None    State of the 8 bit TTL lines  TTLTRG 7  0  correspond to bits D7 DO in the TTLTRG  register     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VxX8_HPReset    VX8 C4x Support Software Functions    Function    Include File  Syntax    Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    Resets the HP Local Bus DMA controller  read write FIFOs  and BALLISTIC HP Local  Bus IC  This function also sets the flag levels of the read and write FIFOs     vx8 h    STATUS VX8_HPReset  UINT32 wae  UINT32 waf  UINT32 rae  UINT32 raf      wae Level to be programmed into the write FIFOs almost empty flag   waf Level to be programmed into the write FIFOs almost full flag   rae Level to be programmed into the read FIFOs almost empty flag   raf Level to be programmed into the read FIFOs almost full flag     Note  Flag level settings can range from 1 to 1020  Both almost empty and  almost full flag levels are measured from empty     HPBUS_SUCCESS The HP Local Bus peripherals were reset  and programmed successfully     HPBUS_ERROR_FIFO_FLAG_VALUE A FIFO flag level is out of range     HPBUS_ERROR_FIFO_INIT Error in programming the FIFO flag levels   The FIFOs are in an unknown state        FIFO levels are set following a r
109. e state of the ILOF2 lines from the other nodes by extending the  TOF2 0 assertion delay in this program        Caution  Nodes that are not running the sample code must not have their  IIOF2 lines set as GPIO outputs  Damage can be caused to the C4x DSPs if two  outputs are driving one another        System Configuration    Controller HP E1497A   v743    Operating System HP UX version 10 2    I O Library HP SICL version 3 0   VISA 1 1  Mainframe HP 75000 Series C   VX8 Logical 240   Address    VX8 Configuration Embedded near global memory 128k X 32 or 512k X 32  No TIM 40 modules  DRAM optional    PC At least 4Mbytes of memory  16Mbytes recommended   Texas Instruments XDS510 for C4x JTAG debugging   Operating System Windows NT or Windows 2000    Running the Program    The vx8iiof2 c example should be run from JTAG  It is compiled with the appropriate C  initialization routines for Node A  The C4x code  vx8iiof2 c  has been compiled and  linked to generate the COFF file VX8IIOF2 OUT  To rebuild vx8iiof2 c  simply call  build bat  This batch file calls blde40a bat  which compiles vx8iiof2 c and links it with  the C boot routine boot_a asm and the VX8 C4x Support Software library  The  TMS320C4x compiler environment may have to be set to point to the respective  directories in the VX8 C4x software     In Code Composer  load and run vx8iiof2 out  Refer to the    ReadCodeComposer txt file in  lt  nstallPath gt  etc for information about setting up    Part Number 500 00330  Revisio
110. ed for a VXIbus instrument must possess a minimum set of function calls  providing means to initialize  initiate  and terminate communications with the VXIbus  device     USER PROGRAM    INTERACTIVE DEVELOPER PROGRAMMATIC  INTERFACE DEVELOPER INTERFACE    APPLICATION FUNCTIONS  INITIALIZE CLOSE    Function Function    CONFIGURE    ACTION STATUS DATA UTILITY  Functions Functions Functions    Functions    COMPONENT FUNCTIONS  SICL OR VTL VISA  SUBROUTINE INTERFACE I O INTERFACE    Figure 11 VXIpnp Instrument Driver Internal Design Model       Of the eight supplied VXIpnp functions  only the ssVX8_init  ssVX8_open   ssVX8_revision query  ssVX8_error_message  and ssVX8_close are functional  To  meet VXIpnp compliance  use these functions to open  close and check error messages   see VXIpnp Module Usage   The remaining functions are stubbed and return a NOT  SUPPORTED warning when called     132 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VXIpnp Module  Usage    Part Number 500 00330  Revision 2 05       VX8 SICL VISA Instrument Driver    Table 17 VXlpnp Module Functions    Function   Function Name  Function Description __     ssVX8_close Closes the VX8 system referenced by the user   defined attribute of the inputted device session  The  inputted device session is then closed     ssVX8_error_message   Returns a text explanation for a given error code   ssVX8_error_query Returns VI_WARN_NSUP_ERROR_QUERY     ssVX8_init O
111. ed interrupt levels together     This function should only be called in Node B DSP application software     Part Number 500 00330  Revision 2 05    57    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_DUARTInByte    Function  Include File  Syntax  macro     Parameters    Returned Value    Remarks    58    Reads an 8 bit value from the Receiver Buffer Register  RBR  of a DUART channel   vx8 h  UINT8 VX8 DUARTInByte  UINTS8 channel    channel 1   read from channel 1  2   read from channel 2    byte 8 bit value from the Receiver Buffer Register    Ensure that your code does not read an empty Receiver Buffer Register     This function should only be called in Node B DSP application software     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    VX8_DUARTOutByte    Function  Include File  Syntax  macro     Parameters    Returned Value    Remarks    Part Number 500 00330  Revision 2 05    Writes an 8 bit value to the Transmit Holding Register  THR  of a DUART channel   vx8 h    void VX8_DUARTOutByte  UINT8 channel  UINTS byte      channel 1   write to channel 1  2   write to channel 2  byte value to write to the Transmit Holding Register    None    Ensure that your code does not write to the Transmit Holding Register when it   s full     This function should only be called in Node B DSP application software     59    VX8 Carrier Boa
112. eeeeeencaeeeeeeeeesecaaeaeeeeeeeseeencieeeeeeeeeeees 66  YX8 HPGetConiBit dances lod Dn 67  VX8_HPGetDMABuffer   cocoooooconiocccccocococonoconnnnonononnnnonnnnnnnnnnnnnnnonnn nn nnnnnnnnnninnnnss 68  VX8_HPGetDMAEnable rei ri a E r T ERR 69  VX8_HPGetDMAlncrement                  ccceceeeeeeeeeeeceeeeeeeeeecenaeceeeeeeeseneaaeeeeeeesetenes 70  VX8 HPGetFrameBit    ipii aaa aaa iaae aaa aa Da e ea aaa iaai aA 71  VX6  HPGetMode neron e es 72  VX8_HPGetPauseBit             0   cccceccececcee cece ceeeeeeeceeeeeeeseccaeceeeeeeesenenaeeeeeeeeeeeees 73  VRE  HPGetRAEB ico dadas 74  YX8 HPGetRAF Bilice ar tiradas die ico Da nadas 75  WX8_HPGetReadDone coococccccccccococonocccccnnccnnnnonnnconnnnnnnnnnnnnnncnnnnnnnnnnnnnnnnnnrnnannnnes 76  VXSAPGetREBIt ls aos 77  YX  HPGetREFBitisiusn aaa cala aida 78  VX8  HPGetStripBit v2 ee A A A ee  79  VX8  HPGetiWABBitisoi iaa ait  Santee del ead ei ent hier 80  VX8 HPGetWAF Bit  000 ee 81  VX8  HPGetWEBit dado 82  VX8 HPGe FBI 2  ie Pe aos 83  VX8_HPGetWriteDoneBit    ooooocccinnnonococnconccocononnncnncnnnnnnnononncnnnnnnnnnnennnnnnnnnnnnnnns 84  VX8  HPReadECL  00 Ed eels 85  YX8 HPReEadT Tai cado 86  VAS HPRESO tado cl a a lana o 87  VX8  HPRestarkiosiiidaa id A alan 88  VX8 HP SetCont Bite ries eatin AA les 89  VX8_HPSetDMAEnable               cccccccccesseceseeseeceseeseeeecesaeeeessaeeeesesaeeesseseeeeneaas 90  VX8_HPSetDMAIncrement               ccccccceceeeeeeeeeeeeee cece eeceecaeceeeeeeeseceneaeeeeeeeeetenes 91    Part Number 500 
113. entified by the COMMConnections attribute  There can only be one entry for each bi   directional COMM port connection     COMMConnections Syntax     COMMConnections       lt source identifier gt    lt COMM   gt    lt dest identifier gt    lt COMM  5      lt source identifier gt    lt COMM   gt    lt dest identifier gt    lt COMM   gt    The following is an example of a COMMConnections attribute of a TIM 40 module     COMMConnections        Src    Proco      TIM     TIM module connector                  Note that for a given section  the  lt source identifier gt  and   lt dest identifier gt  can be that section   s    Type     That is   for a TIM definition section  the keyword    TIM    can be used  as a source or destination identifier in the  COMMConnections attribute  Likewise  in a board definition  section  the keyword    Board    can be used  Such assignments  connect the COMM ports of the components to a logical  connector on the actual TIM or board  These associations  are then used to connect the logical TIM COMM ports to the  logical    Site    COMM ports in the Board Definition     Symbol Table    The Symbol Table section is identified by the reserved section name    common     Define  any string constants  such as the VX8 board names  VO library resource identifiers   in  this section  Entries in the symbol table can be referenced in other sections     The following is an example of a Symbol Table section identifying SICL base addresses   VO resource descriptors  
114. er    lt VXIPNPPATH gt  is  the root directory where you installed the VX8 Instrument Driver     Additional INCLUDE Directories  lt VXIPNPPATH  gt  WinNT include   lt VXIPNPPATH gt  WinNT ssVX8 include    Additional Preprocessor Definitions  _VISA  Additional Library Paths  lt VXIPNPPATH  gt  WinNT lib msc       To rebuild the VISA driver  use Windows Explorer to navigate to   lt VXIPNPPATH gt  WINNT ssVX8 src host alib  double click on the Microsoft  Visual C workspace vx8_alibx dsw  set alib as the active project and select  rebuild All     The HPUX VISA driver was built as a shared library using the C compiler  If you are  building VISA code under HPUX 10 2  the compiler environment should be set up as  follows     Additional INCLUDE Directories  opt hpux include   opt hpux ssvx8 include       Additional Library Paths  opt hpux lib   opt hpux bin    Part Number 500 00330 131  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 SICL VISA Instrument Driver    9 3  VXlpnp Module    To meet VXIpnp  VXI Plug and Play  compliance  the VXIpnp Module has been  included as part of the VX8 instrument driver for use with the VISA I O libraries  This  module contains the function calls required by the VXIpnp instrument driver  specifications     Note  The VXIpnp module is only applicable to systems using the VISA I O  library  that is  not with SICL      The VXIpnp instrument driver specification stipulates that all compliant instrument  drivers suppli
115. er only to the JTAG IN of board 1   For multiple boards  connect the JTAG OUT of board 1 to the JTAG IN of board 2  etc     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  Hardware Overview    Note  Power down your hardware before connecting the JTAG cable and  setting up the JTAG chain     2 7 2  Software Setup  Code Composer Debugging     The following describes the software setup required when using Texas Instruments     standard TMS320C4x debug monitor  If you are using a third party debug monitor  refer  to that product   s documentation for specific software setup instructions     To set up Code Composer for back plane debugging  use the Code Composer Setup  utility  Within this utility you must    e Install the Vx8 device driver  SSVX8_4xNT d11     e Dragan instance of the installed board from the available panel to the  configuration panel    e Set the board properties to use generated board data file  e Establish its I O port to the boards A16 address  typically 0x240     e Set its available processors to TMS320C4x and define the number to match the  number installed on the board    e Save the configuration    To set up Code Composer for JTAG debugging  again use Code Composer Setup but  install the XDS driver  tixds4x  dvr      A memory descriptor file  Vx8 gel  is also required to tell the debugger which areas of  memory it can and cannot access  A sample Vx8 gel file has been provided on the VX8  C4x Support 
116. er to destination address  Can be SRAM  DRAM   or the VXIbus  VXIbus source addresses are byte addressed    STC Volatile pointer to source address  Must be in the calling C4x s  SRAM or internal RAM space    len Block length of transfer  VXIbus transfers are byte addressed    all others are 32 bit word addressed    mode Transfer flags listed on the next page of this manual    VX8 SUCCESS Memory block written successfully    VX8_ ERROR INVALID ADDRESS Source or destination address is not    compatible with the transfer mode   VX8 ERROR INVALID PARAMETER Invalid transfer mode flag     Data widths less than 32 bit are assumed to be right justified in the source address  space  That is  D16 and DO8EO0 writes assume data to be in the source space     unpacked     So  for two contiguous D16 writes  the data should appear in the bottom 16  bits in two consecutive 32 bit memory locations visible from the DSP     This routine performs locking and unlocking of the global shared bus  The source  address must be local to the DSP  internal  local  or near global SRAM         C44 based TIM 40 module writes must remain within a 64 Mbyte page     123    VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    124    Transfer Flag   VX8_D32  VXI_A32 D32 PRIV  VXI_A32 D16 PRIV  VXI_A32 D08_PRIV  VXI_A32 D32 NONPRIV  VXI_A32 D16_NONPRIV  VXI_A32 D08_NONPRIV  VXI_A24 D32 PRIV  VXI_A24 D16 PRIV  VXI_A24 D08 PRIV  VXI_A24 D32 NONPRIV  VXI_A24 D16 NONPRIV  VXI_A24 D08 NONPRIV  VXI
117. ese space definitions prevent the TI  Floating Point Tools from placing the user   s application code in contention with the  Intermediate Boot Kernel     35    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Software System Description    36    Lock Stack The lock stack is defined in the boot_  asm code as an uninitialized section  Istack of    Interrupts    COMM Ports    size LOCK STACK SIZE  The  Istack section can be relocated to other regions of the  C4x memory map in the corresponding vx8  cmd linker command file  No other  memory is required for support of the VX8 C4x Support Software Library  and no other  memory is reserved after booting of your application code     No Interrupts are required for support of the VX8 C4x Support Software Library on  Node B or on TIM 40 based DSPs     Ensure that COMM Port transfers are not initiated until the loading process is complete   This will prevent DSPs that are attempting to boot via COMM port from being  corrupted  We recommend having the host use a flag to signal the DSP to continue code  execution once loading is complete     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software    6 VX8 C4x Support Software    The VX8 C4x Support Software Library is divided into 5 distinct modules  A16  Control  Global Bus  VXIbus  HP Local Bus  and DUART  These modules are  discussed in the sections that follow     Use of the function call
118. eset to the FIFO IC and cannot be changed until the  next FIFO HP BALLISTIC reset     For proper operation of DMA transfers from the HP Local Bus  the following rule must  be followed     e RAF must be between 1 and 1020  inclusive  AND  e RAF must be smaller than the block size by at least 4     For example  the following is fine  RAF size of 1020 and block size of 1024  The  following is not recommended  RAF size of 1020  block size of 1023     87    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPRestart    Function Restarts the BALLISTIC HP IC when in a paused state   Include File vx8 h  Syntax  macro  STATUS VX8_HPRestart  void    Parameters None    Returned Values VX8 SUCCESS The BALLISTIC HP IC was restarted     Remarks The HP BALLISTIC IC MODE bits are latched on the falling edge of restart  This  means that the HP BALLISTIC IC MODE must be set before restart is indicated     88 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    VX8_HPSetContBit    Function  Include File  Syntax  macro     Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    Sets or clears the CONT line to the HP Local Bus BALLISTIC interface chip   vx8 h   STATUS VX8 HPSetContBit UINTS8 state     state State of the CONT bit in the HCONTROL register    0   pause between modes  1   do not pause between mode switches    VX
119. f TIM 40 modules  COMM connections  and attributes  The  Components and COMMConnections attribute syntax are the same as for the TIM   40 Module definition  Boards have an additional attribute BaseAddress which  equates to an I O resource descriptor like    vxi 240    for SICL or    VXI0  240  INST    for  VISA  These strings should be defined in the  common  section     The DRAM configuration of your VX8 is not specified in the SDF  Bounds checking  for VO to VX8 DRAM is the responsibility of your application software  The following  is an example of a board definition section      Custom_Board2   Type   Board   Model   VX8   BaseAddress   VX8 BASE ADDR 2     Addr is defined above    Components        Part Number 500 00330  Revision 2 05     General  0  BOAR    D1 GENERAL      SiteA   SiteB   Sitec   SiteD   SiteE   SiteF   SiteG   SiteH                               COMMConnections     SiteA     VX8_EMBEDDED S11    TE        VX8 EMBEDDED SI       TE     Embedded C40  Embedded C40    GENE  GENE  GENE  GENE  GENE  GENE         UPBWNEO Il    UPBWNO    OU BWDN    vw N    BWNHH    SUN    RAI       L SII  L SII  L SII  L SII  L SII       RAI  RAI  RAI  RAI  RAI    TE    TE    TE    TE    TE    TE        L STI    orr rub    or rwu    N OrRNO    ON    Empty  Empty  Empty  Empty  Empty  Empty    Site  Site  Site  Site  Site  Site       143    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 SICL VISA Instrument Driver       Similar to the TIM 40 definition  the  l
120. fined in VXIbus systems is a daisy chained bus that connects adjacent  modules through the VXIbus mainframe  Pins on row C of connector P2 send data to  pins on row A of the next module   s P2 connector along the VXIbus mainframe as  shown in the following diagram     Slot N 1 Slot N 2 Slot N 3    HP Local HP Local HP Local  Bus Bus Bus    P2 Rows P2 Rows P2 Rows  A C A C A C       Figure 8 HP Local Bus Operation  The VXIbus HP local bus is a one way bus that passes data from slot N to slot N 1     The HP Local Bus interface on the VX8 Carrier Board combines the high speed data  interface between VXIbus I O modules with a flexible DMA Controller to provide a  powerful I O solution  Agilent Technologies has a number of multi channel analog I O  cards that communicate using the HP Local Bus     Note  HP Local Bus reads  consuming data from the HP Local Bus  are only  performed by the DMA Controller  The C4x DSPs cannot directly read data  from the HP Local Bus Interface     HP Local Bus writes  generating data to the HP Local Bus  are only performed  by a C4x DSP  embedded or TIM 40 module based  writing directly to the  output FIFO     HP Local Bus transfers are done by either a collection of HP DMA Controller  Initialization functions for reads  or a call to VX8_HPWriteFIFO for writes  Locks to  the HP Local Bus DMA controller and WRITE FIFO are done via the HSTATUS  register  Refer to the HP Local Bus CONSUME Mode example for DMA controller  operation  and refer to the HP Lo
121. h non   functional  this function must exist for VXIpnp compliance     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 Instrument Driver Functions    ssVX8_SystemCheckConfig    Function  Include File  Syntax    Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    Checks the CONFIG  status of all the boards in the VX8 system   vx8 h  RESULT _SS_FUNC ssVX8_SystemCheckConfig  SYSHANDLE VX8_ System      VX8_ System VX8 system handle    SUCCESS All A16 status register CONFIG  bits in the  VX8 configured in the system are de asserted    SSVX8 ERROR VX8_ STILL IN CONFIG At least one DSP in the system is still  asserting CONFIG         The purpose of the TIM 40 CONFIG  line is to indicate that all DSPs are loaded and  running  For the CONFIG  functionality to work  all DSPs in the VX8 system must be  loaded with software that will de assert their CONFIG  signals  Refer to the  boot_  asm C boot routines for Nodes A  B  and TIM 40 sites in Chapter 5 of this  manual     167    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 Instrument Driver Functions    ssVX8_SystemClose    Function  Include File  Syntax    Parameters    Returned Values    Remarks    168    Closes a VX8 system   vx8 h    RESULT _SS_FUNC ssVX8_SystemClose  SYSHANDLE VX8_ System      VX8_System VX8 system handle       VI_SUCCESS Successfully closed the VX8 system   SSVX8_ERROR_SYSTEMCLOSE FAILED An error occu
122. he  4x   X IIOF1  HP Local Bus            Node C NodeD   HP Local Bus    CONFIG HOF   LIOFS CONFIG   See Note   See Note   NOFO IIOFO  VXlbus             _ Embedded Embedded VXlbus  HP Local Bus 09 c40   IIOF2 lIOF2     C4x   OF 1  Node A Node B HP Local Bus  IIOF3  VXIbus A16 953   LIOFS Serial Port  Control EE DUART  Register  Note     IIOF3 lines from Nodes C through H are tied together and can be used for  user defined global  CONFIG support as defined in the TIM 40 specification              Figure 5 VX8 Interrupt Architecture    2 6 1  VXIbus Interrupts  IIOF0     Interrupts from the SCV64 VXIbus interface chip map to HOFO of all the C4x nodes   These indicate that either a VXIbus interrupt has occurred or that one of the on board  SCV64 interrupt sources has occurred  SCV64 DMA done  for example   Because the  interrupt can have several sources  it must be level triggered so that the source of the  interrupt can be identified  VXIbus interrupts can be enabled or disabled based on their  interrupt level through registers in the SCV64 VXIbus interface chip  This allows  software selectable receipt of interrupts of different priorities  Interrupts must be  enabled before they can be generated  The interrupt vector received is latched for  reading by the    C4x servicing the interrupt through the IACK space in the shared  memory map  The    C4x   s interrupt service routine must produce the IACK cycle  through the SCV64     Part Number 500 00330  Revision 2 05    Spectrum 
123. he desired SCV64 interrupts that  the VX8 is to handle  Interrupt enabling and disabling are taken care of by  VX8_SCV64Enablelnterrupt and VX8_SCV64DisableInterrupt     For VXIbus interrupts  in addition to enabling the interrupts through the  VX8_SCV64EnableInterrupt function  your VXIbus system must be configured so  that only one device is set up to handle any one VXIbus interrupt line  Ensure that no  two VXIbus devices are handling the same VXIbus interrupt level  Refer to the  documentation supplied with the other VXIbus devices in your system     The local timer interrupt is generated by a  KBERR condition on the SCV64  The  expiring of the SCV64 local bus timer means that a local transaction failed to complete  in the allotted time     The Location Monitor interrupt   LMINT  is asserted when the SCV64 Location  Monitor FIFO  LMFIFO  contains data  The LMFIFO is a 31 long word deep message  queue accessible from the VXIbus or from the DSPs by writing to the top longword of  the VX8s A32 slave image  If written by a DSP  the LMFIFO write cycle is internally  handled by the SCV64 and does not actually go out onto the VXIbus  Writing to a full  LFIFO will cause a bus error  If the interrupt was a Location Monitor Interrupt  the  LMFIFO will be read and returned via the  m_val parameter     For additional information regarding local interrupt sources see Section 2 3 2 of the  SCV64 User Manual   VMEbus Interface Components Manual     Part Number 500 00330  Revision 2 05  
124. icrosoft Visual C compiler version 6 0 with a National  Instruments VXI MXI2 extender  It supports the following hardware and software  configurations     Hardware Software    e  VXIbus mainframe chassis with a e Microsoft Visual C compiler version 6 0    minimum of 2 slots  for slot O controller  TI TMS320C4x development tools  and a single VX8 card   version 5 0 or later     e MAS Caer Board e VISA  version 2 0 or later   e Windows NT Windows 2000 PC with   a  an external JTAG interface for DUONE NT Or do 2000  TMS320C4x DSP software e Code Composer 4 1  development  This can be the same  PC as the host if running Windows NT  or Windows 2000  TI Tools version 5 0  or later and Code Composer 4 1 or  later are required for    C4x development  on Windows NT or Windows 2000     23    VX8 Carrier Board Programming Guide Spectrum Signal Processing  Software Overview    24 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Reset Conditions and Initialization    4 Reset Conditions and Initialization    4 1  Reset    Part Number 500 00330  Revision 2 05    The VX8 board can be reset from a number of sources  all of which will generate either  a hard or soft reset condition     4 1 1  Hard Reset    A hard reset signifies the resetting of the entire system  This includes the Slot 0  controller  other VXIbus devices  and all VX8 boards  This condition resets all devices  on the VX8 board  and the VXIbus Resource Manager configures 
125. il oo    cccccccecsneceeecsneeeeeeeneeeeeseeeeeseeeeessseeeessnieeeeneaas 118  VX8  SetUSerLED 3  cess era ee 119  VX8_SCV64SetVXIBUSREGREL                ccceceeeeeeeeceeeeeeeseceecaeeeeeeesetesnaeeeeeeeeeeees 120   WS Unlock  acs het seats stated et ites turds di bees 122  A T EEE T T 123   VAS  WMO Bit eranen oh atin e a r e a do 125   VAB WERE O 126   8 VX8 Host Software System Description        ssssssssssssssssnnnnnnnnnnnnnnnnnnn 127  8 1  Introduction 00d id id iaa 127  8 2  Host Software Development ooooocccccccocococococcnccnnnnononcnnnnnnnnnnnn conc nnnnnn anar nnnnnnnnnn 127  9 VX8 SICL VISA Instrument DriVerF  oooooonnnccccccoconnnnnnnnnnnncnnnennnnanananannnn 129  9 1  SICL  Instrument DRIVER ae ici id adiccion aE e ea Eaa 129  9 2  VISA Instrument Drem e a e cece ee eeeeeeee ce aE a aae 130  9 3  VXIpnp Module aoinean esearo e etaan eaa iaaa esaa 132  9 4  System MOJU aeo vient ld 135  9 4 1  Opening a VX8 System ea aeniea EANA REAA ERARE ENARRARE RRNA 137   9 4 2  System Definition File  SDF  Description      oonnooccnnnnnncnnnnnccccnnnaccccos 138   9 4 3  System Definition File  SDF  Examples s es 145   9 4 4  Load Definition File  LDF he racerene a 154   9 4 5  Calling I O Library Routines Directly 000 0    eeeeeeeeseeeeeeeneeeeeeeneees 155   viii Part Number 500 00330    Revision 2 05    10 VX8 Instrument Driver FUNCTIONS               0ccecceeeeceeceeceeceececeeceeeeeeeees 157    SSVXGClOSC air cated td id ai 158   SSVXG  Detecta illa 159  EA A 160   SS VX8
126. ils on the  operation of the HP Local Bus     95    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    Table 16 BALLISTIC Modes    mode  oomme  HP MODE PIPE EOS  pipe       96 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    VX8_HPSetReadDone    Function  Include File  Syntax  macro     Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    Sets or clears the READDONE line to the BALLISTIC HP Local Bus interface chip   vx8 h  STATUS VX8_HPSetReadDone  UINTS state      state State of READDONE  bit DO  in the HREADEOB register     VX8 SUCCESS The READDONE bit was written     The next end of block  HP_INT_EOB  received will trigger the end of transfer     97    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    vx8_HPSetStripBit    Function  Include File  Syntax  macro     Parameters    Returned Values    Remarks    98    Sets or clears the STRIP input to the BALLISTIC HP Local Bus interface chip   vx8 h   STATUS VX8_HPSetStripBit UINTS state     state State of STRIP  bit D3  in the HCONTROL register    0   pipe the FRAME bit through  1   strip off the FRAME bit    VX8 SUCCESS The STRIP bit was written     The STRIP bit will force the FRAME bit to be stripped off any data being piped  through  STRIP is latched by the BALLISTIC IC on the falling edge of REST
127. ime     Telephone 1 800 663 8986 or  604  421 5422    Fax  604  421 1764  Email support spectrumsignal com  Internet http   www spectrumsignal com    To help us assist you better and faster  please have the following information ready    e A concise description of the problem   e The names of all Spectrum hardware components   e The names and version numbers of all Spectrum software components   e The minimum amount of code that demonstrates the problem   e The versions of all software packages  including compilers and operating systems    At Spectrum  we know that accurate and easy to use manuals are important to help you  develop your applications and products  If you wish to comment on this manual  please  e mail us at documentation spectrumsignal com or fax us at  604  421 1764  Please  include the following information     e The full name  document number  and version of the manual  e A description of any inaccuracies you may have found  e Comments about what you liked or did not like about the manual    It may be helpful for us to call you to discuss your comments  If this would be acceptable  please include your name  organization  and telephone number with your comments     Note  Spectrum board products are static sensitive and can be damaged by electrostatic    discharges 1f not properly handled  Use proper electrostatic precautions whenever  handling Spectrum board products        Part Number 500 00330  Revision 2 05    CE    Document  Change  History    Board produ
128. inition File   defines the software configuration of your VX8  system     Light Emitting Diode  There are three LEDs on the VX8  red    sysfail  green   VXIbus access  and yellow is user definable     Location Monitor    To access the Global Shared Bus  a C4x DSP must lock to the bus  See  the VX8_ Lock and VX8_Unlock functions     The SRAM located on the Global Bus of any C4x DSP in the system   Near Global SRAM is zero wait state from the DSP that owns it  but  can be accessed by other DSPs  the HP Local Bus DMA Controller   and the VXIbus Slave Interface via the Global Shared Bus     Programmatic Developer Interface   the VXIpnp name for the  instrument driver interface to an application program     Programmable and Erasable Read Only Memory   an ATMEL  acronym for FLASH devices     Read FIFO Almost Empty   a condition which occurs when the Read  FIFO level reaches the programmed almost empty level  This causes an  IOF  interrupt on the DSPs if enabled     Read FIFO Almost Full   a condition which occurs when the Read  FIFO level reaches the programmed almost full level  This causes an  IOF  interrupt on the DSPs if enabled     VXIbus Resource Manager which is responsible for configuring  VXIbus devices through their A16 configuration registers     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing    Part Number 500 00330  Revision 2 05    SCV64    SDF    SICL    Slot 0 Device    VISA    VME    VX8    VXI    VXI Controller    VXIipnp    VXIipnp  Module    
129. l Bus Extended Functionality     ooooooncnnnininnnncocccnnnccnccncnannncnnnons 47  Table 13 Accesses to Shared Resources Affect Other Resources   occcinonccccon    50  Table 14 DUART Functions   ooooocccnnnccccnnnocccnnononocano nono cnn nano narrar rn rra rn 51  Table 15  DUART Macros  titanic dis 51  Table 16 BALLISTIC Modes coooccccoonoccccnnnoncccnononcncnononcnc nano nc nrrnnnncnr narrar narran 96  Table 17 VXlpnp Module Functions    oooooconoccccccnncccononccccncnnonnnnononncnnnnnnnnnnnncnnnnnn 133  Table 18 System Module Functions      ocoonoccccnnnoccccnoncccccnnancnncnnoncnr cano nc nr nano narran 136  Table 19 Status Codes for DSP FUNCHIONS     oooonccccnnoniccnonociccnanancninnancnn nano ncnnnnno 197  Table 20 Status codes for Host functions     ooooonccccnnoniccnnocccccononnncnnnancncnnannnnnnno 199    Part Number 500 00330    Revision 2 05    xi    xii Part Number 500 00330  Revision 2 05    Spectrum Signal Processing    VX8 Carrier Board Programming Guide  Introduction    1 Introduction    1 1  Purpose of This Manual    This manual provides the information you need to develop VXIbus system applications  using Spectrum s VX8 VXIbus TIM 40 Carrier Board  The manual describes the host  and DSP libraries used to program and interface to the VX8s in your system  This  manual also includes helpful programming methods  tips  and software examples     A second manual  the VX8 Carrier Board Technical Reference Manual  TRM   is the  primary hardware reference  You must be
130. l Processing  VX8 C4x Support Software Functions    VX8_ReadReg    Function    Include File  Syntax    Parameters    Returned Values    Remarks    110    Reads a single memory location from the VX8 board peripherals  from other DSP   s  Near Global SRAM  or from DRAM     vx8 h  UINT32 VX8_ReadReg  PVUINT32 src    STC Volatile pointer to source address  The pointer can be stored    in the calling C4x s local  global  internal  and VXIbus  address space     result Contents of the source address     This routine performs locking and unlocking of the global shared bus  Unnecessary  operations will be performed if the register in question is local to the DSP  internal   local  or near global memories      Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    VX8_SCV64Ackinterrupt    Function    Include File    Syntax    Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    Generates the correct acknowledge cycle for the SCV64  determines the interrupt  source  and returns an interrupt vector  if valid  This function will return the value read  from the LMFIFO if the location monitor caused the interrupt     vx8 h    STATUS VX8 SCV64AckInterrupt  PVUINT32 int_value   PVUINT32 vector   PUINT32  m_val       int_value Volatile pointer to the interrupt source number   0   invalid interrupt number  1 7   VXIbus interrupt  8   local timer interrupt  9   local location m
131. lobal Shared BUS                  0 00eseeeee 48    Part Number 500 00330  Revision 2 05    6 5 5  Debugging Code with Bus LOCKINQ       ooooconoccccnonociccnonocnccnanancccnananos 49    6 5 6  Some Tips on Bus LOCKiNQ    ooooccccnoncccnonocccccononcccnnnoncccnnnoncnc nana ncccnnnns 49  6 6  DUART Module caca tei e o dd eds ca dde e ao 51  6 6 1  Descriptions Guti tii tl tado 51  6 6 2  DUART  FUNCIONS vrai ir id 51  7 VX8 C4x Support Software Functi0NS       coooommnncnccccecccccnnnnnnaananannnenos 53  BAOT HOFI SE era ara a ill ela robes 54  VX8_DUARTChecklInterrupt              0 ccccceeeeeeeeeee cece ee eeeeceeeaeceeeeeeeeeceneaeeeeeeeeeteees 55  VX8_DUARTDisablelnterrupt                 ccccceeeeeecee cece cece eeceneaeceeeeeeeseceneaeeeeeeeeeteees 56  VX8_DUARTEnablelnterrupt                 ccccceceeeeeeeececeeeeeeceneaeceeeeeeeeeceneaeeeeeeeseteees 57  YAS DUAR TMB VE eem dan til india te adasts ads otye 58  VX8_DUARTOUtByt8 a G E AGE A a aa 59  VX8_DUARTSetBaudRate    oocococococccococcconoconononooonnnnnnnnnonononnnonnnonnnnnnncnnnnnncannnos 60  VAS FastlianSietcrsis A e gaint EEE 62  VX8_HPChecklnterrupt 2 2 0 2        cececcecce cece ee eeeeeeeeceeeeeeesecaaaeceeeeeeeseneneaeeeeeeeeeteeee 63  VX8_HPClearlnterrupt   0 0 0 2      ccceeccccccc cece ee eeeeeeaeeeeeeeeeceseanaeceeeeesesesaeaeeeeeeeeneeees 64  VX8_HPDisablelinterrupt               ececcecccceceeeeeeeeeeeceeeeeeesecenaeceeeeeeeseceneaeeeeeeeeeteees 65  VX8_HPEnablelnterrupt                ccceccccececeee
132. lobal Shared Bus     Global The Global Shared Bus interconnects the   a e Buffered Global Buses of each TIM 40 site via the Global Connectors     e Buffered Global Buses of the embedded C40 nodes A and B   e DRAM Shared Bus  and    e HP Local Bus Interface and registers     32 bit buffers isolate the Global Shared Bus from all these areas except for  the HP Local Bus Interface  which connects to the bus through a 2 x 1k x    32 bit FIFO   DRAM The DRAM Shared Bus enables the V XIbus slave interface to access the  Shared DRAM  Test Bus Controller  and the Global Shared Bus  It also allows a  Bus C4x DSP to access the DRAM  control   status registers  and the SCV64 as    a VXIbus master  Two 72 pin SIMM sites allow expansion of the global  shared DRAM using standard PC DRAM memory modules  see Note  below      Note  We recommend that you purchase DRAM memory from Spectrum   since this memory is tested and guaranteed to be compatible with the VX8  board     8 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing             l    VX8 Carrier Board Programming Guide  Hardware Overview          Local Bus Local Bus             TIM 40  C4x  Global Node H  Shared  Bus    Buffer Buffer      gt  Near Global Bus                               Local Bus       TIM 40  C4x  Node F          Buffer ABufter      gt  Near Global Bus                        Local Bus         TIM 40  C4x  Node D          Buffer ABufter      gt  Near Global Bus                         Local Bus Test Bus
133. lobal Shared Bus Lock Stack is set in boot_a asm   boot_b asm  and boot_tim asm by the    LOCK STACK SIZE  set    line near  the top of each of these files  Modify this line and reassemble your code to  change the size of the lock stack  You will also have to adjust your linker  command file to allocate more memory for the lock stack     The lock stack pointer is used to push and pop lock addresses onto the lock stack  This  variable is a global variable  and is initialized to zero  unlocked  by e_int00 at boot time  and before main   in your code     When a call to a lock stack function is made  interrupts on the C4x are disabled  the  unlock operation is performed  the lock stack pointer is updated  a lock operation is  performed  and the global interrupts are enabled     For example  if the global bus is currently locked to Node C  0xA000 000   and the C4x  is locking to DRAM  0x9400 0000   the Node C address will be unlocked  current  LSP   the LSP moved up in memory  and the bus locked to DRAM  new LSP      Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 C4x Support Software    0x8800 0000    current LSP  gt  0xA000 000  new LSP gt  0x9400 0000    When unlocking from DRAM  the DRAM address is unlocked  current LSP   the LSP  moved down in memory  and the bus locked to Node C  new LSP   The old DRAM lock  address still exists on the lock stack  but is considered invalid     Bottom of lock stack  new LSP   AAA    
134. m the HP  Local Bus     e The SCV64 has an internal DMA Controller that can be used to  master the VXIbus and transfer between the VX8 Carrier Board  and some other VXIbus slave  the host or another VX8 Board  for  example      e The TMS320C4x DSP has internal DMA Controllers that can be  used to transfer data between the DSP and COMM Ports or  memory buses     One of two Shared Buses on the VX8  The VXIbus slave interface can  access the DRAM  Test Bus Controller  and the Global Shared Bus via  the DRAM Shared Bus  A C4x DSP can access the DRAM  control    status registers  and the SCV64 as a VXIbus master via the DRAM  Shared Bus     Digital Signal Processor    201    VX8 Carrier Board Programming Guide  Appendix B  Definitions and Acronyms    202    DUART    endian    FIFO    Global  Shared Bus    ISR    LDF    LED    LM    Lock    Near Global    SRAM    PDI    PEROM    RAF    RM    Spectrum Signal Processing    Dual Universal Asynchronous Receiver Transmitter   National  Semiconductor   s NS16C552 or compatible  device     The ordering of bytes in a multi byte number  This affects D16 and  DEOS data transfers to the VX8     First In First Out buffer  There are several FIFOs on the VX8  including the HP BALLISTIC Read FIFO  SCV64 Transmit and  Receive FIFOs  SCV64 Location Monitor FIFO  and the C4x built in  COMM port FIFOs     The Global Shared Bus interconnects all 8 DSP Nodes  the HP Local  Bus Interface  and the DRAM Shared Bus     Interrupt Service Routine    Load Def
135. macro  UINT8 VX8 HPGetWAEBit  void    Parameters None    Returned Values State of the HP Local Bus Write FIFO almost empty  HP_INT_WAE  flag   HP_INT_WAE is indicated by bit D10 in the HSTATUS register     e 0 Write FIFO is below the almost empty flag level   e 1 Write FIFO is above the almost empty flag level     80 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    VX8_HPGetWAFBit    Function Gets the state of the Write FIFO Almost Full bit in the HSTATUS register   Include File vx8 h  Syntax  macro  UINT8 VX8_HPGetWAFBit  void    Parameters None    Returned Values State of the HP Local Bus Write FIFO almost full  HP_INT_WAF  flag  HP_INT_WAF  is indicated by bit D9 in the HSTATUS register     e 0  Write FIFO is above the almost full flag level   e 1   Write FIFO is below the almost full flag level     Part Number 500 00330 81  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPGetWEBit    Function Gets the state of the Write FIFO Empty bit in the HSTATUS register   Include File vx8 h  Syntax  macro  UINT8 VX8 HPGetWEBit  void    Parameters None    Returned Values State of the HP Local Bus Write FIFO empty  WE  flag  WE is indicated by bit D11 in  the HSTATUS register     e 0  Write FIFO is empty   e     Write FIFO contains data     82 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrie
136. module on the VXIbus  The VX8  supports VXIbus D32  D16  and DOSEO data access in the following address modes     Address Master Slave  Mode  A32 Yes Yes  A24 Yes No  A16 Yes VXIbus registers only    2 1 3  Diagnostic Support    The VX8 provides diagnostic and debugging support through the following features     e C language source symbolic debugger through front panel JTAG in and out  connectors to an XDS510    e On board Test Bus Controller for C language source symbolic debugger with  Windows NT Windows 2000 Intel VXIbus slot 0 controllers    2 2  Board Layout                                     Node H Node F Node D  TIM 40 Site TIM 40 Site TIM 40 Site       VXIBus Connector P1                                J20 J21  ECLTRG1 ECLTRGO          SIMM Memory  DRAM  Slot 2  SIMM Memory  DRAM  Slot 1                               Node G Node E Node C  TIM 40 Site TIM 40 Site TIM 40 Site  Ballistic  HP Local   Bus IC       VXIBus Connector P2                         Figure 1 VX8 Carrier Board Layout    4 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing    2 3  Front Panel    VX8 Carrier Board Programming Guide    Hardware Overview    The front panel of the VX8 has a variety of connectors and status LEDs as shown in the  following illustration  The VX8 Carrier Board Technical Reference Manual describes    the status LEDs and the connector pinouts     VXIbus Activity LED  green     ins from Nodes C  D  and E    JTAG Input    RS232 Serial Port  2    Node A  Comm  Po
137. mpliance     161    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 Instrument Driver Functions    ssVX8_init    Function Opens a session   Include File vx8 h    Syntax ViStatus VI FUNC ssVX8_init  ViRsrc rsrcName  ViBoolean id_query   ViBoolean reset  ViPSession vi            Parameters src Name Unique symbolic name of a resource   id query Flag to query the A16 registers to confirm that the device is a VX8  reset Flag to reset the board   not supported  vi Unique logical identifier to a session   Returned Values VI SUCCESS Successfully initialized the device   SSVX8 ERROR BAD RSRC DESCRIPTOR Unknown rsrcName   VI ERROR FAIL ID QUERY The device rsrcName is not a VX8   VI_WARN_NSUP_RESET Soft resetting is not supported     Remarks A subsequent call to ss VX8_open must be performed with the session handle returned  from this function call  A call to viOpenDefaultRM is NOT required     This function is only applicable to VISA VXIpnp applications     rsrcName syntax will resemble    VXI0  240  INST     Refer to the VISA I O library  documentation for the proper resource descriptor nomenclature     This function will return VL WARN _NSUP_RESET if the reset parameter is set     162 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 Instrument Driver Functions    ssVX8_open    Function Opens a VX8 system     Include File vx8 h    Syntax ViStatus VI FUNC ssVX8_open ViSession vi  SYSHANDLE  VX8SystemHndlPtr 
138. n 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  Example Software    Code Composer  and running programs on the LeMans   lt  nstallPath gt  is the SDK  installation root  by default C  VXIPNP WINNT ssVX8     After the execution  all other nodes should have their interrupt line asserted  This can be  verified by observing bit 10 of the IIF register via JTAG  a    1    indicates that the  interrupt is asserted     Program Description    The program first disables the IIOF2 interrupt matrix  The IOF2 pin on Node A is then  set up as a GPIO output and asserted  1   Then the IIOF2 interrupt matrix is enabled  with all sites connected on line 7  Then the IIOF2 line is toggled low  assert interrupt      11 6  SCV64 Interrupt and Location Monitor Example    This example demonstrates how to use the VX8_SCV64AckInterrupt function to  handle interrupts from the SCV64  specifically  the SCV64 Location Monitor  LM     interrupt      The Location Monitor  LM  is a 31 stage deep FIFO that can be accessed by writing to  the top memory location of the A32 space configured on the VX8  The LM can be  written to from either the VXIbus or locally from the DSPs by writing to this upper long  word address on the board   s A32 space  Refer to the SCV64 User Manual   VMEbus  Interface Components Manual and the VX8 Carrier Board Technical Reference Manual  for more information about the LM     The vx8lm c example sets up and enables the Location Monitor interrupt on the SCV64 
139. n 34  5 3 2  Node B TMS320C40 and TIM 40 Based DSPS   ocooocccccccccccococccccnnnns 35  VX8 C4x Support Software coooooccccccconccoccconononoconnannnnononannncrrnnannnronenananes 37  6 1  A16  Control  Module  0ccioccoii ee loli the eo ed 37  6 1 1  DescriptiON   a aaa eaten a 37  6 1 2  A16 Control FUNCION            occcccccccccoconocnnncnnnnnnnnnonononononononononononononones 38  6 2  Global Bus Interface Module           occccccncncnononononenenenononenononononononononononenenenenenenos 38  6 2 1  Descriptor A as 38  6 2 2  Global BUS FUNC  IONS       coccccccncncncncnoncnononeninineninininonenenineninenenenenenenos 39  6 2 3  Shared Bus TransferS      occcccncncinonncnnncinnnnenininininininininininineninenenenenenos 40  6 2 4  The Global Shared Bus Lock Stack             cocccocococococococonononononenonenos 40  6 3  VXlbus Interface Module     ooooocococococococonononooooooononononononononononononononononononononononona 43  6 3 1  DESC IN a carabina 43  6 3 2  VXID  S FUNCIONS ic dl 43  6 4  HP Local Bus Interface Module     ocococoninininonincnoncncccncnoncnononnonono nono nono nono nononononon 44  6 4 1  Description a tia 44  6 4 2  HP Local Bus Interface Module Functions  amp  Macros               00000008 45  6 5  BUS LOCKING att 48  6 5 1  Why is Bus Locking Required            ccccceeeeeeeeeeeeeeeeeeeneeeeeeeneeeeeeenaees 48  6 5 2  Automatic BUS LOCKING scies E nn nr nnno nn rro rca 48  6 5 3  Manual Bus Lotko n r r Aa DAOR 48  6 5 4  How to Lock and Unlock the G
140. n error occurred during    the closing of the VX8  system     BFFC 0816 SSVX8_ERROR_SYSREAD_BOARD_NOT_FOUND ssVX8_SystemRead  could not find a device  with the indicated  resource descriptor     BFFC 0817 SSVX8_ERROR_SYSWRITE_BOARD_NOT_FOUND ssVX8_SystemWrite  could not find a device  with the indicated  resource descriptor                 Part Number 500 00330 199  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  Appendix A  Status Codes    Error Number Status Code Description    Base 16    BFFC 0818 SSVX8_ERROR_VX8_STILL_IN_CONFIG A VX8 device is still  asserting CONFIG     BFFC 081B SSVX8_ERROR_RW_BAD_VX8_ADDRESS_RANGE ssVX8_BoardRead Write  bad address    BFFC 081D SSVX8_ERROR_RW_IO_FAILED ssVX8_BoardRead Write  1 0 call failed    BFFC 081E SSVX8_WARN_RW_ZERO_LENGTH ssVX8_BoardRead Write  zero length specified    BFFC 081F SSVX8_ERROR_SYSTEM_STRUCT_UNINITIALIZED The system structure was  uninitialized     BFFC 0820 SSVX8_ERROR_SETHPUXMAPSPACE_FAILED The map space  parameter was  unsuccessfully set        BFFC 0821 SSVX8_ERROR_SETIMAPA32BA_FAILED An error occurred during  the determination of a  VX8 A32 base address     BFFC 0822 SSVX8_ERROR_NAK_BUFFER_TIMEOUT The Node A kernel has  stopped responding  during loading     BFFC 0823 SSVX8_ERROR_PROCLOADCODE_COFFPARSE_FAILED   An error occurred during  the parsing of a COFF  file     BFFC 0824 SSVX8_ERROR_READFIRMWAREREV_TIMEOUT Node A failed to report  the firmware revision  number in the allo
141. nd A16 Configuration Registers  initializes  sets A32 Enable bit SCV64  and enables A32 slave image  Optional  Sets the bottom two Receives an interrupt on IIOF3  reads the Still waiting  32 bit words in Node A Near A16 Configuration Registers  writes self  Global to    uninitialized    values  test results to address 0x8000 0001   Writes to A16 Control Register writes firmware revision to address 0x8000  requesting Firmware Revision and   0000  writes firmware revision and self test  Self Test Status status bits to A16 Status Register  Optional  Polls on Firmware and No Action Still waiting  Self Test locations in Node A Near  Global for the values to change  from the    uninitialized    value then  clears the Firmware Rev and Self  Test Query bits in the A16 Control  Register   Host starts code download by Node A receives command and Receives Intermediate  loading the intermediate boot downloads intermediate boot kernel to Boot Kernel from Node  kernel to all DSPs through Node other nodes via COMM Port  A via COMM Port  Not  A  all DSPs are physically  connected to Node A via  COMM port  so this  download may take  several    hops      Host continues code download by   Passes code data along  Target DSP receives  sending application code to the user s application code  furthest DSP in the COMM Port and starts executing it   chain   Last DSP to be downloaded is Node A receives application code and All DSPs are now  Node A starts executing  The Node A boot kernel running user
142. nd in the examples directory of the C4x Support  Software directory  The mult c example can also be found in the examples directory of  the VX8 Instrument Driver Software directory  Refer to chapters 3 and 4 of the VX8  Carrier Board Installation Guide for information on how to install and locate the  example programs    MDC44ST    C44 based examples are contained in the examples c44 directory of the  C4X Support Software directory  The contents of this directory are similar to the files in  the directory for the    C40 DSPs  The only difference lies in the DSP software building  process in which the vx8c44ss lib file is linked instead of the vx8c40ss lib file used in  the examples directory  This is specified in the vx8tim cmd linker command file in  examples c44  The  v44 flag is also used by the compiler shell batch file ticompt bat in  examples c44  All of the software support functions and instrument driver functions in  these examples use a header file called vx8 h     11 1  Floating Point Multiplication Example    The mult c example demonstrates how the top level instrument driver function calls are  used  Specifically  how they are used to open a VX8 system  download code  and get  data back from a DSP application  The two floating point arguments that you provide in  mult c are multiplied by the VX8  and the resulting value is then returned back to the  host in order to be displayed     The C4x component of the floating point multiplication example  vx8mult c   demon
143. nel 2     This is done by first installing an ISR for the UART interrupt line  The UART interrupt  will trigger when any data is received  The ISR simply adds the data in the block to the  current sum  The static variable  verified  in the UART ISR should be equal to the  block length  LENGTH   At the end of the ISR  the DUART interrupt is disabled once  the entire block is received     Part Number 500 00330 185  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing    Example Software    VXIbus  Configuration    PC Configuration    186    System Configuration    Controller HP E1497A   v743    Operating System HP UX version 10 2   I O Library HP SICL version 3 0   VISA 1 1   Mainframe HP 75000 Series C   VX8 Configuration Embedded near global memory 128k X 32 or 512k X 32  No TIM 40 modules  DRAM optional    Front panel RS 323 connectors connected by a NULL modem  cable  required     PC At least 4Mbytes of memory  16Mbytes recommended   Texas Instruments XDS510 for C4x JTAG debugging   Operating System Windows NT or Windows 2000    Running the Program    The DUART example should be run from JTAG on Node B  The C4x code   vx8duart c  has been compiled and linked to generate the COFF file  VX8DUART OUT  To rebuild vx8duart c  simply call build bat  This batch file calls  bldc40b bat  which compiles duart c and links it with the C boot routine boot_b asm  and the VX8 C4x Support Software library  The TMS320C4x compiler environment  may have to be set to
144. nerate Mode Example                   c cccecceceeeeeeeeeereeeeeeees 188  11 5  C4x IIOF2 Interrupt Matrix Example      0         cecececcecceceeeeeeeeeneaeceeeeeeetecsnaeeneees 190  11 6  SCV64 Interrupt and Location Monitor Example                      ccceeeeeeeeseeeeeeeeees 191  11 7   VXIbus  SCV64  DMA Example   ooooooccconocccccononccccononcncconncncnnnnnnnnonnnnncnnnnnnnnnnns 193  11 8  VX8 VXlbus Master Example  2            cccccccececeeeeeeeccneceeeeeeesececaeaeeeeeeeeeescneeeeees 195  Appendix A  Status Codes     ccccccccconnocccncncccncncnonananannncnnnnnnannnnnnnennnnnnnnnanas 197  Appendix B  Definitions and ACronyms             ccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeees 201    Part Number 500 00330    Revision 2 05    Part Number 500 00330  Revision 2 05    List of Figures    Figure 1 VX8 Carrier Board LayOUt  oooooocconnoccccnonocccccononcnccnnoncnncnno cnn c nano nn nrrnnn rca 4  Figure  24X8 Front Paella iaa 5  Figure 3 Communication Port ROUtINQ      ooooocccnnnoccccnnnocccccnnoncccnononccnonannncnnnnnncccnnnns 7  Figure 4 Bus  ArchiteCture     cs cesccaceebenetendenccccecusceecentssnenendeneeeeeenseeeetesenecentbeneneteeier 9  Figure 5 VX8 Interrupt Architecture    oooocoononcccnnnoccccconconcccnononcncnnnoncncnnnanccc naar ncnninns 10  Figure 6 VX8 Software ENViTONMeNt  occccconoccccnonocccccononcncnnnoncncnononcnc nana ncccnnnnnnccnns 16  Figure 7 Building an Executable Fil8      ooooononcccnnnoccccnonaccccnnoncccnnnanccnnnnancccnnnnncncnnna 31  Figure 8 HP L
145. ng table lists the flags that can be specified                 Flag Value Description  SSVX8_RW_NO OFFSET     0x00000000 src relative to the A32 base address  SSVX8 RW TBC 0x01000000 src relative to the test bus controller  base   SSVX8_RW_NODEA 0x02000000 src relative to Node A Global base  SSVX8_RW_NODEB 0x03000000 src relative to Node B Global base  SSVX8_RW_NODEC 0x04000000 src relative to Node C Global base  SSVX8_RW_NODED 0x05000000 src relative to Node D Global base  SSVX8_RW_NODEE 0x06000000 src relative to Node E Global base  SSVX8_RW_NODEF 0x07000000 src relative to Node F Global base  SSVX8_RW_NODEG 0x08000000 src relative to Node G Global base  SSVX8_RW_NODEH 0x09000000 src relative to Node H Global base  SSVX8_RW_DRAM 0x0F000000 src relative to DRAM base   Part Number 500 00330 179    Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 Instrument Driver Functions    ssVX8_SystemReset    Function  Include File  Syntax  Parameters    Returned Values    Remarks    180    This function will reset all of the VX8 devices in a system    vx8 h  RESULT _SS_FUNC ssVX8_SystemReset  SYSHANDLE VX8_ System      VX8_ Sytem VX8 system handle    VI SUCCESS Successfully reset the VX8 system    Invoking this function resets the VX8 system  This will abruptly terminate all  applications currently running on the system  If your application requires to be     gracefully    terminated  you should implement a scheme to halt activities on the  processors 
146. nstances  you may wish to bypass the instrument driver and call the I O  library functions directly  for example to optimize data transfer rates to the host  Refer  to your SICL documentation if you are going to access the I O library functions directly        Caution  Take extreme care when directly calling I O library routines as your  calls can easily affect components outside of the VX8 System        See Table 18 System Module Functions for a listing of the System Module functions     129    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 SICL VISA Instrument Driver    9 2     130    If you are building code in the HPUX SICL environment  the compiler environment on  the host should be set in the following manner     Additional INCLUDE Directories  opt hpux include   opt hpux ssVX8 include    Additional Library Paths  opt hpux lib   opt hpux bin    VISA Instrument Driver       Note  The VISA Transition Library  VTL  is not supported because it lacks  several 32 bit I O functions required by the VX8     Although a VXIpnp  VXI Plug and Play  module has been supplied in order to  meet VXIpnp compliance  the VXIpnp instrument driver specification does not  support all of the functionality required by the VX8  C4x considerations dictate  that multiple VX8s be treated as a single system  which the VXIpnp module  specification does not accommodate  The effect is that your application must  make calls to the VX8 System Module level of the instrument driver     
147. nterface Components Manual     121    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_UnLock    Function  Include File  Syntax  Parameters    Returned Values    Remarks    122    Unlocks the current Global Shared Bus and restores the previously locked context   vx8 h   STATUS VX8_ UnLock  void     None    VX8_ SUCCESS The global bus was unlocked  successfully  The unlock target is taken  from the lock stack     VX8 ERROR UNLOCK MISMATCH A call to VX8 UnLock was made    without a successful matching call to  VX8_ Lock     The current lock location is unlocked and the previous destination address is locked   See Section 6 2 4  The Global Shared Bus Lock Stack for reference     This function should occur with a corresponding VX8_Lock call to properly maintain  the lock stack  Keep in mind that while a DSP is locking to the Global Shared Bus  no  other DSP can gain access to the bus     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8_ Write    VX8 C4x Support Software Functions    Function    Include File    Syntax    Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    Writes a block of memory locations from the calling node s local SRAM  global SRAM  or internal memory to the VXIbus  DRAM  or other node s SRAM     vx8 h    STATUS VX8 Write   PVUINT32 dest  PVUINT32 src  UINT32 len   VX8 TRANSFER TYPE mode      dest Volatile point
148. obal Shared Bus extensively  Using  the shared DRAM to buffer data will isolate the  host from colliding with C4x and HP BALLISTIC  traffic on the global shared bus  Depending on  your host interface  it may be more efficient to  use DMA from the host or through the SCV64  DMA controller to perform data transfers     All C4x DSPs will be held off until the bus is  released     For more details  see VX8_HPSuspendDMA in  chapter 7     C4x nodes cannot preempt one another on the  Global Shared Bus  All other C4x DSPs will be  held off until the bus is released     Design your software in a way that processors  do not starve one another     Global Shared C4x DMA C4x DMA to the Global Shared Bus is not  Bus recommended     C4x Near SCV64 DMA  Global memory    C4x node HP Local Bus     SCV64  transfer     Another C4x  node    All C4x nodes     HP Local Bus  transfers    The C4x node   s    Near Global  SRAM       SCV64 DMA to C4x Near Global memories  should be performed with caution as you can  easily monopolize the Global Shared Bus and  starve C4x and HP Local Bus accesses     A processor will not have access to its Near  Global SRAM while the transaction is in  progress     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software    6 6  DUART Module    Part Number 500 00330  Revision 2 05    6 6 1  Description    A 2 channel 16C550 style UART is provided for use on the VX8 Carrier Board  Only  Node B has
149. ocal Bus Operation nainii aora errn i Aea AER AEEA TAER EE 44  Figure 9 SICL Instrument Driver Program FIOW          c cccceeseeeeeeeeeeeeeeeneeeeseenaees 129  Figure 10 VISA Instrument Driver Program FIOW            c cscceeseeneeeeeeneeeeeeeneees 130  Figure 11 VXIpnp Instrument Driver Internal Design Model    132  Figure 12 Program Flow VXIpnp vs  SICL ccccnnnncccnnnnoccnnnococcnnnncccnnnnrrccannnnnnns 134  Figure 13 Instrument Driver Program FIOW           cccceesceeseeceeeeeeeneeeseeneeeeseeaeees 137  List of Tables  Table 1 Symbolic Constants Used in the Example Programs    s es 19  Table 2 Data Types ici dc 21  Table 3 Boot Kernel Initializati0D       o oooonnnnnninnniininnincccnnnnacccnnncanannncrrnnr nana 26  Table 4 Node A Memory Restrictions     o oooocccnnnnccinnnnccccnnocananonanannn nora cnn nano nn 35  Table 5 Prefixes Used in the VX8 C4x Support Software   ooooonoiccccnnnnnncccoccncccnoo 37  Table 6 A16 Control Function    ooooonnccccnnnnccconnonocnnn nono ncnnnnno na nn nono cnn rro nr rra nn 38  Table 7 Global Shared and DRAM Shared Bus Functions    n    39  Table 8 VXIbus Related FUNCIONS    oooooonncccinnnococcnnnocacnnonnancnr nono cnn nono nn rro nc 43  Table 9 HP Local Bus Initialization Status Functions     oooononnnninnnncnnnocacnnccanccnnnans 45  Table 10 HP Local Bus CONSUME Functions    oooocccccccnnococcnononananinnanano nana nannnnn 46  Table 11 HP Local Bus GENERATE Functions    ooocococccnnococccononancnnnananannnnancnnnnns 46  Table 12 HP Loca
150. of the BALLISTIC  interface chip  The user must be familiar with the BALLISTIC HP Local Bus  interface chip and the reference information described in the VX8 Carrier  Board Technical Reference Manual before attempting to use extended HP  Local Bus functionality        Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 C4x Support Software    Table 12 HP Local Bus Extended Functionality    VX8_HPGetContBit Gets the value of the CONT bit in the HCONTROL register     VX8_HPGetPauseBit Gets the value of the PAUSE bit in the HSTATUS register   Indicates that the HP BALLISTIC IC is in a paused state    VX8_HPGetRAEBit Gets the value of the Read FIFO Almost Empty bit in the  HSTATUS register    VX8_HPGetRAFBit Gets the value of the Read FIFO Almost Full bit in the  HSTATUS register    VX8_HPGetReadDone Gets the value of the READDONE bit in the HREADEOB  register    VX8_HPGetREBit Gets the value of the Read FIFO Empty bit in the HSTATUS  register    VX8_HPGetRFBit Gets the value of the Read FIFO Full bit in the HSTATUS  register     VX8_HPGetStripBit Gets the value of the STRIP bit in the HCONTROL register     VX8_HPGetWAEBit Gets the value of the Write FIFO Almost Empty bit in the  HSTATUS register    VX8_HPGetWAFBit Gets the value of the Write FIFO Almost Full bit in the  HSTATUS register    VX8_HPGetWEBit Gets the value of the Write FIFO Empty bit in the HSTATUS  register    VX8_HPGetWFBit Gets the value of the Write FIFO F
151. on the system before calling this function  A call to  ssVX8_SystemLoadCode will be required to reload DSP applications     When a VX8 system is reset  all VX8 devices defined in the SDF that was opened with  the ssVX8_SystemOpen call are reset whether they are connected via the front panel  COMM port JTAG or not     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 Instrument Driver Functions    ssVX8_SystemWrite    Function Writes a block of data from memory on the host to a specified VX8 device   Include File vx8 h    Syntax RESULT SS FUNC ssVX8_ SystemWrite  SYSHANDLE VX8_ System   STRING board_name   PUINT32 dst  PUINT32 src   UINT32 length  UINT32 flags      Parameters  X8 System    board_name    VX8 system handle    Unique symbolic name of a resource    Part Number 500 00330  Revision 2 05          dst Destination offset  relative to flags   src Source address of data on the host  length Length of block in long words  D32   flags Flags described below  Flag Value Description  SSVX8_RW_NO_OFFSET 0x00000000 dst relative to the A32 base address  SS VAS RWSTBC 0x01000000 dst relative to the test bus controller base  Bev ne RWI NODER 0x02000000 dst relative to Node A Global base  Boy eR NOR 0x03000000 dst relative to Node B Global base  ODER 0x04000000 dst relative to Node C Global base  AP RW NODED 0x05000000 dst relative to Node D Global base  SS VAS ZRW  NODE 0x06000000 dst relative to Node E Global base  SSVX8_
152. onitor interrupt  10   local DMA complete  DONE  interrupt  11   local DMA Configuration Error  CERR  interrupt  12   local DMA Local Bus Error  DLBER  interrupt  13   local Local Bus Error  LBERR  interrupt  14   local VXI Bus Error  VBERR  interrupt    vector Volatile pointer to 8 bit vector number  This vector is generated by  VXIbus interrupts only and is invalid  set to zero  for all other  interrupt sources     Im_val Pointer to a 32 bit location  If the interrupt was caused by the  Location Monitor  the value read from the LMFIFO will be returned     SCV64_ SUCCESS Interrupt source acknowledged  successfully    SCV64 ERROR LOCAL ACCESS An access error has occurred    SCV64_ERROR BAD JACK An access error occurred while  running the IACK cycle     SCV64 ERROR BUS INT LEVEL VALUE A bad local interrupt occurred     Upon receiving an IIOFO interrupt from the SCV64 the source of the interrupt is  unknown since all of the SCV64 interrupts share this one line  IOFO should be  configured as a level triggered interrupt on the DSPs which are handling the interrupts  from the SCV64  This function will return the source of the interrupt     If a VXIbus interrupt is indicated  an IACK cycle will be performed  This function  performs all of the necessary cycles  reads and writes  and associated registers to handle    111    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    112    the VXIbus interrupts  Your application must enable t
153. operate at 0 wait states   Only the embedded C40 DSPs can operate at 0 wait states for 80 MBytes sec  operation  TIM 40 modules are limited to 1 wait state for 60 MBytes sec    operation     HPBUS_SUCCESS HP Local Bus DMA target was    successfully programmed     HPBUS_ERROR_ WAIT STATE VALUE Wait state value out of range  HPBUS_ERROR_ BUF _ ADDR VALUE Invalid destination address  HPBUS_ERROR_FLAG VALUE The transfer flags are invalid     The mode of the DMA transfers are not set by this function and the DMA transfers are  not engaged  See VX8_HPSetMode       Target modifier flags are listed on the next page     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing    Part Number 500 00330  Revision 2 05    Target Modifier Flag  HP_NODE_A  HP_NODE_B  HP_NODE_C  HP_NODE_D  HP_NODE_E  HP_NODE_F  HP_NODE_G  HP_NODE_H  HP_NODE_ALL    HP_NODE_TIM  HP_NODE_CDGH  HP_NODE_EFGH    HP_NODE_CD    HP_ADDR_MODE  HP_PORT_MODE    VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    Description   Node A is the target of the HP Local Bus read DMA transfer   Node B is the target of the HP Local Bus read DMA transfer   Node C is the target of the HP Local Bus read DMA transfer   Node D is the target of the HP Local Bus read DMA transfer   Node E is the target of the HP Local Bus read DMA transfer   Node F is the target of the HP Local Bus read DMA transfer   Node G is the target of the HP Local Bus read DMA transfer   Node H is the target of the HP Local Bus re
154. ort Routing    Although the C44 does not use COMM ports 0 and 3  Spectrum   s C44 based TIM 40  modules route COMM ports   and 4 to COMM ports 0 and 3 for compatibility with  existing motherboard designs  As a result  COMM Ports 1 and 4 of single C44 based  TIM 40 modules are not available  The COMM Port layout shown in Figure 3 ensures  that the front panel COMM ports are valid for all current and planned Spectrum C40  and C44 based TIM 40 Modules     Refer to the 7MS320C4x User s Guide for further information on the C4x COMM  Ports     2 5  Bus Architecture    The VX8 Carrier board uses several different communication buses to connect the C40  processors  TIM 40 sites  memory devices  and interface circuitry  Although the buses    Part Number 500 00330 7  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  Hardware Overview    are not the only way you can interconnect the devices on the VX8  they are the primary  means of data transfer between devices     Local Bus The Local Bus address range is specific to a single C4x DSP  and is  therefore not shared with other processors or nodes  It is a private memory  bus of a particular C4x     Near The Near Global Bus of the V X8 refers to the Global Bus of each TIM 40  Global site and the embedded C40 nodes  The SRAM located on these Global  Bus Buses is zero wait state from the DSP that owns it  but other DSPs  the HP    Local Bus DMA Controller  and the VXIbus Slave Interface can access it  via the G
155. pens communications with a VX8 device  This  function returns an I O library handle to a device  In  the VX8 context  this function merely exists to satisfy  VXIpnp requirements  A call to ssVX8_open is  required following a call to ssVX8_init to open and  initialize the VX8 system        ssVX8_open This function calls ssVX8_SystemOpen to open and  initialize a system of VX8 devices  The VX8 system  handle returned by ssVX8_SystemOpen is stored in  the user defined attribute of the session opened by  the preceding call to ssVX8_init     ssVX8_reset This function will return VI WARN_NSUP_RESET     ssVX8_revision_query   This function will return the firmware and driver  revision     The five operational functions of the VXIpnp Module are        e ssVX8_init   e ssVX8 open   e ssVX8_error_message  e ssVX8_ revision query    e ssVX8 close    When using the VXIpnp module  you must first call the required ssV X8_init function to  open communications with a VX8 device  then you   ll immediately call a second  function  ssVX8_open  The ssVX8_open function calls the System module functions of  the VX8 instrument driver  ss VX8_SystemOpen  which has parameters that the  ssVX8_init function does not allow  The ss VX8_open function then stores the system  resource handle generated by ss VX8_SystemOpen in the user defined attribute of the  board handle obtained from the Resource Manager  RM  from the preceding  ssVX8_init call     The ssVX8_close function extracts the system handle from 
156. r  specifications     Write FIFO Almost Empty   a condition that occurs when the Write  FIFO level reaches the programmed Almost Empty level  This causes  an IIOF1 interrupt on the DSPs if enabled     Write FIFO Almost Full   a condition that occurs when the Write    FIFO level reaches the programmed Almost Full level  This causes an  IOF  interrupt on the DSPs if enabled     203    
157. r Board Programming Guide  VX8 C4x Support Software Functions    VX8_HPGetWFBit    Function Gets the state of the Write FIFO Full bit in the HSTATUS register   Include File vx8 h  Syntax  macro  UINT8 VX8 HPGetWFBit  void    Parameters None    Returned Values State of the HP Local Bus Write FIFO Full  WF  flag  WF is indicated by bit D8 in the  HSTATUS register     e 0  Write FIFO is full   e     Write FIFO is not full     Part Number 500 00330 83  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPGetWriteDoneBit    Function  Include File  Syntax  macro   Parameters    Returned Values    84    Gets the state of the WRITEDONE bit in the HWRITEEOB register   vx8 h   UINT8 VX8_HPGetWriteDoneBit  void     None    State of the HP BALLISTIC WRITEDONE line  WRITEDONE is indicated by bit D1  in the HWRITEEOB register     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    VX8_HPReadECL    Function  Include File  Syntax  macro   Parameters    Returned Values    Part Number 500 00330  Revision 2 05    Reads the value of the ECL trigger line ECLTRGO   vx8 h  UINT8 VX8_HPReadECL  void      None    State of the P2 ECLTRGO line  ECLTRGO is indicated by bit D1 in the ECLTRG  register     85    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_HPReadTTL    Function  Includ
158. r applications must not  attempt to access the devices during the time when the VX8 system is being reset or  loaded     Refer to sections 9 4 2  and 9 4 3  for information on the SDF and LDF formats     177    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 Instrument Driver Functions    ssVX8_SystemRead    Function    Include File    Syntax    Parameters    Returned Values    178    Remarks    Reads a block of data from a specified VX8 device into memory on the host  The data  format is in long words  D32      vx8 h    RESULT _SS_FUNC ssVX8_SystemRead  SYSHANDLE VX8_ System   STRING board_name           PUINT32 dst   PUINT32 src   UINT32 length   UINT32 flags    VX8_System VX8 system handle  board_name Unique symbolic name of a resource  dst Destination address on the host  src Source offset  relative to flags   length Length of block in long words  D32   flags Flags described on the next page  VI_SUCCESS Success  SSVX8_ERROR_RW_IO_FAILED VO library read write error  SSVX8_ERROR_RW_BAD_VX8_ADDRESS_RANGE Bad DSP address or length  SSVX8 ERROR MEMORY ALLOCATION Mapping error  SSVX8_WARN RW_ZERO LENGTH Length is zero       Refer to the VX8 Carrier Board Technical Reference Manual for the VX8   s A32 slave  memory map     Always keep in mind that the host views the VX8 as being byte addressed  The Host  code must increment the address by 4  bytes  for consecutive memory locations on the  VX8  All DSP defined offsets must be multiplied by 4  or left shift by 
159. r is indicated by the same interrupt conditions as the SCV64 DMA  done and errors  Applications should always be made aware of exceptions and fatal  errors     In addition to enabling VXIbus interrupts through this function  your VXIbus system  must be configured so that only one device is set up to handle any one VXIbus interrupt  line  Ensure that no two VXIbus devices are handling the same V XIbus interrupt level   Refer to the documentation supplied with the other VXIbus devices in your system     See VX8_SCV64AckInterrupt for more information about the various interrupts     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Support Software Functions    VX8_SCV64Generate nterrupt    Function  Include File  Syntax    Parameters    Returned Values    Part Number 500 00330  Revision 2 05    Generates a VXIbus interrupt at a given interrupt level and vector    vx8 h   STATUS VX8 SCV64GenerateInterrupt UINTS8 int level  UINT8 vector    int_level 1   7   interrupt level to generate on the VXIbus    vector 8 bit vector value to be placed on VXIbus    SCV64_SUCCESS Interrupt successfully generated on  VXIbus     SCV64 ERROR_INT_ACTIVE The interrupt level is already active   SCV64 ERROR _INT_LEVEL_VALUE The interrupt level was out of range     117    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_SCV64SetSysFail    Function    Include File    Syntax    Parame
160. rRev  PUINTS8 driver_revision      driver revision Pointer to storage for the driver revision description    VI_SUCCESS Successfully reported driver and instrument firmware  revisions     The calling function must allocate space for the driver revision  The storage required is  8 characters     171    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 Instrument Driver Functions    ssVX8_SystemLoadCode    Function  Include File    Syntax    Parameters    172    Loads DSP application software onto the processors in a VX8 system   vx8 h    RESULT _SS_FUNC ssVX8_ SystemLoadCode  SYSHANDLE VX8_ System   STRING loadDefFile   UINT32 flags      VX8 System VX8 system handle  loadDefFile Path and filename for a Load Definition File  Specify        if no  override is required    flags Flags described below    Flag Value Description   SSVX8_SYSLOADCODE NOCHECKCONFIG 0x0 Does not check  CONFIG line  status after loading    SSVX8_SYSLOADCODE_CHECKCONFIG 0x2 Performs a    ssVX8_SystemCheckConfig call  after loading the system     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    VX8 Instrument Driver Functions    VL SUCCESS Successfully loaded the  system    SSVX8_ERROR_NODEA_TIMEOUT An error occurred in loading   Node A is no longer  responding      SSVX8_ERROR_PROCLOADCODE COFFPARSE FAILED An error occurred during the  parsing ofa C4x COFF file   
161. rations to SICL defined types    The following base type modifiers are used     U unsigned  R register  P pointer  V volatile    Note that    volatile    generally applies to everything de referenced from the base type   For example  PVPVUINT16    PVPUINT16     20 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Part Number 500 00330  Revision 2 05    Software Overview    Table 2 Data Types    STATUS unsigned long  error code return value for functions  VPINT8 volatile pointer to a  volatile  char    VPUINT8 volatile pointer to a  volatile  unsigned char  PVPUINT8 pointer to a volatile pointer to a  volatile  unsigned char    VPINT16 volatile pointer to a  volatile  short  PVPUINT16 pointer to a volatile pointer to  volatile  unsigned short    21       VX8 Carrier Board Programming Guide Spectrum Signal Processing  Software Overview    volatile pointer to a  volatile  long    UINT32 types  UINT32  VUINT32  PUINT32  PVUINT32  VPUINT32 volatile pointer to a  volatile  unsigned long    unsigned long  volatile unsigned long  pointer to an unsigned long    pointer to a volatile unsigned long    PVPUINT32 pointer to a volatile pointer to  volatile  unsigned long    floating point  32 bit  types  FLOAT32   VFLOAT32   PFLOAT32   PVFLOAT32 pointer to a volatile float   VPFLOAT32 volatile pointer to a  volatile  float  PVPFLOAT32 pointer to a volatile pointer to a  volatile  float  floating point  64 bit  types  defined in ssvisa
162. rd Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_DUARTSetBaudRate    60    Function    Include File  Syntax    Parameters    Returned Value    Remarks    Programs channel 1 and or channel 2 of the DUART to operate at a given baud rate and  data format     vx8 h    void VX8_ DUARTSetBaudRate  UINT8 channel  UINT32 div_value  UINT32 format      channel 0   program both channels  1   program channel 1  2   program channel 2    div_value Baud rate divisor to program into channel s   See Remarks  format Data format for the channel s     Data Format Flag Value Description    DATA_5 0x00 Sets the number of data bits to five    DATA_6 0x01 Sets the number of data bits to six    DATA_7 0x02 Sets the number of data bits to seven    DATA_8 0x03 Sets the number of data bits to eight    STOP_BIT_1 0x00 Sets the number of stop bits to one    STOP_BIT_2 0x04 If 5 bit data length  1 5 stop bits are generated  For 6  7   or 8 bit data lengths  2 stop bits are generated    NO_PARITY 0x00 No parity bit is generated    ODD_PARITY 0x08 An odd parity bit is added to the serial data unit     EVEN_PARITY 0x18 An even parity bit is added to the serial data unit   MARK_PARITY 0x28 A    1    parity bit is added to the serial data unit   SPACE_PARITY 0x38 A    0    parity bit is added to the serial data unit     BREAK 0x40 Sets serial output to    0      DUART_ERROR_CHANNEL_VALUE Unknown channel number   VX8_SUCCESS DUART baud rate s  set     The data format is 
163. rder to for the CONFIG  functionality to work  all processors must be loaded with  code which will at least de assert the CONFIG  line on the particular site  See  ssVX8_SystemCheckConfig for details     The loading mechanism for the VX8 uses COMM ports to transfer the program  information to the DSPs in the system  Node A will be running the Boot Initialization  kernel  All processors will be loaded with a small kernel which will redirect load  information through the COMM ports to reach a target processor  Refer to Section 5 3    173    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 Instrument Driver Functions    174    for the resources used by the loading mechanism on the C4x DSPs  It is imperative that  all C4x DSP applications do not initiate COMM port communications until the  applications are completely loaded     The COMM port information in the SDF is used to determine the COMM port path by  which each DSP in the system will be loaded  The SDF COMM port information for  processors  TIM 40 modules  front panel connections  and the carrier board must be  correct for the loading mechanism to correctly function     Processors which are not to be loaded must be defined in the SDF as having the  attribute BootPort   NONE  so that these processors are not included during the  generation of boot path information  It is not sufficient to simply omit the processor  from the LDF as the loading algorithm may use the processors to load others via  COMM port 
164. result to ensure that the value read is valid  8 bit registers should use a  mask of 0x0000 OOFF  as the upper data bits are generally not driven by the hardware  If  the upper data bits are included in the mask  the software may hang trying to read the  same result twice     This routine performs locking and unlocking of the global shared bus  Unnecessary  operations will be performed if the register in question is local to the DSP  internal   local  or near global      108 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8_ReadBit    VX8 C4x Support Software Functions    Function  Include File  Syntax  macro     Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    Reads the value of a particular bit from a memory location on the global bus   vx8 h   UINT32 VX8 ReadBit PVUINT32 dest  UINT32 mask     dest Volatile pointer to a memory location on the global bus     Mask Mask used for and ing with the result  A mask of 0x0000 0001  should be used to read bit DO     result Contents of the source address  Accesses to the VXIbus address  space return a value of zero     This function can be used to confirm the state of more than one bit   This routine performs locking and unlocking of the global shared bus  Unnecessary    operations will be performed if the register in question is local to the DSP  internal   local  or near global      109    VX8 Carrier Board Programming Guide Spectrum Signa
165. rred during the closing of the VX8  system    SSVX8_ERROR_CLOSE_FAILED An error occurred during the closing of a device  session     This function closes the device sessions to the VX8s in the system  It then deallocates  the system structure     For VISA VXIpnp applications  you should call ssVX8_ close instead of  ssVX8_SystemClose     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 Instrument Driver Functions    ssVX8_SystemErrorMessage    Function  Include File    Syntax    Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    Gets a text description for a given error code     vx8 h   RESULT SS FUNC ssVX8_ SystemErrorMessage  VXIDEV HANDLE vi   RESULT error   STRING message     vi VX8 IO handle   error Return code for which to get text description   message Text description for error   SUCCESS Successfully reported driver and    instrument firmware revisions   SSVX8 ERROR ERROR MESSAGE UNKNOWN Unknown error value       This function only returns text descriptions for errors returned by the VX8 Instrument  Driver     169    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 Instrument Driver Functions    ssVX8_SystemRevisionQuery    Function  Include File    Syntax    Parameters    Returned Values    Remarks    170    Obtains the firmware revision number for the specified VX8 device    vx8 h   RESULT _SS_FUNC ssVX8_SystemRevisionQuery  SYSHANDLE VX8_ System  STRING 
166. rt 43    Node B  Comm  Port 43    Node G  Comm  Port 43    Node H  Comm  Port 43    Figure 2 VX8 Front Panel    Part Number 500 00330  Revision 2 05                         fooooodoooo00       000000000000          ooooogo00000                      9  O6    JC EA                              A  B  D  E   B  D  5   oo  B  D  3  5  a    JOE                   000000000000  ooopooooooo       JO  O    CO0000 00000                      000000000000    30  O    CO0000 000000             OO00goooD00 Da       JO O                         oooodoooooo  00000000000    30 OG                   oonooooooniA  ooncgpno00r0                                     JO OG    O00d0000000i                      00000000000     o    JO O                      000000000000    of    Oooogoocooooo                                                    User Definable LED  yellow     SYSFAIL LED  red     Nodes F  G  and H    JTAG Output    RS232 Serial Port  1    Node C  Comm  Port  2    Node D  Comm  Port  2    Node E  Comm  Port  2    Node F  Comm  Port  2    VX8 Carrier Board Programming Guide Spectrum Signal Processing  Hardware Overview    2 3 1  Status LEDs    LED Color Description    ACC Green VXIbus Activity LED  ON when there is activity between the VXlbus  and the VX8 Carrier Board     USR Yellow User Definable LED  ON when bit 0  DO  of the LED register is set to     0     This write only register is located at address 8B00 0000h on the  Shared DRAM Bus     FAIL Red VXlbus SYSFAIL LED  The LED is driven
167. rts40 src    ar30  x rts src    HINT  Copy the   src file into the directory that you want your include src files in and  then run the command from that directory     Note  Once you have created all these files make sure that you specify the  paths to these files in C40env and c40envr batch files  C40env is for the stack  passing model and c40envr is for the register passing model     5 2 2  Procedure for Getting a DSP C Program Running  To get a C program ruming   1  Write the C Source Code for the DSP using the examples provided as a guideline     2  Compile and assemble the program using the supplied TI Floating Point compiler  batch files     3  Link the resulting object file with the C startup  or boot  file  the appropriate VX8  C4x Support Software Library  the TI run time support library RTS40 LIB and the  linker command file  describing memory types and memory maps   Any additional  libraries  such as PRTS40 LIB  the parallel Run Time Support Library from TI   must also be linked with your application code  See Figure 7 below     4  Download and run the resulting  out file using Code Composer and debug the code  using breakpoints  watch windows  etc     Note  With Code Composer  you can use either back plane or external JTAG  debugging as described in section 2 7  For both modes  run the VXIbus  Resource Manager before downloading the code     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VX8 C4x Software Sy
168. s in your application code will result in a typical function call  series of events  where the relevant registers are pushed onto the stack and the function  is called  Return from the function pops the registers off the stack to restore the  environment of the calling function  The TI Floating Point Tools decide at compile time  which registers can be used     The prefixes used in the VX8 C4x Support Software functions indicate their usage  as  shown in the following table     Table 5 Prefixes Used in the VX8 C4x Support Software    CTN CET  BOOT Node A routines  DUART DUART functions    HPBUS HP Local Bus functions  SCV64 SCV64 functions  Global Shared Bus functions       6 1  A16 Control Module    Part Number 500 00330  Revision 2 05    6 1 1  Description    The A16 Control Module sets up the VXI A16 interface of the VX8  for use by any of  Spectrum   s supplied host interface libraries     The A16 Control Module is part of a larger group of functions that make up the Node A  Boot Kernel PEROM code        Caution  Do not reprogram or modify the code in the Node A Boot PEROM  except when installing Spectrum supplied firmware updates        Some functionality from the Boot Kernel Module must be present at runtime to support  the VXIbus A16 Configuration Registers  This is accomplished by linking in the  VXIbus A16 Interrupt Service Routine  BOOT HOF3Isr  with your application code   see Figure 7 in section 5 2 2     For information on resources required by this module   see 
169. section 5 3 1       37    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software    6 2     38    6 1 2  A16 Control Function    Table 6 A16 Control Function    Function   Description      BOOT_IIOF3lsr Handles VXIbus requests via the A16  control and offset registers     Global Bus Interface Module       6 2 1  Description    These functions are used for all transactions between a C4x node and an external  resource on the Global Shared and DRAM Shared buses  These external resources  include memory  registers  other Node   s Near Global SRAM  DRAM  the HP Local  Bus  and the VXIbus  The transfers require the global bus to be locked by the calling  C4x  by using VX8 Lock      Transfers local to the calling C4x  internal RAM  local SRAM  near global SRAM  can  be performed through direct read write accesses to increase throughput and simplify  code design  C4x DMA to the Global Shared Bus is not recommended     Functions specific to the operation of the HP Local Bus and the VXIbus are outlined in  their respective sections     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 C4x Support Software    6 2 2  Global Bus Functions    Table 7 Global Shared and DRAM Shared Bus Functions    VX8_FastTransfer Performs single cycle 32 bit data block transfers between  the calling processor s memory space and another  memory location  Since this function does not lock the  DSP to a target  it must
170. should be 0     Program Description    The example first installs the SCV64 ISR to handle the unlikely occurrence of bus  errors from the SCV64  It then initializes both data buffers to different values  The data  from buf  is then written to the other board with a call to VX8_Write and read back  into buf2 with a call to VX8_Read  The two buffers are compared for differences and  the number of errors is summed     Pay particular attention to how the address of the second board is calculated  The  VXIbus address that you want to access must be divided by 4 and then added to the base  of the VXIbus image at 0xC0000000 in order to generate the appropriate long word  address suitable for use by the DSP     The address of the DRAM on the second VX8 has been computed in the following  manner     0xC0000000    beginning of VXIbus space         0x28000000    offset of the second board in the A32 address space      0x04000000    address of DRAM in the VXIbus slave memory map      4          0xCB000000    Note  The VXIbus addresses used for SCV64 DMA transfers differ from the  addresses required to directly master the VXIbus  Direct VXIbus mastering  requires converting the desired VXIbus address to a long word address which  resides in the C4x DSP global memory map     The SCV64 DMA VXIbus  VMEbus  address is simply the desired VXIbus  address with no translation required  The SCV64 DMA Local address is based  on the VX8 A32 slave image  not the C4x global memory map     196 Part Num
171. specified by ORing the desired data format flags  For example  N81  can be specified by the following      DATA _8 STOP BIT_1 NO PARITY      The DUART is clocked from the BAUDCLK of the SCV64  32 MHz   13 or 2 461538  MHz  and provides asynchronous communications up to 153 85 kbps  The highest  standard data rate provided is 38 4 kbps  The 16C550 uses a standard divide by 16 on    Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Part Number 500 00330  Revision 2 05    VX8 C4x Support Software Functions    the master clock to generate its baud rate clock  A second divisor register is then used to  set the input and output baud rate according to the following formula     Baud Rate   32 MHz    13   16   Divisor Register     A divisor register value of 1 will give 153 85 kbps  a divisor register value of 4 will give  38 46 kbps  38 4 kbps with an error of 0 16    A divisor of zero is not recommended     This function should only be called in Node B DSP application software     61    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_FastTransfer    Function    Include File  Syntax    Parameters    Returned Value    Remarks    62    Copies 32 bit data from a source address to a destination address using parallel load and  store operations     vx8 h    void VX8 FastTransfer  PVUINT32 dest  PVUINT32 src  UINT32 length      dest Volatile pointer to destination address  src 
172. st Software System Description    8 VX8 Host Software System Description    8 1  Introduction    The VX8 Instrument Driver provides the host component of your VX8 application with  functions to perform system initialization  DSP code download  control  and data  transfer     This instrument driver is built on top of either SICL or VISA I O libraries which  provide the lower level routines used to access the back plane  The VX8 instrument  driver provides function calls required to interface to the VX8 Carrier Board and  satisfies VXIpnp requirements in the VISA version of the instrument driver software     The host accesses a VX8 Carrier Board through the VXIbus A16 and A32 address  spaces  When accessing the VX8 directly using I O library routines  care must be taken  when performing transfers other than D32 to VX8 memory  Specifically  non D32  transfers to C4x Near Global Memory requires byte swapping and manipulation due to   e the long word addressing of the C4x     e endian differences between the host and VX38  and    e the byte laning performed on the VXIbus     Wherever possible  use D32 transfers     8 2  Host Software Development    Part Number 500 00330  Revision 2 05    VX8 applications require both host and DSP software development  The VX8  Instrument Driver will allow you to easily configure your VX8 system and get your  DSP software loaded and running on the system     The host software development environment may differ depending on your host  computer  oper
173. stem Description    C4x Application Source E VX8 C4x Library RTS40 LIB  file   c  i    Compiler    Object code   obj     Part Number 500 00330  Revision 2 05    TI run ti t lib   vx8c40ss lib or vx8c44ss lib   Ti runtime support library         PRTS40 LIB   Parallel run time support  library        E Node A Kernel    BOOT_IIOF3Isr    Linker command file   vx8 cmd      Boota obj Bootb obj Boottim obj  node A   node B   nodes C and higher       Linker  Note       Only one of these  obj files will be  linked in  this will be determined by which  node the code will be running on    Executable file   out     to be loaded into DSP          Optional    Figure 7 Building an Executable File  Notes     e The VX8 C4x Support Software that is shipped to you is built to support stack  passing of variables and the small memory model  Also included is  vx8c4xsr lib  a  version of the c4x libraries with register model argument passing and small memory  model  You will need to rebuild the examples if a different memory model or  argument passing scheme is required     e If possible  run your DSP program and frequently accessed data in internal or Local  Bus memories  This will prevent the DSPs from stalling when the SCV64  HP Bus  Interface  or other C4x   s access the Near Global Memories     e For a complete description of the compiler switches  compiler link sections  and  linker command files refer to the Texas Instruments 7MS320 Floating Point DSP  Optimizing C Compiler User   s Guide an
174. strates the basics of building a TMS320C4x application using the VX8 C4x  Support Software Library  The VX8 Read and VX8_ Write calls are used in the  vx8mult c example to move data on the VX8   s Global Shared Bus     vx8mult c and mult c together demonstrate the basics of using the instrument driver  and the C4x library in your VX8 application  The multiplication example uses only the  basic functionality of the VX8  To see how you can use other interfaces on the VX8   refer to the other examples provided with the VX8 Support Software     The floating point and control data are passed through the VX8 s memory interface  through SRAM  or through DRAM with a  define change in vx8mult h   The file  vx8mult h demonstrates how to construct cross platform or common header files for  host and DSP application interactions included by both the DSP and host software     Part Number 500 00330 183  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  Example Software    System Configuration    VXIibus Controller HP E1497A   v743  Configuration  Operating HP UX version 10 2  System  I O Library HP SICL version 3 0  VISA 1 1  Mainframe HP 75000 Series C  VX8 Logical 240  Address  VX8 Embedded near global memory 128k X 32 or 512k X 32  Configuration No TIM 40 modules    DRAM optional    PC Configuration PC At least 4Mbytes of memory  16Mbytes recommended   Texas Instruments XDS510 for C4x JTAG debugging   Operating Windows NT or Windows 2000  System    Running 
175. stream  to the right  of the  VX8 that   s running this example code  The block size of the data should match the  block length specified in this example  A second VX8 running the vx8hpcon c example   see previous example  can be used to serve as an HP Local Bus data sink     188 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    VXIbus  Configuration    PC Configuration    Part Number 500 00330  Revision 2 05    Example Software    System Configuration    Controller HP E1497A   v743    Operating System HP UX version 10 2   I O Library HP SICL version 3 0   VISA 1 1   Mainframe HP 75000 Series C   VX8 Configuration Embedded near global memory 128k X 32 or 512k X 32  No TIM 40 modules  DRAM optional    2  HP Local Bus Another HP Local Bus board set up to consume data  Block size   board should match the length set in this example  A second VX8  running the vx8hpcon c example can be used to serve as an HP  Local Bus data sink     PC At least 4Mbytes of memory  16Mbytes recommended   Texas Instruments XDS510 for C4x JTAG debugging   Operating System Windows NT or Windows 2000    Running the Program    The vx8hpgen c example is to be run from JTAG  It is compiled with the appropriate C  initialization routines for Node A  The C4x code  vx8hpgen c  has been compiled and  linked to generate the COFF file VX8HPGEN OUT  To rebuild vx8hpgen c  simply  call build bat  This batch file calls bldc40a bat  which compiles vx8hpgen c and
176. t occur with a corresponding VX8_Unlock call to release the Global  Shared Bus     While the Global Shared Bus is locked by a C4x  all other C4x DSPs will be held off  until the bus is released     The VX8 Carrier Board uses a read operation to lock the Global Shared Bus  When    locking to a port  use a different address in the same lock space which is not offended  by read operations     105    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_ Read    Function    Include File    Interface    Parameters    Returned Values    Remarks    106    Reads a block of memory locations from the VXIbus  DRAM  or some other node s  Near Global SRAM into the calling node s local SRAM  global SRAM or internal  memory     vx8 h    STATUS VX8 Read  PVUINT32 dest  PVUINT32 src  UINT32 length   VX8 TRANSFER TYPE mode      dest Volatile pointer to destination address  Must be in the calling C4x s  SRAM or internal RAM space   STC Volatile pointer to source address  Can be SRAM  DRAM  or the    VXIbus  VXIbus source addresses are byte addressed   all others are  32 bit word addressed     length Block length of transfer     mode Transfer mode flag that determines the type of transfer from the  source to the calling DSP   s memory  Transfer Flags are listed on the  next page     VX8 SUCCESS Memory block read successfully     VX8 ERROR INVALID ADDRESS Source or destination address is not  compatible with the transfer mode     VX8 ERROR INVAL
177. t source identifier gt  can be that sections     Type     At the Board Definition level  the COMMConnection associations map  logical TIM COMM port connections to front panel COMM ports for that board  The  following table provides the COMM port mappings from site to front panel in the SDF  example        System Definition    The VX8 System is composed of the boards COMM connections  The Components and  COMMConnections attribute syntaxes for a System definition are similar to those of a  TIM 40 Module definition  The COMMConnections section in a System definition  section specifies the front panel COMM port connections in your system     The following is an example of a System definition section      TestSystem   Type   System   Model   Development    Components        Board1  8  CUSTOM Board1l       Board1  section defines sites    Board2  8  CUSTOM Board2     Standard base board no sites filled            comMMConnections        Src  ID  Dst  ID   Boardl  1  Board2     Connection of board front panels   Boardl  2 Board2  FE                 144 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Part Number 500 00330  Revision 2 05    VX8 SICL VISA Instrument Driver    BootProc    The BootProc section defines the processors which are responsible for loading software  onto the other processors in the system     BootProc Syntax    lt Board Name gt   lt Site Name gt   lt Boot Processor Name gt     lt board base address gt   
178. tallation root  by default C  VXIPNP WINNT ssVX8     Put the variables NbInt and NbErr in the watch window     After the execution  the value    NbInt    should be 2 and the value    NbErr    should be 0     Program Description    The vx8dma c example is set up to perform a single SCV64 A32D32 DMA transfer   The source address  destination address  direction  and length are defined as global  variables     An ISR is set up to handle the SCVDMA interrupt that will trigger when the transfer is  complete  The example also measures the amount of time the transfer takes to complete  and calculates the transfer rate in Mbytes sec  Then the program     e Starts a DMA write to the second board  e Waits for the DMA to finish its transfers  e Starts a DMA read from the second board    When the second transfer is done  the ISR compares the sent and received data     This example requires another A32 VXIbus device to write to  The example is set up to  write to shared DRAM on a second VX8 board at a base address of 0x28000000     Below is the calculation used to determine the DRAM address on the second VX8  board assumed to be at a base address of 0x28000000     0x28000000   offset of the second board in A32 address space      0x04000000  address of DRAM in the VXIbus slave memory map            0x2c000000    Note  The VXIbus addresses used for SCV64 DMA transfers differ from the  addresses required to directly master the VXIbus  Direct VXIbus mastering  requires converting the desired V
179. ted on node A   s local bus   For further information on the IIOF2 Interrupt Routing Matrix  see the Embedded C40  Node A section of the VX8 Carrier Board Technical Reference Manual     2 6 4  IlOF3 Interrupts    The IIOF3 line is used for three different purposes on the VX8 depending on which  node it belongs to     Node Usage Description  A VXIbus A16 Whenever the host writes to the VXIbus A16 Interface  interrupt Control Register  an interrupt is sent to the ITOF3 line of the    Node A C40  For further information on the VXIbus A16  interface see the VX8 Carrier Board Technical Reference  Manual     11    VX8 Carrier Board Programming Guide Spectrum Signal Processing    Hardware Overview    Node Usage Description  B DUART Node B uses IIOF3 as the interrupt from the serial port  interrupt DUART  The interrupt lines from Channel 0 and Channel 1    UARTs are ORed together and routed to Node B   s IIOF3  For  further information on the DUART interrupt see the  Embedded C40 Node B section of the VX8 Carrier Board  Technical Reference Manual     CtoH TIM 40 The IIOF3 lines from the TIM 40 modules  nodes C through   CONFIG H  are not brought off the carrier board  The lines are tied  together on the VX8 board  allowing them to be used for the   CONFIG line     2 7  JTAG Debugging    12    A JTAG IN connector is provided on the front panel of the board for connection to an  XDS510 from Texas Instruments  This allows use of the Texas Instruments    standard  TMS320C4x debug monitor
180. ter   With DTCISIZ set  the maximum length ofa SCV64 DMA transfer  in a D16 transfer mode is 2Mb  each count represents a word   In a similar manner  the  maximum length of a transfer in a D32 or a MBLT D64 transfer mode is 4Mb     SCV64 DMA to C4x Near Global memories should be performed with caution as you    can easily monopolize the Global Shared Bus and starve C4x and HP Local Bus  accesses     115    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_SCV64Enablelnterrupt    Function    Include File    Syntax    Parameters    Returned Values    Remarks    116    Enables a SCV64 interrupt   vx8 h    STATUS VX8 SCV64Enablelnterrupt UINTS int level      int_level VXIbus   Local SCV64 interrupt number to enable   1   7   VXIbus interrupt from level 1 to 7  8   local timer interrupt    9   local location monitor interrupt    SCV64_SUCCESS The interrupt was enabled on the SCV64   SCV64_ERROR INT LEVEL VALUE The interrupt number was out of range     Interrupts sources can be either local to the SCV64 or from the VXIbus  VXIbus  interrupts can be any interrupt level between 1 and 7  Local SCV64 interrupts include  the location monitor interrupt  or the timer interrupt     The SCV64 local interrupt to handle DMA transfers and errors  LIRQ5  is enabled in  the Node A boot kernel  Their is no option to enable or disable the SCV64 local  interrupt which handles DMA transfers and errors  This is because the SCV64  VME VXIbus erro
181. terrupts for general  use    5  Releases the  CONFIG line indicating the user   s application code is now running   On Nodes A amp B  CONFIG is accessed through a register  On most TIM 40 modules    CONFIG is connected to HOF3    Note  If you want to use this functionality on TIM modules that do not use the  IIOF3 I O pin as CONFIG   you will have to modify the boot_tim asm  initialization file     6  Calls the function main   to begin executing the user   s C program  7  Goes into an infinite loop if control returns from main      The COFF Loader provided with the VX8 Carrier Board Support Software will ensure  that the entry point to the user   s application code is c_int00     Three boot files are provided with the VX8 Carrier Board  boot_a asm  boot_b asm   and boot_tim asm  These files are for use with Node A embedded C40  Node B  embedded C40  and with standard MDC40Sxx TIM 40 modules  respectively     33    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Software System Description    5 3     34    5 2 5  Linker Command Files  Linker command files are ASCII files that contain one or more of the following     e Input filenames   can be object files  archive libraries  or other command files     e Linker options   can be used in the command file in the same manner that they are  used on the command line     e Linker Directives   either MEMORY  which specifies the target memory  configuration  or SECTIONS  which controls how code sections are built
182. ters    Returned Values    Remarks    118    Asserts or de asserts the SYSFAIL  line on the VXIbus from the SCV64   vx8 h  void VX8 SCV64SetSysFail  UINTS state      state 0   de assert the SYSFAIL  line  1  assert the SYSFAIL  line    None    The state of the SYSFAIL  line  visible by other devices on the VXIbus backplane  is  dependent upon the state of the SYSFAIL_INHIBIT bit in the A16 Control register  If  the SYSFAIL_INHIBIT bit is set  toggling the SYSFAIL bit on the SCV64 has no affect  on the state of the SYSFAIL  line on the VXIbus     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    VX8_SetUserLED    Function Sets or clears the state of the front panel user LED     Include File vx8 h    Syntax void VX8_SetUserLED  UINTS8 state      Parameters state 0   turn the user LED off  1   turn the user LED on    Returned Values None    Remarks The front panel user LED is accessible from all C4x Node sites     Part Number 500 00330 119  Revision 2 05    VX8 Carrier Board Programming Guide  VX8 C4x Support Software Functions    VX8_SCV64SetVxX BusReqRel    Spectrum Signal Processing    Function Sets the request and release parameters for the VXIbus     Include File vx8 h    Syntax STATUS VX8_SCV64SetVXIBusReqRel UINT32 request_mode     Parameters request_mode  bus_level  bus_clr    release mode    UINT32 bus_level   UINT32 bus_clr   UINT32 release_mode   UINT32 timeout_enable   UINT32 
183. the Program  multsicl  multvisa     The mult c example should be executable as is  If you encounter problems executing  mult c  you may have to recompile the host mult c code  If the SDF and ssvx8 libraries  are not in your C environment  you will have to include the directory with the      L lt pathname gt     option     On an HP UX host  compile the mult c host application by entering the following  command     cc  O multxxxx  Aa  g  v mult c  D HPUX  D_ SICL VISA   A sch ial bade of ANCL MOS OA we aL Ss yee  cad Tb  sdfhpux102  1 visa  L  gt  mult lst    The operation is performed by the batch file makemult  which is a UNIX script     The C4x code  vx8mult c  has been compiled and linked to generate the COFF file  VX8MULT OUT  To rebuild vx8mult c  simply run build bat in your C4x  development environment  This batch file calls bldc40a bat  which compiles vx8mult c  and links it with the C boot routine boot_a asm and the VX8 C4x Support Software  library  The TMS320C4x compiler environment may have to be set to include the  respective directories in the VX8 C4x software     The System Definition File  SDF   mult sdf  specifies the VX8 system configuration of  a single VX8  with no TIM 40 modules  no front panel COMM port connections  and a  logical address of 240 I O resource descriptor  vxi  240 for SICL  vx10  240  INSTR for  VISA      184 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  Example Software    The Load 
184. the VX8 board via  the A16 space  These writes to A16 cause the Node A IIOF3 ISR to be triggered   Sources of hard resets include     e Power On Reset  PORST    Entire VXIbus chassis is initialized after power is  applied     e SYSRST   The SYSRST  line on the VXIbus back plane is pulled low by another  VXIbus device  SYSRST  is functionally equivalent to a PORST without the  disruption of power from the back plane     4 1 2  Soft Reset    A soft reset signifies the resetting of only VX8s in a system  This can be a single VX8  board or a number of VX8 boards connected by their front panel JTAG connectors   Since the state of the Slot 0 controller is not affected by this action  the Resource  Manager will not re configure nor re initialize the devices via their A16 configuration  registers  Therefore  the previous A16 configuration information is still valid  offset  value and A32 enable state   To retain this previous state across soft resets  the relevant  A16 registers are not reset by a soft reset condition  however the READY and PASSED  bits in the A16 Status Register are cleared  Sources of soft reset include     e  VXIbus A16 Control Register Reset   If the RESET bit in the A16 VXIbus  control register is asserted  the VX8 board will generate a local reset to the entire  board with the exception of the A16 Register Set  It will also cause the  GRESET  line on the front panel JTAG connector to be asserted to ensure that other C4x  DSPs in the system are not driving their
185. the user attribute and calls  ssVX8_SystemClose  a System module function  to deallocate the resources taken by  the prior ss VX8_SystemOpen call  Figure 12 Program Flow VXIpnp vs  SICL  illustrates the program flow     133    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 SICL VISA Instrument Driver    134    The third operational function in the VXIpnp module is ssVX8_error_message  This  function returns a text string describing all error return values generated by the VX8  instrument driver software        ssVX8_revision_query      ssVX8_open      User   s Host  Application    ssVX8_SystemOpen         User   s Host  Application       ssVX8_close   ssVX8_SystemClose      VXlpnp Program Flow SICL Program Flow    Figure 12 Program Flow VXIpnp vs  SICL    Note  The ssVX8_init function should only be called once for an entire  system of VX8 devices     Note  You should not use the handle returned by the ssVX8_init function to  directly access the device  You must subsequently call ss VX8_open to initialize  the VX8 system  and then use the I O routines in the System module to  communicate with the VX8 devices     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 SICL VISA Instrument Driver    9 4  System Module    The System module represents the top level routines in the VX8 Instrument Driver  which applications will invoke to perform VX8 system initialization  control  loading   and communications
186. timeout      0   fair mode  nonzero   demand mode    Valid bus request levels are 0 3  0 is the highest  priority    0   ignore BCLR   nonzero   release bus if BCLR is active    0   release on request  nonzero   release when done    timeout_enable 0   disable  nonzero   enable   timeout 0 0 us  1 2 us  2 4 us  3 8 us   Returned Values SCV64 SUCCESS The release request parameters were  successfully initialized   SCV64 ERROR BUS_LEVEL VALUE The bus request level was out of       range     SCV64_ERROR BUS_TIMEOUT_VALUE The ownership timeout value was    120    out of range     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Remarks    Part Number 500 00330  Revision 2 05    VX8 C4x Support Software Functions    The default SCV64 bus request settings set by the Node A kernel are given in the  following table     request_mode 0   fair mode   bus_level bus request level   3  highest level   bus_clr nonzero   release bus if BCLR is active  release_mode nonzero   release when done  timeout_enable nonzero   enable   timeout 3 8 us    Note that changing SCV64 modes can cause inbound slave cycles to be corrupted or  cause bus errors  If your application requires changing the SCV64 setup from the  default configuration  only configure the SCV64 when there is no chance of A32 slave  accesses to the board     A description of VXIbus request and release modes can be found in Section 2 2 2 and  2 2 3 of the SCV64 User Manual  VMEbus I
187. tionally reset and or load DSP software onto the  system  The software to be loaded is indicated by the  Load Definition File inputted  This function returns a  system handle which is used by all System Module  functions     ssVX8 SystemRead Reads a block of data from the specified VX8   ssVX8 SystemReset Resets all VX8 devices in the system   ssVX8_ SystemWrite Writes a block of data to the specified VX8        136 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    Part Number 500 00330  Revision 2 05       VX8 SICL VISA Instrument Driver    9 4 1  Opening a VX8 System    Opening a VX8 System is performed by the ss VX8_SystemOpen call  For VXIpnp  compliant applications  a call must be made to ss VX8_init  followed by a call to  ssVX8_Open  see section 9 3 VXIpnp Module for details   The program flow for  opening a VX8 System is shown in the following diagram  Opening a system involves  parsing an SDF and LDF  opening device sessions to each VX8  resetting the VX8s  and  finally  loading the DSP applications onto the processors  Once loaded with the DSP  code  the VX8 System will be    operational    to the extent defined by your DSP   software     Parse System  Definition File    Open I O Library Parse Load  sessions to the VX8s Definition File  in the System    Reset the VX8s  in the System    Load DSP  Application Software    Close the User Application  VX8 System Execution    Figure 13 Instrument Driver Program Flow 
188. to be used in board definition sections      common   VX8_ BASE ADDR 1       VX8 BASE ADDR 2    The following is an example of a Symbol Table section identifying VISA base  addresses  I O resource descriptors  to be used in board definition sections     140 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide  VX8 SICL VISA Instrument Driver     common     VX8_BASE ADDR_1   VXI0  240  INS7  VX8 BASE ADDR 2   VXI0  241  INS7          Part Number 500 00330 141  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 SICL VISA Instrument Driver    Processor Definitions    Processors have several attributes  of which  only a few are used by the VX8 Instrument  Driver  The processor attributes which are of importance are    BootPort        LMCR         GMCR     and of course    Type   Processor         The following is an example of a processor definition section      C40 _PROC_VX8EMBED   Type   Processor   Model   C40     one of  C44  C40  S62  S60   BootPort   ALL     Can boot from any COMM port  Speed   60  LMCR 0x3e840000   GMCR 0x3a4c0000        BootPort This processor attribute is used to identify which COMM ports the processor is capable  of booting from  Two keywords  ALL and NONE  and any number in the specified  range for the processor are valid     ALL    indicates to the SDF parser that any COMM  port is suitable for loading     NONE    indicates that the TIM is not to be loaded  but  exists
189. tted  time     BFFC 0825 SSVX8_ERROR_READSELFTESTRES_TIMEOUT Node A failed to report  the self test results in the  allotted time           200 Part Number 500 00330  Revision 2 05    Spectrum Signal Processing    VX8 Carrier Board Programming Guide  Appendix B  Definitions and Acronyms    Appendix B  Definitions and Acronyms    API    C4x    C40    C44    COFF    DMA    DMA  Controller    DRAM Shared  Bus    DSP    Part Number 500 00330  Revision 2 05    Application Program Interface  Abbreviation for the Texas Instruments Family of TMS320C4x DSPs   Abbreviation for the Texas Instruments TMS320C40 DSP     Abbreviation for the Texas Instruments TMS320C44 DSP  The C44  has only 4 COMM ports compared to 6 COMM ports on the C40     Common Object File Format   a binary file format generated by  linkers which contains code  loading information  and debugging  information  Refer to the 7MS320 Floating Point DSP Assembly  Language Tools User   s Guide     Direct Memory Access   a term indicating that data is moved from  one location to another without the direct intervention of the processor   Your application code typically must configure the DMA Controller   but the code does not directly move the data     There are a number of Direct Memory Access Controllers that you can  program on the VX8 Carrier Board     e The HP Local Bus Interface DMA Controller transfers data from  HP Local Bus to the Near Global SRAM of one or more C4x  DSPs  This is the only method of consuming data fro
190. ull bit in the HSTATUS  register    VX8_HPGetWriteDoneBit   Gets the value of the WRITEDONE bit in the HWRITEEOB  register     VX8_HPSetReadDone Sets the value of the READDONE bit in the HREADEOB  register     VX8_HPSetStripBit Sets the value of the STRIP bit in the HCONTROL register     VX8_HPSetWriteDoneBit   Sets the value of the WRITEDONE bit in the HWRITEEOB  register     VX8_HPWriteTTL Writes an 8 bit value to the TTL trigger lines   VX8_HPWriteECL Asserts or de asserts the ECL trigger line        Part Number 500 00330 47  Revision 2 05    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software    6 5     48    Bus Locking    6 5 1  Why is Bus Locking Required     All processing nodes on the VX8 Carrier Board have access to the Global Shared Bus  and the DRAM Shared Bus  These shared buses are the gateway to system resources  such as the HP Local Bus Interface  VXIbus Interface  Master   SCV64  VXIbus  Interrupts   front panel LED  DRAM  and other Processing Nodes    Near Global  SRAM sS  As a result  the global bus may be in demand by the HP Local Bus DMA  controller  the SCV64 DMA controller  VXIbus masters  and DSPs on populated nodes     To arbitrate shared bus requests from all sources  a bus locking mechanism is used in  conjunction with the C4x interlock operations     When a device requests the Global Shared Bus  it is granted the bus according to a  certain priority  see section Shared Bus Arbitration in the VX8 Carrier Board Te
191. umber 500 00330  Revision 2 05    VX8 C4x Software System Description    When building DSP code for MDC44ST    C44 processors  use the batch file  bldc44t bat     664 99    Batch files used to build with the register passing method have an    r    appended to the  filename  bldc40ar bat  etc     To rebuild the C4x support software libraries  vx8c40ss lib  vx8c44ss lib  vx8c40sr lib   and vx8c44sr lib  use the DOS batch file makevx8 bat     To rebuild the example programs using the stack argument passing model  run the DOS  batch file c40env bat  sets environment variables for the stack passing model   then use  the DOS batch file builddsp bat     To rebuild the example programs using the register argument passing model  run the  DOS batch file c40envr bat  sets environment variables for the register passing model    then use the DOS batch file buildspr bat     5 2 4  Boot  Startup  Files    The C boot initialization routine performs the C runtime environment initialization   This routine consists of an assembly language function called c_int00 which performs  the following operations     1  Defines the code entry point to be c_int00    2  Allocates and initializes the system stack and sets up the frame pointer    3  Auto initializes global variables by copying data from the initialization tables in   cinit to the storage allocated for the variables in  bss  This is only done when the  ROM memory model is used    4  Performs a C4x JACK instruction causing the VX8 to release in
192. ure  The functionality and behavior of a VX8 is completely  defined by its application software and its hardware configuration  The VX8  devices must be loaded with a DSP application before they become functional  instruments     Software Environment    Creating a VX8 application can be broken up into two interrelated tasks  Host software  development and DSP software development  The VX8 Support Software product gives  you both host and DSP routines to help you develop your application in less time  without the need of having detailed knowledge about the inner workings of the VX8   Figure 6 shows a high level view of the various components in the VX8 Software  environment     15    VX8 Carrier Board Programming Guide Spectrum Signal Processing    Host Application  VX8 Instrument Driver  Host software    1 0 Subsystem   SICL or VISA  Operating System    Software Overview    16    Interface Hardware  Host Controller    VXlbus Devices  VX8    C4x VX8 C4x  Application Library    Figure 6 VX8 Software Environment       3 1 1  Host Software Environment    There are many VXIbus host controllers and software configurations available from  manufacturers  Fortunately  developing VXIbus host applications on these development  platforms is greatly simplified by the standard I O library present in most VXIbus  systems     The I O library provides host software with an API  Application Program Interface  to  routines for VXIbus communications and control  The I O library provides numerous
193. us    8 bit user data transfer to A32 space on the  VXIbus    32 bit supervisory data transfer to A24 space on  the VXIbus    16 bit supervisory data transfer to A24 space on  the VXIbus    8 bit supervisory data transfer to A24 space on the  VXIbus    32 bit user data transfer to A24 space on the  VXIbus    16 bit user data transfer to A24 space on the  VXIbus    8 bit user data transfer to A24 space on the  VXIbus    16 bit supervisory data transfer to A16 space on  the VXIbus    8 bit supervisory data transfer to A16 space on the  VXIbus    16 bit user data transfer to A16 space on the  VXIbus    8 bit user data transfer to A16 space on the  VXIbus    107    VX8 Carrier Board Programming Guide Spectrum Signal Processing  VX8 C4x Support Software Functions    VX8_ReadAsyncReg    Function Reads a single memory location from an asynchronous register on the VX8 board   Include File vx8 h    Syntax UINT32 VX8_ReadAsyncReg  PVUINT32 src  UINT32 bitmask      Parameters src Volatile pointer to source address  Can be in the calling C4x s  local or global address space   bitmask Mask used for and ing with the result  A mask of 0x0000    0001 should be used to read bit DO     Returned Values result Contents of the source address  Accesses to the VXIbus  address space return a value of zero     Remarks Several registers  VSTATUS  A16 offset  A16 Control  could be modified by another  source at the same instant that a DSP reads them  As a result  they must be read twice  with the same 
194. was successfully closed   SSVX8_ERROR SYSTEMCLOSE_ FAILED The system did not successfully close     This function is only applicable to VISA VXIpnp applications     This function calls ssVX8_SystemClose to close the system referenced by the user   defined attribute of the vi session  The vi session is then closed     Part Number 500 00330  Revision 2 05    Spectrum Signal Processing VX8 Carrier Board Programming Guide    ssVX8_Deref    VX8 Instrument Driver Functions    Function  Include File    Syntax    Parameters    Returned Values    Remarks    Part Number 500 00330  Revision 2 05    Returns an open device session handle to the indicated VX8   vx8 h    RESULT SS FUNC ssVX8 Deref  SYSHANDLE VX8 System   STRING boardName  PPVOID boardHandle      VX8 System VX8 system handle    boardName Name of a VX8 device  boardHandle Pointer to storage for a device session handle  VI_SUCCESS The system was successfully    closed   SSVX8_ERROR_SYSTEM_STRUCT_UNINITIALIZED The system was uninitialized     SSVX8 ERROR NO SSVX8 FOUND The VX8 was not found in the  system structure        The returned handle can be used to directly call I O library routines in order to  communicate with the VX8 through its A32 slave interface     The syntax for boardName will differ depending on whether your I O library is SICL or  VISA  For SICL  the syntax will resemble    vxi 240     For VISA  the syntax will  resemble    VXI0  240  INST     Refer to the I O library documentation for the proper  resource des
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
Von Arx AG      Copyright © All rights reserved. 
   Failed to retrieve file