Research Article
Experiencing a Problem-Based Learning Approach for Teaching Reconfigurable Architecture Design
Algorithm 4
Code example for the moving window unit (simplified version without initialization and border management).
macro proc movingWindowUnit | (pixelInChan, pixelsOutChan) | unsigned 8 pixels[], pixelIn; | while(1) | parin parallel | receiving a pixel | pixelInChan ? pixelIn; | storing the last received pixel | pixels[] = pixelIn; | shifting the memory values | par( = 1; ; ++) | pixels[] = pixels[]; | sending the neighborhood | par( = 0; 3 ; ++) | par | pixelsOutChan[] ! pixels[]; | pixelsOutChan[] ! pixels[]; | pixelsOutChan[] ! pixels[]; | |
|