1 Revision history .............................................................................................................................. 2
2 Table of Contents ........................................................................................................................... 3
List of abbreviations................................................................................................................................. 6
3 List of figures................................................................................................................................... 6
The SMT6035 SDK provides you with an easy and efficient way to access
Sundance carrier boards. It allows you to control these boards from the host as
well as to exchange data between the carrier board and the host.
The SMT6035 is ideal for customers that wish to develop their own code to
interface with Sundance hardware.
Figure 1 - The SMT6035 interfaces to Sundance hardware
Figure 1 - shows the SMT6035 as a link between your application and the
Sundance carrier boards in your system. Having a standard interface such as
the SMT6035 ensures that you need no recompilation and can link your software
when the hardware in the system changes. The SMT6035 hides the details of
the device driver, allowing you to focus on development.
The SMT6035:
• Provides host side support for 3L Diamond board services.
• Shorten development time by providing you with a ready-to-use interface to
the hardware.
• Transfer data between the carrier board and the host.
• Gives you a basic building block for more complex systems.
• Provides you with direct access to the hardware registers of the carrier board.
• Provides you with a C++ type interface to the carrier board.
The SMT6035 currently supports the following carrier boards.
Carrier board Description Functionality
SMT300 1 TIM site Compact PCI carrier board Full support
SMT300Q 4 TIM site Compact PCI carrier board Full support
SMT310 1 TIM site PCI carrier board Full support
SMT310Q 4 TIM site PCI carrier board Full support
SMT130 PCI-104 TIM Carrier card Full support
SMT320 (Obsolete) 4 TIM site PCI carrier board Partial support
SMT327 (Obsolete) 4 TIM site Compact PCI carrier board Partial support
5 Conventions
UINT A 32 bit unsigned value (unsigned int)
DWORD 32 bit unsigned value (unsigned long)
Root TIM The TIM on site 1 of your carrier board
Root DSP The DSP on TIM site 1
6 Prerequisites
C++ is used for all software interfaces. Even if you are not familiar with C++, you
should be able to find your way by referring to the examples. They have been
compiled and tested with GCC C++ version 2.96, 3.2 and 4.1.
Debugging can be made through your preferred software (for example, with the
standard text-mode GNU GDB tool or with one of its GUI front-ends such as ddd,
kdbg or xxgdb).
Please refer to the README.pdf file included in the SMT6035 zip archive delivered
to you. That document includes full and detailed installation instructions, basic
system requirements and a Getting Started section about compiling the example
applications.
8 Hardware overview
You need to be aware of the assumptions the SMT6035 makes about hardware
resources. This section is a basic overview of the main hardware features
supported, and shows how the SMT6035 interacts with them. The carrier board
User Manual includes a more detailed description of the hardware.
CPLD (BAR 1)
Comport
IntD
PCI Bridge (BAR 0)
Comport
IntA
PCI
LINT (IIOF2)
Comport
IIOF1
IIOF2
IIOF0
Reset
The Bridge chip forms the link between the host and the DSP.
The mailbox registers are contained in the bridge chip.
TIM site 1
(Boot loader
supports
loading binary
files from
comport)
TIM site
2
TIM site
3
TIM site
4
Figure 2 - Overview of the hardware.
The figure above illustrates the main hardware concepts of a typical Sundance
carrier board.
8.1 Comport
A comport is a generic mechanism for transferring data between the
components of your system. Most TIMs have several comports that can be
used to connect to each other or to the host. These links are usually made with
FMS cables, but some boards have built-in connections that can be controlled
by carrier board registers; the User Manual for your board will describe these
registers in detail. The standard configuration will connect comport 3 on TIM site
1 to the host.
8.2 The CPLD
The CPLD is used to configure the carrier board. It allows you to select the
direction of signals on the carrier board, to select interrupt sources and to set
the routing of the IIOF lines. The CPLD registers are mapped onto BAR1 of the
PCI bridge chip. The carrier board User Manual includes additional information
about the CPLD.
8.3 State of the IIOF lines
The LINT (local interrupt) line on the global bus side of the PCI bridge chip can
be switched to any of the IIOF lines that go to the DSP.
The initial configuration of the IIOF lines is as follows:
Line Use or direction
IIOF0 Host to DSP
IIOF1 DSP to Host
IIOF2 Used internally by the SMT6035 to signal mailbox interrupts
to the DSP.
Table 1 - Initial state of the IIOF lines when the SMT6035 starts up.
8.4 The PCI bridge chip
The bridge chip represents the link between the host and the carrier board; it
connects the local bus on the carrier board with the PCI bus of the host.
Specific openings are provided to act like windows through which the local bus
can access data on the PCI bus.
The internal PCI bridge registers are mapped onto BAR0, allowing access by
both the local bus (DSP side) and the PCI bus (host side). Contained in the
bridge chip are the 16 x 8-bit mailbox registers (Section 14).
The bridge chip provides a local bus interrupt line (LINT) as well as a PCI bus
interrupt line (IntA). These interrupt lines allow the host side to interrupt the DSP
and vice versa.
More information about the bridge chip can be found at
The software implementation has a C++ style interface, which provides pointers
to the hardware.
libsmtdrv.so exports functions that gather information about the installed boards
and provide interface pointers for later use.
To use the SMT6035, you have to:
• Obtain an interface pointer to the hardware by calling SmtOpenBoard().
• Use the interface pointer to call functions related to the hardware.
Example:
IFHw *pBoard = SmtOpenBoard(0); // open the first board found
pBoard->ResetTIMs();
pBoard->BinaryLoad("MyFile.app");
10 Functions exported by libsmtdrv.so
This section describes each of the functions exported by Libsmtdrv.so. These
functions are described in the header file SmtDrv.h.
10.1 SmtOpen
Initialize the SMT6035 library. Applications must call this function before using
any other features of the library.
Prototype
SMTRet SmtOpen( void );
Return value
The function returns SMT_OK on successful completion; other return values
indicate failure. SmtGetError() can be used to translate error values into
descriptive strings.
Returns the number of Sundance carrier boards found in the system.
Prototype
DWORD SmtGetBoardCount(void);
Return value
The number of Sundance carrier boards found in the system.
10.3 SmtOpenBoard
Obtains an interface to a Sundance carrier board.
Prototype
IFHw * SmtOpenBoard( UINT nIndex );
Parameters
nIndex The zero-based index of the carrier board. nIndex should
be in the range 0 <= nIndex < GetBoardCount().
Return value
The return value is an interface of type IFHw that can be used to access the
carrier board. Please refer to section 11 for a description of the functions
provided by this interface. NULL (0) is returned on error.
10.4 SmtCloseBoard
Closes an interface to a board. You must not use the interface pointer after
calling SmtCloseBoard().
Prototype
void SmtCloseBoard( UINT nBoard );
Parameters
nBoard The index of the board that should be closed. nIndex
should be in the range 0 <= nIndex < GetBoardCount().