FPGA Mandelbrot Fractal Engine


[Mike Field] has always been interested in the Mandelbrot Set since he first read about it back in the ‘80s. Having coded it on a Commodore VIC20 back int he day, he always returned to the Mandelbrot set when he wanted to try out some new programming technology.

He wanted to delve deeper into the world of FPGAs, so [Mike] figured the best way to do so would be to use one to program a Mandelbrot fractal engine. He started out with a goal of creating a 640×480 Mandelbrot display, but over time, he found that he could push his Nexus 2 FPGA to 800×600. He didn’t stop there, and after tweaking a few things, he was amazed to find that he could push a 1024×768 display from the small board.

He kept a pretty detailed log as he went along, should you be interested in trying your hand at the process as well. Though there is no video of the FPGA in action, there are a few cool pictures showing off his handiwork.

24 thoughts on “FPGA Mandelbrot Fractal Engine

  1. Ok.. How about showing us how we can port this to our PC’s so that we can enjoy the work you’ve done. I love fractal Art and would love to have this just run on a nice big screen.

  2. FYI fpgas are not ‘programmed’. VHDL, Verilog, etc. are Hardware Design Languages, not programming languages. Its a whole different paradigm for design, is not just a program

  3. @Adrian
    A7 is correct. They refer to a “Programming File” in a sense that you are transferring a configuration file, not that you have written a program. The use of the word programming refers solely to the actual act of transferring the file from a PC to the physical FPGA or external flash, etc.

    Also, the Nexys2 is not an FPGA, but a development board for the Xilinx Spartan 3E series of FPGAs. You can get the board with different versions of the FPGA.

  4. @bigbob – how is A7 correct at all? He claims “fpgas are not ‘programmed'”, then goes on to make unrelated assertions about how hardware description languages aren’t programming languages. I’ve programmed many an FPGA, as I’m sure you have too, by downloading a bitfile to the FPGA. To claim otherwise, ie to make the exact claim he made, is ludicrous.

  5. @Adrian
    I took what A7 said to refer to the actual design, not the transferring of the bit file. I’m pretty sure we would agree on what is or isn’t programming vs HDL design. I still do not care for calling the actual transferring as programming, but it seems that a widely known, better term for the FPGA world is not around. I generally refer to the process of bit file upload as exactly that, “uploading the bitfile”.

  6. @Adrian – Calm down man..

    well, i use the word ‘configured’, and some books too. but that’s not the interpretation for the word ‘programmed’ i was talking about. You can ‘program’ a fpga, there is a button on QuartusII for it. But your code is not a program, as would be for microcontrollers.

    @bigbob, you understood right, i was talking about the design, not uploading the configuration file to the fpga..

    the fact that HDLs and programming languages look alike, cause this confusion on what is ‘program’ and what is not.
    VHDL, Verilog, are texts that describe hardware: connections, gates,FFs. There’s no instructions on HDLs, and the ‘code’ you made will not be executed by a machine.. so its not a program at all.

    even so, a fpga can be ‘programmed’ when you upload the configuration file.

    conclusion: that’s a confuse terminology =D

  7. @bigbob

    “..Also, the Nexys2 is not an FPGA, but a development board..”
    That’s something that happens a lot here at HaD: exchanging the IC for the development board… AVRs became arduinos too =D

  8. @A7

    “the fact that HDLs and programming languages look alike, cause this confusion on what is ‘program’ and what is not.”

    I think the confusion is all yours. The article has nothing to do with the difference between “programs and designs”, it just happens to have a (extremely minor) error in terminology in the description. You were asinine and pedantic in pointing it out (and then ‘schooling’ us on the difference), and I followed suit by being asinine and pedantic towards your comment. Only charlie, Aaediwen, zeno, and noah have really added anything related to the article.

    Thats kind of sad, no? Perhaps I should calm down. But it gets pretty tiring that almost every article on hackaday is picked apart for tiny errors in editing and the experts (not hacking experts, but rather editing experts) come out of the woodwork to give their two cents. On this article, I was part of the problem, but only so I could say – STOP IT. Stop with the crap editing comments. Stop turning this place into editoraday, no one wants to read it.

  9. A7, you’re really splitting hairs here (which I assume is because you’re a troll), but even using your strict hair-splitting definitions, you can still technically program an FPGA. You do it by initially configuring the FPGA with a soft core processor, then you can program that processor within the FPGA by either loading its internal ROM with a program or by loading the program into the FPGA’s internal registers.

    this is all really beside the point. FPGAs and fractals are 2 of the coolest things… I wish there was video of this thing in action.

  10. When doing VHDL etc. you are most definitely programming in the sense that you are defining a scheme of instructions for how the hardware should react to different input. The code is compiled and transferred to the FPGA (probably in the form of another type of program). Whether or not the stuff that the FPGA is running is code, when you are defining it you are programming.

  11. Hi! Thanks for the interest in my project.

    FPGAs are “programmable hardware”, the FPGA chip used used is roughly equivalent to half a million basic logic gates, with a few goodies like small RAM blocks and hardware multipliers. At hadrware reset reset the FPGA more-or-less ‘wires’ these gates based on a configuration held in flash.

    With a flash update you can change the FPGA from maybe acting like a AVR compatible processor, to a 200MHz logic analyser, and then maybe an old school PDP or Cray computer.

    It’s not simulated nor emulated, it’s actual digital logic doing what digital logic does. For example in my project I had to build the VGA display – controlling the hsync/vsync signals and when the colour bytes get squirted up the cable, and also build a memory controller to access the page-mode RAM chip (e.g. set address wait 80ns, read the byte and change low order bit, wait 20ns, read next byte…)

    VHDL is very much like bit-banging I/O but worse. You need to know what is going on every cycle, and how long things need to take, and all you have to work with is the present system state and where you want to be ready for the flip-flops latching at the start of the next clock cycle. It changes your appreciation for how things really work!

    And yes, there is an FPGA equivalent of assembler. Rather than using high level components like counters and registers you can use the basic logic blocks (mostly 16 bit look-up tables and flipflops) and choose where they are and how they are wired. Very tedious, but can be much faster and more efficient than using high level constructs!


  12. Well I’ve “programmed” FPGAs for 20 years, LOL, though sometimes we get pedantic and call it “design”. I’m about to set up one for a 1280×1024, 255 deep Mandelbrot, with the expectation of getting 60Hz frames so you can smoothly drive it around. This is as a demo for a group I’m working with. I’ve got the Digilent Atlys (Spartan6 LX45-3). The chip has 58 18×18 multipliers that run at 390MHz, but I’ll be using 333MHz as it fits naturally into the horizontal cycle period (and can be got as 10/3 the 100MHz crystal).

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.