9 | | This mono-processor application read a stream of images (128 lines * 128 pixels / 1 byte per pixel), from a file on a FAT32 disk controller, and display it interactively on the frame buffer. The ''images.raw'' file available in the application directory contains 20 images. This application can be used to test peripherals such as block devices, frame buffer, and dynamic allocation of TTY terminals. |
| 10 | This single thread application illustrates the use of the CMA (chained Buffer DMA) peripheral to display a stream of images. |
| 11 | The application read a stream of images from the ''/misc/images_128.ram'' file, |
| 12 | stored on a FAT32 disk controller. It displays the stream of images on the FBF (graphical display) peripheral. The ''images_128.raw'' contains 20 images : 128 lines * 128 pixels / 1 byte per pixel. |
13 | | The source code can be found [source:soft/giet_vm/applications/display/main.c here]. |
| 16 | The source code can be found [source:soft/giet_vm/applications/display/display.c here], and the mapping directives are defined [source:soft/giet_vm/applications/display/display.py here]. |
| 17 | |
| 18 | == __Coproc__ == |
| 19 | |
| 20 | This single thread application illustrates the use of multi-channels hardware accelerators by an user application. |
| 21 | The hardware coprocessor must be connected to the system by a ''vci_mwmr_dma'' component. |
| 22 | In this application, the coprocessor makes the Greater Common Divider computation between two vectors |
| 23 | of randomly generated 32 bits integers. The vector size is a parameter. |
| 24 | |
| 25 | It requires one private TTY terminal. |
| 26 | |
| 27 | The source code can be found [source:soft/giet_vm/applications/display/coproc.c here], and the mapping directives are defined [source:soft/giet_vm/applications/display/coproc.py here]. |
17 | | This multi-threaded application read a stream of images (128 lines * 128 pixels), transpose it (X <-> Y), and display it on the frame buffer. |
18 | | It can run on a multi-processors, multi-clusters architecture, with one thread per processor. |
19 | | The input and output buffers containing the image are distributed in all clusters. |
| 31 | This multi-threaded application is typical of parallelism that can be exploited in low-level image processing. |
| 32 | It can run on a multi-processors, multi-clusters architecture, with one thread per processor core. |
| 33 | The total number of threads depends on the hardware architecture, and is computed as ( x_size * y_size * nprocs ) . The main() function is executed by the thread running on P[0,0,0]. All others threads are executing the execute() function. Each execute() function is handling (image_size / nthreads) lines. |
21 | | The number of clusters must be a power of 2 no larger than 32. |
| 35 | This application ask the user to enter the name of a file containing an image stored on the FAT32 disk, check that the selected image fit the frame buffer size, transpose the image (X <-> Y), display the result on the graphical display, and save the transposed image to the FAT32 disk. |
| 36 | |
| 37 | The main() function is executed by the thread running on P[0,0,0], all others threads are executing the execute() function. Each execute() function is handling (image_size / nthreads) lines. The input and output buffers containing the source and transposed images are allocated from the user heap distributed in all clusters. Therefore, the data read are mostly local, but the data write are mostly remote. |
| 38 | |
| 39 | The number of clusters must be a power of 2 no larger than 256. |
32 | | The source code can be found [source:soft/giet_vm/applications/convol/main.c here]. |
| 48 | This multi-threaded application is a typical medical image processing application. |
| 49 | It implements a 2D convolution product, that can run on a multi-processors, multi-clusters architecture, with one thread |
| 50 | per processor. The image size is 1024 * 1024 pixels, 2 bytes per pixel. It has been provided by Philips, and is stored |
| 51 | on the FAT32 disk in ''/misc/philips_image_1024.raw''. |
| 52 | The convolution kernel is [201]*[35] pixels, but it can be factored in two independant line and column convolution products, |
| 53 | requiring an intermediate image transposition. |
| 54 | The five buffers containing the image are distributed in all clusters. |
| 55 | |
| 56 | The main() function can be executed on any processor P[x,y,p]. |
| 57 | It makes the initialisations, launch (N-1) threads to run the execute() function on the (N-1) other processors than P[x,y,p], call himself the execute() function, and finally call the instrument() function to display instrumentation results |
| 58 | when the parallel execution is completed. |
| 59 | |
| 60 | The number of clusters containing processors must be power of 2 no larger than 256. |
| 61 | The number of processors per cluster must be power of 2 no larger than 8. |
| 62 | |
| 63 | It requires one TTY terminal, shared by all threads. |
| 64 | |
| 65 | The source code can be found [source:soft/giet_vm/applications/convol/convol.c here], and the mapping is defined [source:soft/giet_vm/applications/transpose/transpose.py here]. |