Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17249 Discussions

VGA Calculator Display using VHDL

Altera_Forum
Honored Contributor II
4,472 Views

All right, so I'm trying to make a floating point calculator using VHDL, and basically, I want to first make the display. 

 

I want this calculator to display on a VGA monitor, and before I start configuring the calculating part of this project, I want to simply make a calculator actually show up on the screen with the function names. 

 

The functions will be Add, Subtract, Multiply, Divide, and Exponents (e^x). 

 

I'm using an Altera DE2 board, and I was wondering if anyone could help me with this? 

 

I really appreciate it! 

 

-CMN
0 Kudos
11 Replies
Altera_Forum
Honored Contributor II
2,302 Views

Im sure we can help. Post what problems you're having and we'll see what we can do

0 Kudos
Altera_Forum
Honored Contributor II
2,302 Views

Well, the thing is, I have NO idea where to even start....

0 Kudos
Altera_Forum
Honored Contributor II
2,302 Views

Well, googling for VGA timings would be a start, or read up on VGA 

http://en.wikipedia.org/wiki/video_graphics_array
0 Kudos
Altera_Forum
Honored Contributor II
2,302 Views

hello there  

 

In order to display data on VGA screen you need a VGA Controller module (there is planty free example on the net)  

and you need another module to deliver data that you want to display (here function names)  

then anothor module is required to do the calculation  

 

Good luck
0 Kudos
Altera_Forum
Honored Contributor II
2,302 Views

Hey. 

 

Ok, so I understand how VGA properly works, and I understand the modules I need. 

 

So, for this module to deliver data, how do I effectively have it display a calculator? 

 

That's my issue. I have made a VGA module, but now I'm trying to effectively display something. 

 

and I'm having a lot of trouble with that.
0 Kudos
Altera_Forum
Honored Contributor II
2,302 Views

As you have a VGA controller, you'll have the timing counters running, so you know when you're in the visible part of the screen, and what pixel is currently being drawn. You just modify the pixel at the specific location to draw whatever colour pixel you want.

0 Kudos
Altera_Forum
Honored Contributor II
2,302 Views

 

--- Quote Start ---  

As you have a VGA controller, you'll have the timing counters running, so you know when you're in the visible part of the screen, and what pixel is currently being drawn. You just modify the pixel at the specific location to draw whatever colour pixel you want. 

--- Quote End ---  

 

But see, there's my issue! 

 

How do you modify EACH pixel?
0 Kudos
Altera_Forum
Honored Contributor II
2,302 Views

easiest way would be to have a buffer storing the screen data. And then just read it out with your counters. Otherwise you need some vector approoach where you know the start and stop parts of a line.

0 Kudos
Altera_Forum
Honored Contributor II
2,302 Views

Ok, so I've been trying it the second way that you've been saying. 

 

Could you explain a mock example of implementing it with a buffer storing the data?
0 Kudos
Altera_Forum
Honored Contributor II
2,301 Views

You use a dual port ram. you use the x and y counters as the read address on the ram. on the write side, you can either refresh the entire ram every frame, or just update the pixels you want to modify on the screen. The downside to this is you need quite a bit of ram, while for video will probably need to be external ram.

0 Kudos
jeny
Beginner
84 Views

I’m working on a floating-point calculator in VHDL for my Altera DE2 board, and I want it to display on a VGA monitor with functions like Add, Subtract, Multiply, Divide, and Exponents. I’ve already set up a VGA controller, but I’m struggling with how to effectively display the calculator interface on screen especially how to use a buffer for pixel data. Could you explain with an example of how to implement this? Also, once I understand the display logic, I eventually want to extend it toward practical tools like a price bond calculator where users can enter values and see results directly on the VGA screen.

0 Kudos
Reply