[LLVMdev] Xilinx zynq-7000 (7030) as a Gallium3D LLVM FPGA target
Nick Lewycky
nicholas at mxc.ca
Sat Aug 20 16:48:29 PDT 2011
Luke Kenneth Casson Leighton wrote:
> i was just writing this:
> http://www.gp32x.com/board/index.php?/topic/60228-replicating-the-success-of-the-openpandora-discussion-v20/
>
> when something that just occurred to me, half way through, and i would
> greatly appreciate some help evaluating whether it's feasible.
>
> put these together:
> http://www.xilinx.com/products/silicon-devices/epp/zynq-7000/index.htm
> http://llvm.org/releases/2.7/docs/ReleaseNotes.html
> http://en.wikipedia.org/wiki/Gallium3D#LLVM_usage
> http://wiki.opengraphics.org
>
> and it may be the case that completing the software for the
> OpenGraphics Project is a matter of hitting "compile". not only that,
> but a fully FSF Hardware-Endorseable Laptop with decent 3D Graphics
> Engine would be as equally simple (the only FSF Hardware-Endorsed
> laptop product is that Loongson Leemote, by virtue of it having a 2D
> PCI Graphics IC and a 900mhz MIPS).
>
> the logic goes as follows:
> * one of the Gallium3D targets is LLVM.
> * one of LLVM's targets is Xilinx FPGAs (MicroBlaze).
> * the zynq-7000 7030 has 125k FPGA Logic Gates (and more)
> * with a TFP410 as the DVI driver, the OGP is done!
>
> now, given that this appears to be "too easy", i'd really _really_
> appreciate some help checking the facts. and, also, if it turns out
> to be feasible, assessing roughly what the performance might be.
>
> also, most importantly: what am i missing? :)
The way in which Gallium3D targets LLVM, is that it waits until it
receives the shader program from the application, then compiles that
down to LLVM IR. That's too late to start synthesizing hardware (unless
you're planning to ship an FPGA as the graphics card, in which case
reprogramming is still too slow, and it'll be too expensive).
A more accurate approach would be to say, "Well, Mesa is a software
implementation of the whole OpenGL stack, right? Why not compile it to
verilog using something like c-to-verilog.com (also powered by LLVM)
then synthesize that?" The answer is that the resulting code will be far
too inefficient to make a useful modern graphics card, and even if it
were, you'll have to do lots of work to make it communicate of PCI and
DVI, etc. Hardware isn't POSIX after all.
Nick
>
> many many thanks,
>
> l.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list