Jump to content

1920x1080x60 real-time fractals demo (CMOD A7/35)


xc6lx45

Recommended Posts

Hi,

I finally got around to clean up my fractals pet project. It includes 30 parallel fractal engines and makes good use of the chip's 90 hardware multipliers, with up to 30 * 3 * 200 MHz =18 billion multiplications per second under full load.

The demo still works on USB power - the chip does get a little warm, though.

Other than clocking and ASYNC_REG for CDC, the code is 100 % inferred logic (portable).

Here you can see it in action. Blurring and glitches are phone camera artifacts.

There is some documentation (partly under construction), including an architecture diagram:

https://github.com/mnentwig/forthytwo/tree/master/fractalsProject

The control code runs on the 32-bit variant of James Bowman's J1B CPU. I use my own small "forthytwo.exe" compiler in C#, which is included in the repo (starting from the link, navigate up). I've tried to deliver it in a way that it does not require Visual Studio to build (.exe for windows is included, and you can build it from a .NET runtime. This may need some editing of the makefile, though).

There is a bootloader variant included so feel free to use it as testbed for the J1B, using UART, LEDs, and switches. Note, anything image related is done in RTL - the J1B only calculates vectors that define the image location in "fractal space". If anybody wants to go ahead minus the fractals part, I've done that work for you already (refImpl project).

There are also Verilator simulations included - similar to the original J1B repo - that allow interactive (UART => keyboard) experiments with the microcontroller code.

The bravest can try their hands on my hand-crafted assembler floating point implementation, which is a little bit rough in some places but generally works nicely if I am aware of the limitations (e.g. no internal rounding, just truncation).

Bonus: 2D matrix math feat. Bhaskara's 7th century sine approximation for the rotation matrix.

Happy hacking!

-Markus

Link to comment
Share on other sites

  • 2 weeks later...

Markus,

Another outstanding tutorial with plenty of goodies for those who want to learn stuff. Tip of the bowler....

There just aren't that many commercial quality fractal generators available :) .

Actually, this was a delight on so many levels. Almost brought tears to my eyes ( not of joy ) remembering past tousles with Forth...

Your projects are like watching a magician's act. While the direct effect might not be totally mesmerizing watching the manipulations behind the scene certainly are. It's rare to find a published project where the source code is a star and so enjoyable; same with getting a glimpse of the technical obsessions of smart people like those represented in this release.

Now, if only there was a testbench.v to match the provided simulation and verilator code and make it complete... ?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...