Hardware Acceleration VGA graphics controller

K

KAY

Guest
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.

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.

How would I be able to implement this?

Thanks,
Kei
 
Hi,

I was thinking about DMA, but I was trying to think of an easier solution, where the CPU doesn't actually get kicked off the buses but just polls the status of the operation until it finishes.

Yea it would really help if someone could give me some hints on how I could implement this.

Thanks ,
Kei
 
On Tuesday, March 5, 2013 5:50:26 AM UTC-6, KAY wrote:
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.
I've read that some of the current Nvidia graphics boards are already capable of doing this. Nvidia doesn't seem likely to offer much information on how they implemented it, though.
 
KAY <hong.kei.chan.90@gmail.com> 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

--
martin.j.thompson@trw.com
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.co.uk/capabilities/39-electronic-hardware
 
Hi,

The hardware that I'm using is a softcore 68k on a DE1 development board. I have a separate VGA controller to display the image on the screen.

I was thinking that I would need to modify my current SRAM controller that would take the start and end X,Y coordinates and be able to fill all the data between by just stepping through consecutive address locations ?

I really appreciate the replies,

Kei
 
Hi,
By just feeding the init and the stop position to the controller in order to plot the line in-between, you are talking about interpolation, as i understand.
One solution, i suggest you to go for MatLab MCode embedded in System generator.
Hope this help.
 
On 3/6/2013 3:52 AM, Martin Thompson wrote:
KAY <hong.kei.chan.90@gmail.com> 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
Martin has it right...use Bresenham's algorithm. Google yields lots of
hits, but here's a pdf with a detailed explanation as well as code.

www.cs.columbia.edu/~sedwards/classes/2012/4840/lines.pdf

All you have to do is convert the X,Y coordinates to addresses for your
framebuffer implementation.

Regards,
Urb
 

Welcome to EDABoard.com

Sponsor

Back
Top