System Generator

From Cpre584
Jump to navigation Jump to search

General

System Generator tool installed in 2041 (Windows Machine in the back). Should be installed in 2042 soon. Can anyone confirm this?
-System Generator is now installed in 2042 on all of the computers and it now works with the version of Matlab installed.

Very slow initalization

Note: The first time you open the system generator block, it will take about 5 minutes. After that it should open as normal until matlab is restarted. Note: On the computers in 2042 it takes at least one minute to initialize each Xilinx block in your design when you click the play button. Everytime you click the play button it must start the initialization process over even if no changes are made. When it is initializing each block, the computer is hardly doing any work. Maybe caused by the remote server or license server?

Documentation

Setup and Configuration

Sobel Project

Sobel c source code
In order to implement the Sobel algorithm we chose to stream the data in pixel by pixel through a large shift register that had access to the 9 pixels needed for the matrix multiplication. The multiplying window remained fixed and the pixels shifted through the window. In this way, after enough pixels had been shifted into the system, a shift then multiply would occur pushing one pixel out at each step. Further improvements could be done by adding multiple multiplication windows.

SystemGenerator_ReadImage.m

SystemGenertor_WriteImage.m

First a picture was read into the workspace. A small script converted it into a 2x(width*height) array where the first row was time values going from 1 to (width*height) and the second row was the pixel values corresponding to the image read in.

The top level diagram shows the interconnection of our modules. Everything inside of the Xilinx gateways is meant for going on the board. The two major sub blocks are the Shifter block and the Multiplier block. The constants feeding into the Multiplier block are for performing the edge detection but they could be changed to implement a different filter. The Shifter block contains three registers followed by a long shift register that can hold the width of the picture minus 3. This set is followed by two more. All of these are chained together so that the incoming pixel must flow through the whole chain, but the registers allow for intermediate access as the pixel flows through the registers. These intermediate values are brought out of the Shifter block as outputs and then go into the Multiplier block as inputs. These 9 intermediate values make up the matrix multiplication window. The Multiplier block then takes the 9 values and the constants, multiplies then and sums them to produce a single output value that is shifted out of the system as the output pixel.

The output pixels were stored in the workspace and a similar script as the one that read the values in, converted them back to an image. The system worked very well and after taking a very long time to initialize each block, the simulation ran in about 30 seconds for a 640X480 image.


File:SystemGenerator toplevel.jpg
Top Level Block Diagram
File:SystemGenerator shifter.jpg
Shifter Block
File:SystemGenerator multiplier.jpg
Multiplier Block


Using this design, the input and output images can be seen below.

File:SystemGenerator lena512.JPG
Input Image
File:SystemGenerator LenaEdge.jpg
Output Image