+ All Categories
Home > Documents > Introduction to Xilinx System Generator

Introduction to Xilinx System Generator

Date post: 30-Dec-2015
Category:
Upload: shruthig29111988
View: 53 times
Download: 6 times
Share this document with a friend
Description:
Xilinx system generator
Popular Tags:
69
Introduction to Xilinx System Generator
Transcript
Page 1: Introduction to Xilinx System Generator

Introduction to Xilinx System Generator

Page 2: Introduction to Xilinx System Generator

SimulinkoDeveloped by MathworksInc.oA Model-based design environment integrated

with Matlabo Provides various sets of block libraries to help you

create , simulate, and test a complicated system,including control system, communication, image processing, etc.

Introduction To Simulink And System Generator

Page 3: Introduction to Xilinx System Generator

System GeneratoroDeveloped by Xilinx Corp.o Provides device-optimized DSP block library for

Simulinko Let you model DSP algorithm, generate HDL code,

and verify FPGA designs for Xilinx devices in a intuitive and efficient way.

Page 4: Introduction to Xilinx System Generator

System Generator• Type Simulink at the MATLAB command prompt or

open the Simulink Library Browser by clicking the corresponding button in the MATLAB toolbar

Page 5: Introduction to Xilinx System Generator

Simulink Library Browser

Page 6: Introduction to Xilinx System Generator

Create a “new model” blank sheet by clicking the Create a new model button in the Simulink Library Browser

Page 7: Introduction to Xilinx System Generator

Example 1 To read and display an image

Page 8: Introduction to Xilinx System Generator

Go to Video and Image processing blocksets Sources

Image from file

Simulink Model

Page 9: Introduction to Xilinx System Generator
Page 10: Introduction to Xilinx System Generator

Go to Video and Image processing blocksets Sources

Image from file

Xilinx SysGen Model

Page 11: Introduction to Xilinx System Generator
Page 12: Introduction to Xilinx System Generator

• Reshape is an operator that is used to convert the dimensions.

• The parameter one dimensionality is chosen as 1-D array since the XSG accepts 1-D as the inputs.

Page 13: Introduction to Xilinx System Generator
Page 14: Introduction to Xilinx System Generator
Page 15: Introduction to Xilinx System Generator
Page 16: Introduction to Xilinx System Generator

• The number of bits is chosen as 8 since we are using a gray scale image.

• Quantization and overflow is kept as round and saturate by default.

Page 17: Introduction to Xilinx System Generator
Page 18: Introduction to Xilinx System Generator

• Buffer size:If an image of a X b is taken then the

buffer size should always be a*b.

Eg: 64X64 is the image size then buffer size must be 4096.

Page 19: Introduction to Xilinx System Generator

• Reshape:At the output the parameters of reshape operator must

be:oDimentionality: CustomiseoDimension: it must be 2D since we are converting

back to the original image. Hence specify the size of original image

Page 20: Introduction to Xilinx System Generator
Page 21: Introduction to Xilinx System Generator

SYSTEM GENERATOR TOKEN

Page 22: Introduction to Xilinx System Generator

SETTING THE STOP TIME• The run time/ stop time is always calculated as twice

the dimension of the matrix.• If the image is 64X64 then the stop time= 2*64*64.

Page 23: Introduction to Xilinx System Generator

Simulation

Page 24: Introduction to Xilinx System Generator

Stop time

Page 25: Introduction to Xilinx System Generator

• Using Matrix Viewer

Page 26: Introduction to Xilinx System Generator

•Workspace

Page 27: Introduction to Xilinx System Generator

Output using Workspace

• After simulation the “output” is seen in the workspace.

Page 28: Introduction to Xilinx System Generator

Output obtained is 1-D array.It has to be converted to 2-D array.

Page 29: Introduction to Xilinx System Generator

•Write the callback function in the editor window and link to the model

Page 30: Introduction to Xilinx System Generator

Output obtained

Page 31: Introduction to Xilinx System Generator

NOTE:-

In order to carry out processing on an image the modules have to be placed between gateway in and gateway out

Page 32: Introduction to Xilinx System Generator

Example 2 RGB to Gray Conversion

Page 33: Introduction to Xilinx System Generator

• Reading RGB Image

Page 34: Introduction to Xilinx System Generator

• Reading RGB Image

Page 35: Introduction to Xilinx System Generator

• Conversion of RGB to Gray Image I=0.29*R+0.59*G+0.11*B• Creating module for

conversion

Page 36: Introduction to Xilinx System Generator

• Creating module for conversion

Page 37: Introduction to Xilinx System Generator

• Implementation of RGB Equation

Page 38: Introduction to Xilinx System Generator

• RGB TO GRAY Conversion

Page 39: Introduction to Xilinx System Generator

• RGB TO GRAY Conversion Output from Matrix Viewer

Page 40: Introduction to Xilinx System Generator

• RGB TO GRAY Conversion Output from Workspace

Page 41: Introduction to Xilinx System Generator
Page 42: Introduction to Xilinx System Generator

• RGB TO GRAY Conversion Output from Workspace

Page 43: Introduction to Xilinx System Generator

Example 3 Filtering

Page 44: Introduction to Xilinx System Generator

• Filtering

• Reading an image

Page 45: Introduction to Xilinx System Generator

• Filtering module

Page 46: Introduction to Xilinx System Generator

• 5 x 5 Filter

Page 47: Introduction to Xilinx System Generator

• Filtering

Page 48: Introduction to Xilinx System Generator

• Set the Simulink System Period to 1/5 as 5*5 filter is used.

Page 49: Introduction to Xilinx System Generator

• Filtering Output from Matrix Viewer

Page 50: Introduction to Xilinx System Generator

• Filtering Output from Workspace

Page 51: Introduction to Xilinx System Generator

• Filtering Output from Workspace

Page 52: Introduction to Xilinx System Generator

Example 3 Enhancement

Page 53: Introduction to Xilinx System Generator

• Enhancement

• Reading an image

Page 54: Introduction to Xilinx System Generator

• Enhancement

Page 55: Introduction to Xilinx System Generator

• Enhancement Output from Matrix Viewer

Page 56: Introduction to Xilinx System Generator

• Enhancement Output from Workspace

Page 57: Introduction to Xilinx System Generator

• Enhancement Output from Workspace

Page 58: Introduction to Xilinx System Generator

Example 4 Negation

Page 59: Introduction to Xilinx System Generator

• Negation

• Reading an image

Page 60: Introduction to Xilinx System Generator

• Negation

Page 61: Introduction to Xilinx System Generator

• Negation Output from Matrix Viewer

Page 62: Introduction to Xilinx System Generator

• Negation Output from Workspace

Page 63: Introduction to Xilinx System Generator

• Negation Output from Workspace

Page 64: Introduction to Xilinx System Generator

Example 4 Binarization

Page 65: Introduction to Xilinx System Generator

• Binarization

• Reading an image

Page 66: Introduction to Xilinx System Generator

• Binarization

Page 67: Introduction to Xilinx System Generator

• Binarization Output from Matrix Viewer

Page 68: Introduction to Xilinx System Generator

• Binarization Output from Workspace

Page 69: Introduction to Xilinx System Generator

• Binarization Output from Workspace


Recommended