Significant advances in programming have been made over the last thirty years, with technologies such as structured programming, object-oriented programming, Booch object-oriented design, etc. Even with these advances, customers want faster, cheaper and easier-to-use code because as systems become larger and more complex, the scale and complexity problem continues to grow.
Subject-oriented software development is new technology that addresses these concerns. Using subject-oriented programming (SOP), programs are modularized using "aspects." These aspects can be methods, properties, relationships and other attributes that characterize, collectively, each particular object. In OOP, these objects can contain redundant inheritance information. In SOP, an aspect is described only once. The reduced description is expressed in an aspect description language.
SOP is an abstract concept so the biggest challenge facing it is to change human nature! Programmers have a level of comfort and intellectual investment in their training, which is understandable. However, being open minded to a new way of thinking about development overcomes one major obstacle facing all programmers: the language drives the process. With SOP, programmers have the freedom to make changes without factoring in restrictions imposed by the language.
We have applied subject-oriented programming to DSP-based code development.
Data acquisition for real-time applications on a DSP board is an engineering challenge. Currently DSP engineers can take up to one and a half years to develop a Visual C++ program. End users with limited programming skills cannot take advantage of the strength of DSP functionality, while DSP programmers cannot satisfy the time-to-market requirements of their customers.
Data Translation has resolved this dilemma by creating its own DSP subject-oriented software development system. This system lets users access sophisticated DSP algorithms from the standard Windows world. This means that users without in-depth DSP programming knowledge can access the power of real-time DSP. This system is based on two major components - a subject-oriented DSP operating system and a patent-pending Windows-based rapid software development system. The subject-oriented DSP software development system uses techniques of aspect-oriented programming and gives maximum flexibility because of its purely task-based orientation. A user does not have to have programming skills. The system simply uses standard Windows drag and drop mechanisms. One graphical user interface can be used to develop Windows and DSP applications.
The DSP subject-oriented development system can be used for real-time application development. This approach combines the minimum learning curve for Windows-based software development with the maximum performance of precompiled and optimized code for a DSP board. It also reduces time-to-market, because there is no need for code debugging. This method also uses Windows standard configurations which maximize its use in many different types of applications.
We define subject-oriented programming as purely problem-oriented. The solution itself stands in the center of interest. In SOP, a programmer expresses a system's aspects of concern (i.e. describes them) and then combines them in a final executable form. Aspects of concern may be what objects do, where they are located, how they communicate and how they are synchronized.
The Windows-based software development system is the interface to the DSP operating system. It browses the catalog of available DSP functions located on the DSP, using the standard communication format of eXtensible Markup Language (XML) then creates representative function panels for each component of the DSP library, which appear as standard panels in the graphical user interface.
When a function panel is opened on the interface, a generic property page is created which lets the user set up the properties of that specific function using property editors. Once these property pages are configured with values and parameters, the file is saved in memory on the host. The memory block is sent to the DSP in a stream.
The Windows-based software provides a special container panel, DSP Task. Each instance of this panel represents a separate DSP task .
A panel can be a data source, control source or event source that allows the software to interact with the DSP task (DSP function panels can be configured and connected together but carry no PC code functionality.) Data channels are the normal data transportation mechanisms used to transfer data from the hardware (data source) to a panel on the desktop. Data channels consist of real channels (physical channels), such as those on a data acquisition board, and mathematical channels (channels that have been created by combining two or more real channels). Control sources are a set of panel properties and actions that the user can control. Events allow the user to react to a change in the application.
After putting all DSP functions on the container and configuring them, an aspect interaction file (AIL) file is created.
Developed by Data Translation and based on the concepts of AOP1, aspect-oriented language (AIL) is a patent-pending description language. It describes the behavior, appearance and connections of aspects and is used to store/save the descriptions of the aspects of the program. AIL is not a programming language - it does not become interpreted or compiled. It is only a description.
The AIL contains information that describes the task such as process ID, used pipes and variables, needed resources, used function objects and their properties, interconnection between function objects and memory consumption. The AIL file generated on the host interface is sent to the DSP system and the aspect interaction language parses that file and translates its contents to a DSP readable form.
The AIR (aspect interaction run-time) command processor receives the AIL file and compiles it to an aspect structure. Once the AIR command processor receives an AIL file, the following are checked:
if the process ID already exists, the old task is terminated and removed memory checks as needed
resources needs are checked
resources are allocated
pipes and variables are allocated
Function objects are now created and their properties are set. After all the objects have been created, they have been interconnected. (If an error has occurred, the task is removed with all of its pipes and resources and an error message is sent). The task is ready to run now.
The DSP operating system is loaded via the USB 2.0 interface of the hardware platform and consists of the following parts:
Resource Manager that manages allocation of board's hardware resources (A/D, D/A, counter/timer, digital I/O)
Command processor translates incoming AIL
Instrumentation capabilities such as monitors, CPU, data traffic, etc.
Function libraries (e.g. digital filters, FFT, etc.)
Each component of the target DSP has an entry in the XML-based description catalog of the function libraries. This standard flat file format describes the component's behavior, its relation to other components and its parameters.
Andreas Randow is Vice President of Technology at Data Translation, Inc. (Marlboro, MA)