![]() Visual C/C++ GUI interface to DSP board examples shown above. |
![]() MATLAB interface to DSP board example shown above. |
DirectDSP®
Overview
Technical Description
Low-Level Functions
High-Level Functions
Example Programs (C/C++, MATLAB, and Visual Basic programs that call DirectDSP®
Include Files
Product Description
Linux Support
DSK C6711 High-Speed Data Transfer
Overview
DirectDSP®; is a library and software package supporting Linux and Windows which offers an interface to off-the-shelf DSP/acquisition hardware for user-defined C/C++, Visual Basic, and MATLAB® programs. Low-level functions include board control, block memory transfers, DSP executable file download, etc. High-level functions include data acquisition, waveform record/playback, signal synthesis, stimulus & response measurement, and DSP/math functions. The main objectives of DirectDSP are:- Provide higher performance communication and data transfer to/from DSP code than is possible with JTAG or other JTAG-based solutions, such as RTDX
- Support standard, popular development environments such as Visual Studio, .NET, and MATLAB
- Abstract DSP hardware drivers to allow a wide range of OS (Win2K, Linux, Win9x) and wide range of boards (C5xxx, C6xxx, DSK, EVM, off-the-shelf vendor, etc)
- Provide "algorithm level" debug capability: allow developers to work with real-time data buffers and streams in an event-driven environment, using single-step, breakpoint, and register level debug level only when necessary
- Enable host GUI development (i.e. connect GUI controls and displays to DSP code variables and buffers) for production applications and systems
Technical Description
DirectDSP allows Linux, Visual Studio, .NET, and MATLAB software applications to interface directly to DSP hardware and real-time DSP code. DirectDSP software is an intermediate layer, or library. On its API side DirectDSP software presents a well-documented, consistent series of function calls to C/C++, Visual Basic, and MATLAB programs. On its driver side DirectDSP software interfaces with Win9x, Win2K, or Linux drivers that allow ISA bus, PCI bus, or parallel port access directly to various DSP boards. At the hardware level, typically the HPI (host port interface) peripheral on the DSP device(s) is used to connect the host bus to the DSP and its onchip resources, via circuitry and logic on the DSP board. The software architecture looks something like this (click for larger picture):
Following are some examples of functionality provided or allowed by DirectDSP software API calls and its underlying driver interface:
- Access onchip DSP memory, offchip board memory, and registers or FIFOs contained in data acquisition and control modules, telecom modules, and other board peripheral I/O devices
- Download DSP code in COFF file format, as created by Texas Instruments CCS development tools
- Start, stop, and otherwise control DSP processors and installed modules
- Allow host and GUI application software to "see" DSP software data objects without stopping or pausing the DSP processor
- Monitor data and parameters set by DSP code in real-time; for example update graphical displays, gauges, meters, text displays
- Set properties in DSP SCI (Source Code Interface) framework, for instance sampling rate, number of channels, real-time buffer sizes, etc
Low-Level Functions
Below is a summary of low-level functions in the DirectDSP:- DSP device control (start, stop, hold, etc.)
- onboard register and digital I/O access
- onboard memory access, using the means supported by the board architecture, such as DSP host port, dual-port memory, address counters, etc.
- download of DSP program files (for example, COFF format used by many DSP chip vendors)
- board initialization; verify that board is installed and responding correctly
- sampling rate calculation using desired rate value as input, with both actual sampling rate and control register word as return values
- get symbol address; get run-time physical address of symbol in DSP C/asm code (e.g. variable, array, buffer, pointer, etc.)
High-Level Functions
Below is a summary of high-level functions in the DirectDSP:- Waveform file acquisition. Parameters include sampling rate, channel list, gain list, trigger criteria, loopback mode, channel interleave/split file creation, digital scale and offset, and more.
- Waveform file generation. Parameters include sampling rate, channel list, attenuation list, end-of-waveform mode control, starting sample, digital scale and offset, and more.
- Stimulus and response measurement. Parameters are similar to waveform acquisition, with the addition of an output stimulus filename.
- DSP Engine function execution. If a Hypersignal or MATLAB package is being used as a DSP Engine, functions in these packages can be executed from the calling C/C++ or Visual Basic program.
Example Programs
Several example programs are included with the DirectDSP software package. These programs include working. EXEs, which are installed as icons, C/C++, MATLAB, or Visual Basic source code files, and example project files for Borland C/C++ 3.1 and 4.5, Microsoft Visual C/C++ 1.5, and WATCOM C/C++ 10.0.- C/C++ Digital Oscilloscope (click here to see excerpts from dscope.cpp source code example file)
- C/C++ Digital Tape Recorder (click here to see excerpts from dtape.cpp source code example file)
- C/C++ Strip-Chart Recorder (click here to see excerpts from strip.cpp source code example file)
- C/C++ DSP Board Debugger
- C/C++ Spectrum Analyzer
- MATLAB Acquire Waveform File Example (click here to see excerpts from m_examp1.m source code example file)
- MATLAB Analog Input Buffer Example (click here to see excerpts from m_examp2.m source code example file)
- Visual Basic Digital Oscilloscope (click here to see excerpts from dscope.bas source code example file)
- MFC (Microsoft Foundation Class) Example (click here to see excerpts from MFC source code example file)



