12.07.2015 Views

Tutorial for the Semi Custom Part of the Image Processing System

Tutorial for the Semi Custom Part of the Image Processing System

Tutorial for the Semi Custom Part of the Image Processing System

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

eset = 0START PIXELframe start = 1 ∧ video clock = 1READ HISTOGRAMpixel count ≥ WIDTH · HEIGHTWAIT RAMvideo clock = 1WRITE HISTOGRAMpixel count < WIDTH · HEIGHTREAD PIXELStateSTART_PIXELREAD_PIXELREAD_HISTOGRAMWAIT_RAMWRITE_HISTOGRAMDescriptionWait <strong>for</strong> first frame pixel, read its value, and answer requests <strong>for</strong> histogram entriesWait <strong>for</strong> next pixel and read its valueRead <strong>the</strong> histogram entry corresponding to current pixelWait <strong>for</strong> RAM to complete <strong>the</strong> read requestWrite back <strong>the</strong> incremented histogram entry corresponding to <strong>the</strong> current pixelFigure 1: State diagram <strong>of</strong> <strong>the</strong> histogram calculation blockThe single port RAM is private to <strong>the</strong> syn<strong>the</strong>sisable histogram calculation block, which also governsexternal accesses to <strong>the</strong> RAM. There<strong>for</strong>e, both blocks will be encapsulated into a histogram topblock (Listing 3).The second task is to create <strong>the</strong> testbench <strong>for</strong> <strong>the</strong> histogram top block. The testing approach is similarto <strong>the</strong> one used <strong>for</strong> <strong>the</strong> single port RAM (Listing 2). The testbench shall feed <strong>the</strong> histogram block after<strong>the</strong> reset with a random video signal, from which it calculates in parallel <strong>the</strong> histogram. After <strong>the</strong> blocksignals that it finished <strong>the</strong> calculation <strong>of</strong> <strong>the</strong> histogram <strong>for</strong> <strong>the</strong> current frame, <strong>the</strong> histogram shall be readout and compared with <strong>the</strong> histogram calculated by <strong>the</strong> testbench. If <strong>the</strong>re are discrepancies, an errormessage shall be generated by <strong>the</strong> simulator.3.2. Session 2: Syn<strong>the</strong>sis <strong>of</strong> <strong>the</strong> Gate-Level Netlist <strong>of</strong> <strong>the</strong> Histogram BlockThe Syn<strong>the</strong>sis <strong>of</strong> <strong>the</strong> gate-level netlist from <strong>the</strong> VHDL RTL model <strong>of</strong> <strong>the</strong> histogram block will be doneaccording to <strong>the</strong> description in Vachoux [5], Chapter 3 using Synopsys Design Vision. A Tcl scriptSYN/BIN/histogram_syn.tcl (Listing 4, downloadable from <strong>the</strong> Moodle site) can be used to automatise<strong>the</strong> syn<strong>the</strong>sis <strong>for</strong> different constraints. To run <strong>the</strong> Tcl script, execute <strong>the</strong> following command in a Unix shellfrom <strong>the</strong> IPS/ project directory:vlsi2_semi_custom_tutorial.tex Rev: 3, March 27, 2007 5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!