KAY <> writes:
> Hi, I am trying to implement a graphics controller that takes initial
> X,Y coordinates and final X,Y coordinates to first store the data in
> the SRAM frame buffer then display the simple lines to a monitor.
>
What's the definition of a "simple line"?
> I can get the CPU to write to all the memory locations one after
> another but I would like to increase the speed of the process by only
> taking the initial address of the X,Y coordinates and burst the rest
> of the data till the final pixel location.
>
OK....
> How would I be able to implement this?
>
What hardware are you working with? What processor? Do you have any
other programmable hardware in the system? DMA might accelerate near
horizontal lines. You could program a GPU to do this. Given this is a
VHDL newsgroup, does this system have an FPGA?
If so, the simple-to-understand way is to convert your x,y pair into an
equation of the classic form y=mx+c and solve it for each x-coordinate.
However, what is usuall done is to implement Bresenham's algorithm,
which is a well-known algorithm for joining two points with a line.
That can be done in VHDL relatively easily.
Cheers,
Martin
--
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.co.uk/capabilities...ronic-hardware