Electronic – Reading PDF through FPGA

fpga

I am a newbie in FPGA world, working out on Verilog these days. I have thought of a couple of Projects for my FinalYearProject at my college. One of them is Handheld Ebook Reader. Well, I will workout the other things required, what i am most concerned about is, How am i going to read a pdf file through FPGA.

Well, in the project, i will be interfacing a MicroSD card module with FPGA, the FPGA would read the file from pdf and would display it on LCD, interfacing with LCD wouldnt be a big problem as i have got a couple of good resources for that, interfacing the memory card module too. But the thought that has been troubling me in choosing this project is, how am I going to read PDF. I may work on the pdf which has texts only, i wont work on images, on the other hand if i plan to work on images as well, i will have to do a lot of work for several tasks, say for zooming in and others.
Kindly help me on this.
Plus, i am pretty keen about this task. Kindly tell me if this can be done more easily with microcontroller. I have a little bit of experience working with them.

Best Answer

First of all you need to determine what you're going to do with the PDF. If you're displaying it, you'll need some memory for the frame buffer, and a way to interface with the display. That should be your primary concern. Then, start thinking about rendering the PDF itself. As PDFs are essentially compressed PostScript of one form or another with embedded fonts, you can divide your tasks into some major elements:

  • part of the FPGA to load data from SD card or other media including file system access
  • part of the FPGA to decompress chunks of data, or to accelerate this process
  • part of the FPGA to decompress image data (JPEG, PNG, etc.) and copy to memory
  • part of the FPGA to decode/execute PostScript
  • part of the FPGA to figure out what needs to be displayed (such as the current page); this could be simple bounding logic or complex scaling logic handling a variety of different display modes
  • a floating point unit for the floating point coordinates in PostScript
  • an integer ALU
  • several "GPU" engines which render primitives from the PostScript engine (ideally, in parallel) e.g. draw line, draw polygon, ...
  • a font engine or two to render fonts (this will likely be very complex as you will need to support complex features like hinting and antialiasing.)
  • a display interface and memory interface
  • a UI controller of some kind, perhaps implementing copy/paste, selections, menus, etc.

Ideally the engines 1-5 would be pipelined to get maximum throughput. You'll be looking at a big FPGA to do all of this.

You could probably do this on a CPU, but if you realllly want to do it on an FPGA, this is probably the route to take.

Related Topic