The core's modules are shown in the block diagram and described below.
Reset and Autosync
When asserted this signal holds the entire core in a reset state. When released the core is still held in reset while the input stage is released from reset and waits for the next vertical sync at which time the core is released from reset. This auto-sync function is part of the Xicore core.
Clock Domains
Input Video Clock
This is an input from the external video source used to clock input video, typically from an video decoder chip.
Core and Output Video Clock
The core clock is an input and is used by most of the core's logic. It is the same as the output pixel clock and is twice the input pixel rate.
Video Input
Accepts 4:2:2 formatted video in a BT.656 or a raw stream with hardware vertical and horizontal sync. For raw streams the core supports 8 or 16 bit inputs allowing for glueless connection to a wide variety of video decoder chips. The input clock is defined by the source, typically a video decoder chip, and is independent of the core logic clock. BT.656 formatted streams are decoded and hardware timing signals extracted for the core logic.
Input FIFO
A small FIFO is used at the input to isolated the input video stream from the core logic. This allows the input to support a large number of possible sources whose frequency varies according to the configuraiton. For example, a 16-bit input would feed pixels at 13.5 Mhz while a BT.656 input would be fed at 27Mhz. In either case the core frequency remains fixed at the output pixel rate. The FIFO output is run with the core clock.
Input Video Engine
The input video engine performs two important functions: 1) image sizing and 2) video synchronization. The image sizer consists a simple truncater in both the horizontal and vertical directions. Hence, the core can directly support D1, 4CIF and VGA from a typical PAL/NTSC source.
Video synchronization is an often overlooked but vital function that is included in the core. After power up the video decoder chip starts to feed data to the core. The core is held in reset until configured and enabled by external logic. Once enabled, however, the core will typically start to receive video in the middle of a field, which causes a shift in the video output. After the core has been enabled the its synchronization logic waits until the next vertical sync before releasing the main logic. In this way the processors get the first pixel of the first row of the next field.
Line Buffers
The line buffers store lines of video to perform its work and store output lines for the output processor
Spatial Predictor
Simple interpolation, based only on the values of neighboring pixels limits image quality. Xicore's algorithm uses a spatial predictor to determine the tendency of the pixel as a function of the neighboring pixels and this is used to dynamically alter the interpolation filter to produce an optimal pixel.
Interpolation Filter
Following spatial prediction the interpolation filter is used to compute the actual pixel value using a complex two-dimensional filter resulting in the highest possible image quality.
Output Processor
This module is responsible for outputting the deinterlaced video to the external interface.As it takes two full video lines to perform a deinterlacing function the output processor does not begin to output pixels until the end of the second output line, which corresponds to the end of the first input video line.
The output interface consists of separate pathways for luma (Y) and color (Cb, Cr), each having a separate valid signa. This is necessary since the 4:2:0 video format does not provide valid data on every clock cycle. The output clock is the same as the core clock.
The deinterlacing function converts fields into frames. Hence, the output frame rate is the same as the input field rate, which is 50fps for PAL and 60fps for NTSC. The output frame rate, however, is configurable.
Configuration
The core can be configured using dedicated input signals as follows:
Input Size
Two lines define one of D1, 4CIF or VGA. The raw input video is D1 and the core performs simple truncation to achieve the other size.
Output Frame Rate
Two lines defie one of four possible frame rates: Full (50/60fps), Half, Quarter or Eighth.