The Diamond Model

Top  Previous  Next

The Diamond model for parallel processing closely follows the abstract model, but with some additions and relaxations.

 

When you write an application using Diamond you do three things. First, you break your application into a number of independent tasks. This is not something that can be done automatically, but often falls out naturally from the way many developers start to think about a problem by sketching a block diagram.

 

Tasks correspond to the processes of the abstract model. A task is just a complete C program, or a section of VHDL code, that can communicate with other tasks. Communication involves one task transmitting a block of words (a message) over a channel to another task. The size and structure of each message is completely under your control.

 

 

You can now write your tasks as independent C or VHDL programs and describe how they are connected together with channels. So far you will note that we have said nothing about any processors on which the tasks are to be executed.

 

Second, you describe the hardware you want to use in terms of named processors and wires connecting them. A processor can be a DSP, and FPGA, or a GPP and a wire forms a connection between links, the hardware communication devices provided by the processors.

 

 

The third and final thing you do is to map the software description of tasks and channels onto the hardware description of processors and wires by describing how tasks are to be placed onto processors. You must have a compiled form of each task appropriate to the sort of processor on which you place it. In the example below, ProcessImage must have been built for an FPGA and all the other tasks must have been built for DSPs.

 

 

Once you have described these three things: the software, the hardware, and the mapping between them, Diamond can build your application and automatically determine many things. For example, it chooses how to implement your channels on the wires that you have mentioned.  This is invisible to your code, so the function you use in task Control to send a message to the FPGA task ProcessImage is the same function that it uses to send a message to the DSP tasks GetImage or DisplayImage.

 

The hardware and software structures in a Diamond application are static; they cannot change at run-time. This allows Diamond to make many optimizations and ensure that the communication between tasks is implemented as efficiently as possible. Often the communication reduces to simple calls to the underlying hardware with no extra protocol being required. A typical transfer involves the message being passed to a DMA engine which manages moving the component words between memory and the appropriate hardware link device.