Re: Programmable pulse generator
- From: Kolja Sulimma <news@xxxxxxxxxx>
- Date: Wed, 02 Aug 2006 18:01:34 +0200
jimwalsh142@xxxxxxxxxxx wrote:
Kolja Sulimma wrote:
I have't heard of that... could you post some links?
Bresenham invented famous algorithms for efficiently drawing lines and circles on bitmaps.
The point here is to realized that the line drawing algorithm can be used for any kind of scaling with factors less than one.
Bresenhams algorithm computes when you need to go up when drawing a line X pixels to the right and Y pixels up.
This is the same problem as producing Y pulses in X clock cycles. Or scaling a bitmap by a factor Y/X. Or....
The algorithm is really simple:
eps = X;
while(true) {
wait_for_clock_edge();
eps -= Y;
if (eps < 0) {
generate_pulse();
eps += X;
}
}
Kolja Sulimma
.
- References:
- Programmable pulse generator
- From: jimwalsh142
- Re: Programmable pulse generator
- From: John_H
- Re: Programmable pulse generator
- From: Ray Andraka
- Re: Programmable pulse generator
- From: Kolja Sulimma
- Re: Programmable pulse generator
- From: jimwalsh142
- Programmable pulse generator
- Prev by Date: Re: FPGA LABVIEW programming
- Next by Date: Re: Virtex-4 RocketIO
- Previous by thread: Re: Programmable pulse generator
- Next by thread: Re: Programmable pulse generator
- Index(es):
Relevant Pages
|