pde2hw user manual
|Title||pde2hw (FPGA-based hardware prototypes in Processing)|
|Author||Nikolaos Kavvadias 2014|
|Release Date||15 October 2014|
First public release containing three hardware prototypes (gensca, imgsynth, rugca).
pde2hw is a collection of standalone hardware prototypes that have been
written in the Processing programming language (http://www.processing.org). The
Processing codes that comprise this collection have been verified in FPGA-based
hardware by using a high-level synthesis approach from ANSI/ISO C. The HLS tool
that was used for the final implementation is HercuLeS:
pde2hw comprises of the following applications:
gensca: a 2D Generations cellular automaton (http://www.mirekw.com/ca/rullex_gene.html)
imgsynth: an image synthesis application that does not use intermediate memory and is used for visualizing pixel generation functions of the form
z = f(x,y)
rugca: a 2D cellular automaton with 256 states using a rug-like rule (http://www.mirekw.com/ca/rullex_udll.html).
It should be mentioned that while the Processing prototypes are meant to serve
as early-stage experiments prior dedicating to hardware, the first three
rugca) are post-mortem prototypes, i.e.
the Processing codes had been developed after the FPGA implementations (which
were synthesized to VHDL using HercuLeS).
2. File listing
pde2hw distribution includes the following files:
|LICENSE||The modified BSD license governs
|README.html||HTML version of README.|
|README.pdf||PDF version of README.|
|rst2docs.sh||Bash script for generating the HTML and PDF versions.|
|VERSION||Current version of the project sources.|
|/src/gensca||Processing code for
|/src/imgsynth||Processing code for
|/src/rugca||Processing code for
gensca is a generic implementation of the Generations automaton (2D, outer
totalistic with decay).
Generations rules are defined in the "S/B/C" form, where:
- S - defines counts of alive neighbors necessary for a cell to survive,
- B - defines counts of alive neighbors necessary for a cell to be born.
- C - defines the count of states cells can have (including 0 state).
imgsynth is a static image synthesis engine for testing various algebraic
The following triplets of two-variable functions which follow the form
B_f(x,y) for each color component
B have been tested:
- R_f(x,y) = x ^ y, G_f(x,y) = x ^ y, B_f(x,y) = x ^ y
- R_f(x,y) = x, G_f(x,y) = y, B_f(x,y) = x ^ y
- R_f(x,y) = x, G_f(x,y) = x + y, B_f(x,y) = x + y
- R_f(x,y) = x * y, G_f(x,y) = x * y, B_f(x,y) = x * y
- R_f(x,y) = x, G_f(x,y) = x * y, B_f(x,y) = x * y
- R_f(x,y) = 224, G_f(x,y) = 132, B_f(x,y) = 40
- R_f(x,y) = x, G_f(x,y) = y, B_f(x,y) = 0
- R_f(x,y) = x, G_f(x,y) = 0, B_f(x,y) = y
- R_f(x,y) = x*x+y*y, G_f(x,y) = x*x+y*y, B_f(x,y) = x*x+y*y
- R_f(x,y) = 0, G_f(x,y) = x, B_f(x,y) = y
- R_f(x,y) = x + y, G_f(x,y) = x - y, B_f(x,y) = x ^ y
- R_f(x,y) = (x+y)>>1, G_f(x,y) = (x+y)>>1, B_f(x,y) = (x+y)>>1
- R_f(x,y) = x*x-y*y, G_f(x,y) = x*x-y*y, B_f(x,y) = x*x-y*y
- R_f(x,y) = x, G_f(x,y) = x*x-y*y, B_f(x,y) = x*x-y*y
- R_f(x,y) = MAX(x,y), G_f(x,y) = MAX(x,y), B_f(x,y) = MAX(x,y)
- R_f(x,y) = MIN(x,y), G_f(x,y) = MIN(x,y), B_f(x,y) = MIN(x,y)
to which optionals masks can be applied.
rugca is the Generic implementation of a rug-like automaton (2D).
Rug rules are averaging rules using the full range of 256 possible states. To update itself in a Rug rule, every cell takes four steps.
- Every cell calculates the sum of its 8-neighborhood states.
- Every cell calculates the average neighbor state by dividing the sum by 8 and throwing out any remainder.
- Every cell computes its new state by adding an increment (incr) to the average neighbour state.
- As a final step, new state is taken modulo 256.
In order to execute the Processing applications, you have to invoke the Processing
environment/IDE and then press the
Run button with the application loaded (and
visible in the editor).
Alternatively you can simply double-click on the
*.pde file that contains the
Processing IDE (http://www.processing.org)
The applications have been tested with version 2.2.1 of the Processing environment on Windows.