Xcell Journal: The authoritative journal for programmable ... - Xilinx
Xcell Journal: The authoritative journal for programmable ... - Xilinx
Xcell Journal: The authoritative journal for programmable ... - Xilinx
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
DIGITAL SIGNAL PROCESSING<br />
moving data between the PCI bus, the<br />
external peripheral bus (EPB), the PPC<br />
DRAM, and I/O registers.<br />
<strong>The</strong> FPGA handles raw (uncompressed)<br />
audio, raw video, and raw and compressed<br />
I/O <strong>for</strong> the MPEG codecs. Part of the<br />
FPGA fabric is dedicated to video generators<br />
and mixers, I/O multiplexers,<br />
standard video processing such as scaling,<br />
and RAM interfaces. About 10%<br />
of the XC2V3000 is dedicated to a<br />
basic 2-D graphics engine. You can<br />
use the remainder of the FPGA fabric<br />
<strong>for</strong> custom processing functions. <strong>The</strong><br />
default FPGA internal clock is 100<br />
MHz, which matches the clock used<br />
<strong>for</strong> the DRAMs.<br />
Each of the two MPEG-2 codecs is<br />
capable of encoding or decoding elementary<br />
streams. <strong>The</strong>y are independent<br />
of each other. For example, in a<br />
video application where the raw video<br />
is enhanced by the FPGA, you can<br />
compress both the original and the<br />
enhanced video. In a communications<br />
scenario, one codec may be compressing<br />
local video <strong>for</strong> transmission, while<br />
the other is de-compressing remote<br />
video. Or you can use the two codecs<br />
to decompress video from two distinct<br />
remote sources.<br />
<strong>The</strong> PCI-PCI bridge allows you to<br />
install VW in either 3.3V PCI or 5V<br />
PCI systems (the PPC is not 5V I/O<br />
tolerant).<br />
Peripherals<br />
Inputs to the VW FPGA include:<br />
• A stereo audio digitizer<br />
• A video digitizer/decoder<br />
<strong>The</strong> video decoder accepts standard-definition<br />
NTSC and PAL <strong>for</strong>mat analog<br />
video from one of four composite sources<br />
or one of two S-video sources.<br />
Outputs from the VW FPGA include:<br />
• Two SVGA DACs, capable of driving<br />
independent displays<br />
• An audio DAC producing standard<br />
line-level stereo audio output<br />
<strong>The</strong> two DRAM banks attached to the<br />
EPB<br />
FPGA are independent; each is capable of<br />
1.6 Gbps peak bandwidth. One is associated<br />
with the graphics engine in the FPGA;<br />
the other is typically used by video processing<br />
functions.<br />
Digital I/O connectors 1 and 2 each<br />
support 22 bi-directional LVTTL signals,<br />
8-bit CCIR-656<br />
to TV Out<br />
ADC/Decoder<br />
10-bit CCIR-656<br />
CODEC A<br />
8-bit CCIR-656<br />
CODEC B<br />
8-bit CCIR-656<br />
I-Frame<br />
Decoder<br />
EPB<br />
Interface<br />
TV Out<br />
Module<br />
Memory<br />
Access<br />
To<br />
External<br />
Video<br />
DRAM<br />
as well as a few auxiliary connections.<br />
You can use the digital I/O to connect<br />
another board directly to the FPGA, or<br />
to connect two VW boards together.<br />
Digital I/O connector 3 has 16 LVTTL<br />
pins and can be used <strong>for</strong> a video interface<br />
port or as a convenient place to bring out<br />
de-bugging test points.<br />
Software<br />
<strong>The</strong> PPC runs MontaVista Linux, an<br />
embedded Linux supporting real-time<br />
functionality, multi-processes, and multithreading.<br />
You can operate VW standalone,<br />
independent of any host computer,<br />
or as an add-in board driven by a host system.<br />
On Sun Solaris-, Microsoft<br />
Windows-, Wind River Systems<br />
VxWorks-, or Linux-based host systems,<br />
graphic drivers allow VW to function as<br />
primary or secondary display. An API provides<br />
control of basic VW functions.<br />
Building the I-Frame Decoder<br />
We had a “clean room” software<br />
decoder developed from the MPEG<br />
specification available in-house at the<br />
start of the project. We partitioned the<br />
I-frame decoding functions into modules<br />
and did software profiling and<br />
hardware simulation to determine how<br />
to distribute the modules across the<br />
FPGA hardware and PPC software.<br />
Integration with<br />
VW FPGA Internals<br />
We connected the I-frame decoder<br />
inside the FPGA as a standard video<br />
input. Figure 4 shows a portion of the<br />
VW FPGA internals and how the<br />
decoder’s two ports connect to the<br />
pre-existing circuitry. <strong>The</strong> EPB port<br />
carries encoded data, tables, and control<br />
register setup data from the PPC.<br />
<strong>The</strong> CCIR-656 video out port connects<br />
to a video multiplexer that<br />
selects between all of the video inputs.<br />
This allows us to re-use the existing<br />
design’s video storage circuitry to<br />
move frame data into video memory,<br />
and ultimately to the display. Because<br />
the I-frame is processed sequentially,<br />
we can use internal block RAM to<br />
assemble macro blocks; a port to connect<br />
to external RAM is not required.<br />
Decoding Modules<br />
<strong>The</strong> pipeline layout of the decoder is<br />
shown in Figure 5. Input on the left is fed<br />
by the PPC. Output on the right is CCIR-<br />
656 <strong>for</strong>mat 4:2:2 YCbCr 8-bit video. This<br />
<strong>for</strong>mat matches the output from the VW<br />
peripheral analog video decoders. <strong>The</strong> layout<br />
was designed to allow progressive<br />
incremental design, integration, and testing<br />
of the modules.<br />
<strong>The</strong> input buffer uses a 512-deep x 32bit-wide<br />
FIFO to receive all data from the<br />
76 <strong>Xcell</strong> <strong>Journal</strong> Winter 2004<br />
Video Input Multiplexors<br />
Video Memory Interface<br />
Figure 4 – Section of FPGA internal<br />
structure including I-frame decoder<br />
To<br />
Video<br />
Scaling<br />
and<br />
Display