Fred wrote:

> I would like to use a FPGA to create some simple test patterns. One of

> which is a circle with a variable diameter. I'm not sure where to start.

> Can this be realistically be done in an FPGA using minimal resources?
For a single line, the Y distance from center is known - it's from your

line count - and you know the desired radius so your unknowns are the

leading and trailing edges for either a filled circle or an outline.

X^2+Y^2=R^2 or X = +/-sqrt(r^2-Y^2)

Here you just need to think of the center as 0,0 and make adjustments

accordingly. The calculation only needs to be done once per line rather

than for each generated pixel which means you have a full scan line's

worth of time to do a calculation; serial aritmatic anyone?

If you don't need to ultra-tiny solution, the raw math is pretty simple

in an

FPGA with embedded multipliers and a simple square root algorithm.