Hacking the Xbox
Hacking the Xbox
Hacking the Xbox
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Appendix D - Getting Started with FPGAs 239<br />
and interconnect. All of this wire is required to handle <strong>the</strong> many routing<br />
permutations that you might require for single-bit wide applications.<br />
In order to boost area efficiency, many FPGAs also include a few coarsegrain<br />
primitives, such as chunks of RAM or a multiplier block. Xilinx’s<br />
Virtex II-Pro FPGAs even include several PowerPC cores on-chip. While<br />
this sounds impressive, <strong>the</strong> actual area consumed by such a core is<br />
surprisingly small: A PowerPC processor probably consumes a little<br />
more than 1mm 2 of silicon area, whereas <strong>the</strong> area of <strong>the</strong> FPGA is<br />
hundreds of square millimeters.<br />
The most recent FPGAs on <strong>the</strong> market have very flexible I/Os in<br />
addition to having very flexible computational hardware. A typical<br />
FPGA can interface to all of <strong>the</strong> most popular high-speed signaling<br />
standards, including PCI, AGP, LVDS, HSTL, SSTL, and GTL. In<br />
addition, most FPGAs can handle DDR clocked signals as well. In case<br />
those acronyms didn’t mean anything to you, <strong>the</strong> basic idea is that an<br />
FPGA can be used to talk to just about any piece of hardware you might<br />
find on a typical PC mo<strong>the</strong>rboard, such as <strong>the</strong> <strong>Xbox</strong>. This is extremely<br />
good news to hardware hackers, because it means that an FPGA can be<br />
used to emulate or monitor almost any chip found in a PC. (Of course,<br />
<strong>the</strong> PC may have to be down-clocked in cases where <strong>the</strong> FPGA cannot<br />
keep up with <strong>the</strong> speed of <strong>the</strong> PC.)<br />
Designing for an FPGA<br />
You have a number of design entry options to choose from for a typical<br />
FPGA design flow. If you prefer to think graphically, most design flows<br />
support a schematic-capture tool. While schematic capture is often more<br />
intuitive for hardware designs, <strong>the</strong>y can be more difficult to maintain and<br />
modify. For example, changing all instances of a net name can be tedious<br />
if you have to click on every wire and type in <strong>the</strong> new name. Fur<strong>the</strong>rmore,<br />
<strong>the</strong> size of any single level of design hierarchy is limited to <strong>the</strong> size<br />
of a schematic sheet, so a complex design will require a good deal of<br />
planning and forethought for just <strong>the</strong> schematic capture.<br />
As a result, hardware description languages (HDLs) are <strong>the</strong> tool of<br />
choice for implementing complex designs. HDLs look very similar at<br />
first glance to normal programming languages. For example, <strong>the</strong> syntax<br />
of Verilog looks very similar to that of C or Java. However, <strong>the</strong> semantics<br />
of <strong>the</strong> language can be a bit of a challenge to understand.<br />
Hardware has an inherent parallelism that procedural languages such as C<br />
cannot express. If you think about it, every gate and every flip flop on an<br />
FPGA can compute in parallel, whereas in a C program, a single thread<br />
of execution is nominally assumed. As a result, HDLs represent hardware<br />
as a collection of processes that operate in parallel; it is up to <strong>the</strong><br />
coder to group all of <strong>the</strong> functions into <strong>the</strong> correct processes so that <strong>the</strong><br />
compiler can understand how to turn a process into gates.