User-friendly stylus and video surface CAD systemOverviewPosition detectorSlide 4Slide 5Slide 6Command HandlerBlock DiagramScreen MappingCommand RouterExample: Line-drawing FSMStorage of objectsSnappingVideo DisplayImplementation of Video DisplayMilestonesUser-friendly stylus and video surface CAD system Jeremy SchwartzPaul PeelingFaraz AhmadOverviewPositiondetectorCommandHandlerVideoDisplayPosition detectorTasks• Take a camera image as input• Filter camera image for green blob This step to be done on the fly!• At end of each frame, calculate centroid of green blob• Output stylus position (x, y)Position detectorBlock Diagram•Only record the points that register as ‘green’Throw everything else away•Do this on the fly…we must pipeline!Video Input FSMGlobal clockVideo inputVideo processingunit (tracks pixel location, outputsLuminosity informationFilter value register(either chromiticity or luminosity)Asynchronous comparatorDividerOutput registerGlobal resetZZXYXLEZ represents width of information about one pixelY represents height of screen (in pixels)X represents width of screen (in pixels)StyluspositionPass pulseXDivider enable,# of passed pointsFrame donepipeline registerYYAccumulatorenableX totalY totalenableregisterWAIT FOR PASSACCUMULATEAccum_enable = 1Increment # of passed pointsDivideDivide enable = 1REGISTER OUTPUTOutput register LE = 1RESET# of passed points = 0IDLEPass pulse = 1Pass pulse = 0alwaysFrame done = 0Frame done= 1alwaysalwaysState Transition Diagram For Video Input FSMFrame start = 1Frame start = 0Command Handler•Screen position and button click input•Maps the screen position to either a drawing area position, or a menu / toolbar command•Major/Minor FSM structure controls flow of drawing algorithms•Output to a frame buffer containing information about the objects•Frame buffer decoded into RGBFunction buttonSynchronizerPositionX [9:0] Y [8:0]clickScreen MapCommand [3:0]Command Router & Mode registerDisplay_flushnext busyDraw_rectnext busy…next busyControl [1:0]Address [20:0]Data [17:0]Command [4:0]External SRAMQ (out) [17:0]Control [1:0]Address [18:0]D (in) [17:0]Frame buffer data [17:0]Display_readyDisplay_busyAddress [20:0]Control [1:0]Position address [18:0]SnapperDecoderSnap position [18:0](from commandmodules)BlockDiagramScreen MappingDrawing area(x,y)MenuToolsCommand Router•Stores the current state of a drawing operation (e.g. got_centre_of_circle) in the mode register.•Uses ‘next’ signals to tell the minor FSMs to complete the next operation given the new position information from the input•‘Next’ and ‘busy’ signals are muxed to result in simple command-independent structureExample: Line-drawing FSMGet start pointIdleGet end pointSwap points?Calculate octantVertical line Horizontal line Angled lineBresenham’s AlgorithmStorage of objectsZBT SRAM storage: 19 address lines, 36 data linesAddress: X coord [9:0] Y coord [8:0]640x480 resolution frame bufferData: object identifiers and informationSimplifiedRGBIdent. Type Ident. Type Ident. TypeTo video displaythrough decoderAlso stored in a lookup tablefor easy access to related objects,e.g. the other end of a lineSnapping•Snapping to grid, other objects etc.PositionsnapSNAP FSMsnap_posnextbusyVideo DisplayThe objectives for the Video Display are:•Display Command Toolbar•Display Drawing Image•Be able to superimpose this onto a backgroundImplementation of Video DisplayMilestonesApril 26 Point drawing (to SRAM) Camera inputApril 29 Lines, circles, polygonsB&W displayMay 2 SnappingCommand & Video integrationMay 6 Pointer inputColor displayMay 9 Deletion & MovementSystem
View Full Document