lexuancong
Guest
Wed Nov 02, 2011 9:25 am
hi !
im from vietnam . my english is not good , i hope you can understand
what i say . thanks !
i have project to graduate university .
my project is draw circle , line , triagle in FPGA , display on VGA
( only use verilog , don't use C) . i have many problems , and time is
running out . if you have data , code about it , please help me.
.....
thanks you so much !
Jean-Marc Lienher
Guest
Wed Nov 02, 2011 12:08 pm
lexuancong wrote:
Quote:
i have project to graduate university .
my project is draw circle , line , triagle in FPGA , display on VGA
( only use verilog , don't use C) . i have many problems , and time is
The "video controller" section of Opencores has some VGA controllers
source code.
http://opencores.org/projects
There is a line drawing implementation in VHDL.
http://opencores.org/project,graphicsaccelerator
(I've never tried these projects, so I don't know how useful they are.)
Hope this helps,
Jean-Marc
--
http://www.cod5.org
glen herrmannsfeldt
Guest
Wed Nov 02, 2011 12:12 pm
lexuancong <lexuancong252_at_gmail.com> wrote:
Quote:
im from vietnam . my english is not good , i hope you
can understand what i say . thanks !
i have project to graduate university .
my project is draw circle , line , triagle in FPGA , display on VGA
( only use verilog , don't use C) . i have many problems , and time is
running out . if you have data , code about it , please help me.
....
I don't have any code, but the usual VGA display logic takes a
block of memory and writes that out repeatedly. If you don't need
color, write the same to all three outputs.
Then you have to figure out how to get the shapes drawn into memory.
As it doesn't change, easiest is to load it in a a constant (ROM)
that you have to somehow generate. You can write a ROM initialization
table in any language, then translate that to verilog.
But first you need the display logic. You need a high speed
clock, a row counter, and column counter. You need to generate
the syncronization pulses of the appropriate width and length.
That is as close as I can give now.
-- glen
Tim Wescott
Guest
Wed Nov 02, 2011 5:46 pm
On Wed, 02 Nov 2011 00:25:33 -0700, lexuancong wrote:
Quote:
hi !
im from vietnam . my english is not good , i hope you can understand
what i say . thanks !
i have project to graduate university . my project is draw circle , line
, triagle in FPGA , display on VGA ( only use verilog , don't use C) . i
have many problems , and time is running out . if you have data , code
about it , please help me. ....
thanks you so much !
First get your FPGA so that it generates valid VGA sync signals (and a
pixel clock, if VGA needs that). Once you've done that, then do some bog-
simple thing with your pixel generator, like putting out eight white
pixels followed by eight black ones -- that should give you vertical
stripes on the screen, to show progress. Then figure out how to read
pixels out of memory. Finally, stuff the memory with your circles, lines
and squares.
Do you have any friends in the class who are similarly bogged down?
Helping one another isn't a bad idea.
I don't know how your prof is planning on grading things, but if this
were a US university, getting partial functionality is going to be better
than nothing -- a C isn't as good as an A, but it's a lot better than a D
or an F!
--
www.wescottdesign.com
Frank Buss
Guest
Fri Nov 04, 2011 12:51 am
lexuancong wrote:
Quote:
my project is draw circle , line , triagle in FPGA , display on VGA
( only use verilog , don't use C) . i have many problems , and time is
running out . if you have data , code about it , please help me.
I have implemented a VGA signal generator, line drawing and bit-blitting
in VHDL:
http://www.frank-buss.de/yagraphcon/index.html
You could take a look at it, try to understand how it works (with
ModelSim you can even single-step the VHDL code and watching how the
registers changes) and then try to implement it yourself in Verilog. For
circles there is a modified Bresenham algorithm. Triangles are trivial,
if you don't need to fill it. If you need filled polygons, it gets a bit
more interesting.
--
Frank Buss,
http://www.frank-buss.de
piano and more:
http://www.youtube.com/user/frankbuss