TXT OVERLAY Text Overlay Module Rev. 1.6 Key Design Features Block Diagram reset Synthesizable, technology independent IP Core for FPGA and ASIC I2C / SPI / UART I/F txt top x 12 (Optional Extra) txt top y Supplied as human readable VHDL (or Verilog) source code 12 txt bot x 12 24 24 txt bot y 12 Text overlays (On Screen Display) over real-time video txt shift x 12 1-bit txt shift y 8 x 16 12 col pixel col 16 x 32 24-bit RGB pixels supported as standard - other formats (e.g. 32 x 64 clp top x 64 x 32 12 char YCbCr 4:2:2) supported on request row clp top y CHARACTER 12 row CHARACTER 8 BITMAP clp bot x BUFFER pixout (RGB) 12 ROM 24 clp bot y pixout vsync Character buffer maps directly to the display 12 pixout hsync pixin (RGB) 24 pixout val pixin vsync No external memory or frame buffer required pixout rdy pixin hsync source pixel + pixin val syncs Supports all video resolutions up to 4096 x 4096 pixels pixin rdy clk Programmable text-box position and size PIXEL PIPELINE Programmable clip-box (clip-plane) region Independent horizontal and vertical scrolling Programmable foreground and background colours Figure 1: Text overlay module architecture Programmable 8-bit alpha transparency Three sizes of text: 8x16, 16x32 or 32x64 Generic Parameters Normal or highlighted text Generic name Description Type Valid Range Used-defined ROM supports different fonts, characters and custom bitmap graphics text size Text size selection integer 0: small (8x16) 1: medium (16x32) Ships with four pre-defined character sets 2: large (32x64) use alpha Enable/disable boolean True / False No complex programming required alpha-blend support Optional I2C, SPI or UART interfaces for simple programming pixels per line No. of pixels in each integer < 4096 via micro-processor or micro-controller input video line lines per frame No. of lines in each integer < 4096 Applications input video frame Digital TV and home-media solutions General Description Interactive guides, menus, tables, lists, video games etc. The TXT OVERLAY IP Core is a highly versatile On Screen Display Terminal and Console windows (OSD) module that allows text and bitmap graphics to be inserted over RGB video. The module supports a wide range of text effects and the Animated text and graphics including hardware sprites, mouse programming interface is very simple. Text is written to a 64x32 character pointers and cursors buffer which is mapped (via a bitmap ROM) directly to the display. Window movement in the same manner as a 2D BitBlt The characters in the buffer are displayed in a text-box which may be positioned anywhere in the video display area. Bitmaps for each Scrolling text and moving wrap-around banner displays character are stored in a ROM which may be modified to support different font styles or bitmap graphics. Instrumentation and monitoring applications including animated gauges, charts, dials, meters, counters etc. Pixels and syncs flow in and out of the overlay module in accordance with the valid-ready pipeline protocol. Pixels are sampled at the module inputs Low cost text and graphics applications on a rising clock-edge when pixin val and pixin rdy are both high. Likewise, pixels are transferred out of the module on a rising clock-edge when pixout val is high and pixout rdy is high. The pipeline protocol allows both input and output interfaces to be stalled independently if necessary. Any number of text overlay modules may be cascaded in series. By placing more than one overlay module together, the user is able to achieve more complex text and 2D effects. Copyright 2015 www.zipcores.com Download this VHDL Core Page 1 of 8 pixels per line INPUT PIXEL BUFFER / ADDRESS GENERATOR lines per frame char en char we char wdata char col addr char row addr char rdata ROM ADDR GENERATOR text size use alpha txt box alpha PIXEL BLENDING UNIT txt fgnd col txt box mode txt bgnd colTXT OVERLAY Text Overlay Module Rev. 1.6 Input pixel buffer / Address generator Pin-out Description Source video pixels are sampled at the input pixel buffer. The generic Pin name I/O Description Active state parameters pixels per line and lines per frame must be set correctly to match the exact number of pixels in the x and y dimensions of the input clk in Synchronous clock rising edge video. reset in Asynchronous reset low The main function of the input pixel buffer is to handle the valid-ready flow txt fgnd col 23:0 in Text foreground colour as data control and to to generate the column and row addresses into the 24-bit RGB character buffer RAM. The circuit also detects whether the current pixel txt bgnd col 23:0 in Text background colour as data lies within the text-box region defined by the parameters txt top x, 24-bit RGB txt top y, txt bot x and txt bot y. If the current pixel lies outside the text-box region, the input pixel passes though unchanged. If the pixel lies txt box alpha 7:0 in Alpha transparency of text data inside the text-box, then the pixel is processed in the text overlay pipeline. box region As well as the text-box, the user may also specify a clip-box region. The txt box mode in Text background fill enable data clip-box is defined by the generic parameters clp top x, clp top y, 0 = unfilled, 1 = filled clp bot x and clp bot y. Only the areas of the text-box that lie within the txt top x 11:0 in Top-left x position of textbox data clip-box boundaries will be displayed. Use of the clip-box gives an extra level of control, permitting the user to dynamically bring various areas of txt top y 11:0 in Top-left y-position of textbox data the text-box into view. txt bot x 11:0 in Bottom-right x position of data textbox One final feature of the address generator is the implementation of a vertical or horizontal shift of the text in the text-box region. The desired txt bot y 11:0 in Bottom-right y position of data shift in pixels is specified in the txt shift x and txt shift y parameters. textbox Applying a shift is useful for scrolling text and moving banner displays. txt shift x 11:0 in Horizontal shift in pixels data All address generator parameters may be updated on-the-fly . If these txt shift y 11:0 in Vertical shift in pixels data parameters are not static, then it is desirable that they be updated simultaneously and once per frame in order to avoid corruption in the clp top x 11:0 in Top-left x position of clipbox data output video. Figure 2 shows the relationship between the input video clp top y 11:0 in Top-left y-position of clipbox data display area, the text-box region and the clip-box. clp bot x 11:0 in Bottom-right x position of data clipbox Display origin Display top-right position clp bot y 11:0 in Bottom-right y position of data (0, 0) (pixels per line, 0) clipbox char en in Character buffer enable high Text-box top-left position Clip-box top-left (txt top x, txt top y) char we in Character buffer write high position enable (clp top x, clp top y) D a t e : 0 4 / 0 7 / 0 9 char wdata 7:0 in Character buffer write data data T i m e : 0 6 : 5 5 : 3 7 char col addr 5:0 in Character buffer column data address Text-box bottom-right char row addr 4:0 in Character buffer row data position (txt bot x, txt bot y) address char rdata 7:0 out Character buffer read data data Clip-box bottom-right position (clp bot x, clp bot y) pixin 23:0 in 24-bit RGB source pixel in data pixin vsync in Vertical sync in high (signifies start of frame) Display bottom-left position Display bottom-right position pixin hsync in Horizontal sync in high (0, lines per frame) (pixels per line, lines per frame) (signifies start of line) pixin val in Input pixel valid high pixin rdy out Ready to accept input pixel high Figure 2: User-defined text-box and clip-box regions (handshake signal) pixout 23:0 out 24-bit pixel out data By modifying the text-box position, a similar effect to a 2D bit-blt operation pixout vsync out Vertical sync out high is achievable. This is useful for the simple animation of sprites , pointers or the implementation of simple screen savers. pixout hsync out Horizontal sync out high Numerous text overlay modules may be cascaded together in series for pixout val out Output pixel valid high more complex animated effects. pixout rdy in Ready to accept output pixel high (handshake signal) Copyright 2015 www.zipcores.com Download this VHDL Core Page 2 of 8