Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - about timing.

 
Thread Tools Search this Thread
Old 03-01-2008, 09:59 PM   #1
Default about timing.



Hello group,

I'm looking at a source code which generates a vsync and hsync signal
for VGA (640x480 pixel by pixel) and in there I see there is a
checking if v_count and h_count condition is checked as follow:



For horizontal and then vertical:

--Generate horizontal and vertical timing signals for video signla
--H_count counts pixels (640 + extra time for sync signals)


if (h_count = 799 ) Then
h_count <= "0000000000";
else
h_count <= h_count + 1;
end if;


if (v_count <= 755) AND (h_count =>659 ) Then
horiz_sync <= '0';
else
horiz_sync <= '1';
end if;



if (v_count >= 524) AND (h_count =>699 ) Then
v_count <= "0000000000";
elsif
v_count <= v_count + 1;
end if;


Questions:

Why does it check for 799 when the resolution is 640?
if it is extra time how is it calculated then?!
same for the vertical? how should I know what number should I use in
condition part?

Thanks,
Amit


Amit
  Reply With Quote
Old 03-01-2008, 11:36 PM   #2
kennheinrich@sympatico.ca
 
Posts: n/a
Default Re: about timing.
On Mar 1, 4:59 pm, Amit <amit.ko...@gmail.com> wrote:
> Hello group,
>
> I'm looking at a source code which generates a vsync and hsync signal
> for VGA (640x480 pixel by pixel) and in there I see there is a
> checking if v_count and h_count condition is checked as follow:
>
> For horizontal and then vertical:
>
> --Generate horizontal and vertical timing signals for video signla
> --H_count counts pixels (640 + extra time for sync signals)
>
> if (h_count = 799 ) Then
> h_count <= "0000000000";
> else
> h_count <= h_count + 1;
> end if;
>
> if (v_count <= 755) AND (h_count =>659 ) Then
> horiz_sync <= '0';
> else
> horiz_sync <= '1';
> end if;
>
> if (v_count >= 524) AND (h_count =>699 ) Then
> v_count <= "0000000000";
> elsif
> v_count <= v_count + 1;
> end if;
>
> Questions:
>
> Why does it check for 799 when the resolution is 640?
> if it is extra time how is it calculated then?!
> same for the vertical? how should I know what number should I use in
> condition part?
>
> Thanks,
> Amit


There's always some dead time between when the active pixels on one
line end and those in the the next line start. This called the HBI
(horizontal blanking interval). In the olden days, this time was
needed for the magnetic field of the monitor's deflection coils to
collapse and put the beam back at the left edge of the screen. Same
idea for the dead time between bottom of active video and top of
active picture. I'd expect you could google for a chart, or look for
some Xilinx/Altera app notes, although I think there's more
flexibility (read: slop) in the VGA/computer world than there is in
real (read: television broadcast) video.

- Kenn


kennheinrich@sympatico.ca
  Reply With Quote
Old 03-02-2008, 12:57 AM   #3
Amit
 
Posts: n/a
Default Re: about timing.
On Mar 1, 3:36 pm, kennheinr...@sympatico.ca wrote:
> On Mar 1, 4:59 pm, Amit <amit.ko...@gmail.com> wrote:
>
>
>
> > Hello group,

>
> > I'm looking at a source code which generates a vsync and hsync signal
> > for VGA (640x480 pixel by pixel) and in there I see there is a
> > checking if v_count and h_count condition is checked as follow:

>
> > For horizontal and then vertical:

>
> > --Generate horizontal and vertical timing signals for video signla
> > --H_count counts pixels (640 + extra time for sync signals)

>
> > if (h_count = 799 ) Then
> > h_count <= "0000000000";
> > else
> > h_count <= h_count + 1;
> > end if;

>
> > if (v_count <= 755) AND (h_count =>659 ) Then
> > horiz_sync <= '0';
> > else
> > horiz_sync <= '1';
> > end if;

>
> > if (v_count >= 524) AND (h_count =>699 ) Then
> > v_count <= "0000000000";
> > elsif
> > v_count <= v_count + 1;
> > end if;

>
> > Questions:

>
> > Why does it check for 799 when the resolution is 640?
> > if it is extra time how is it calculated then?!
> > same for the vertical? how should I know what number should I use in
> > condition part?

>
> > Thanks,
> > Amit

>
> There's always some dead time between when the active pixels on one
> line end and those in the the next line start. This called the HBI
> (horizontal blanking interval). In the olden days, this time was
> needed for the magnetic field of the monitor's deflection coils to
> collapse and put the beam back at the left edge of the screen. Same
> idea for the dead time between bottom of active video and top of
> active picture. I'd expect you could google for a chart, or look for
> some Xilinx/Altera app notes, although I think there's more
> flexibility (read: slop) in the VGA/computer world than there is in
> real (read: television broadcast) video.
>
> - Kenn



Hello Keen,

Thanks for the explanation. Now, how should we calculate it? how is it
calculated?

Regards,
Amit


Amit
  Reply With Quote
Old 03-02-2008, 03:24 AM   #4
David Spencer
 
Posts: n/a
Default Re: about timing.
"Amit" <> wrote in message
news:cfa08ef2-ec22-455f-a57f-...
> On Mar 1, 3:36 pm, kennheinr...@sympatico.ca wrote:
>
> Hello Keen,
>
> Thanks for the explanation. Now, how should we calculate it? how is it
> calculated?
>
> Regards,
> Amit


Have a look at http://www.epanorama.net/documents/pc/vga_timing.html.




David Spencer
  Reply With Quote
Old 03-02-2008, 06:27 AM   #5
Amit
 
Posts: n/a
Default Re: about timing.
On Mar 1, 7:24 pm, "David Spencer" <davidmspen...@verizon.net> wrote:
> "Amit" <amit.ko...@gmail.com> wrote in message
>
> news:cfa08ef2-ec22-455f-a57f-...
>
> > On Mar 1, 3:36 pm, kennheinr...@sympatico.ca wrote:

>
> > Hello Keen,

>
> > Thanks for the explanation. Now, how should we calculate it? how is it
> > calculated?

>
> > Regards,
> > Amit

>
> Have a look athttp://www.epanorama.net/documents/pc/vga_timing.html.



Hi David,

Thank you so much. That was a big help.

Regards,
Amit


Amit
  Reply With Quote
Old 03-03-2008, 09:14 AM   #6
Tricky
 
Posts: n/a
Default Re: about timing.
On Mar 2, 6:27 am, Amit <amit.ko...@gmail.com> wrote:
> On Mar 1, 7:24 pm, "David Spencer" <davidmspen...@verizon.net> wrote:
>
> > "Amit" <amit.ko...@gmail.com> wrote in message

>
> >news:cfa08ef2-ec22-455f-a57f-...

>
> > > On Mar 1, 3:36 pm, kennheinr...@sympatico.ca wrote:

>
> > > Hello Keen,

>
> > > Thanks for the explanation. Now, how should we calculate it? how is it
> > > calculated?

>
> > > Regards,
> > > Amit

>
> > Have a look athttp://www.epanorama.net/documents/pc/vga_timing.html.

>
> Hi David,
>
> Thank you so much. That was a big help.
>
> Regards,
> Amit


Video signals are made up of all sorts of timings. If you look at a
video signal on a scope you will see that the actual video data only
makes up about 2/3 of the overall signal. You have to worry about your
syncs, plus flyback as modern monitors are disigned to work with
standardised signals, that were made standard with analogue screens,
which are still in major use.

The counters may also be set to odd numbers depending of the clock
speed of the system.


Tricky
  Reply With Quote
Old 03-06-2008, 11:36 AM   #7
JK
 
Posts: n/a
Default Re: about timing.
On Mar 2, 11:27*am, Amit <amit.ko...@gmail.com> wrote:
>
> Hi David,
>
> Thank you so much. That was a big help.
>
> Regards,
> Amit


Take a look at
http://www.tkk.fi/Misc/Electronics/f...2rgb/calc.html

Regards,
JK


JK
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Timing simulations prob: making me frustrated :( vx100miles Software 1 02-04-2009 11:25 AM
help: why some fave sites keep timing out? acorbin General Help Related Topics 0 05-20-2007 12:34 AM
Timing Constraint Help zhangmifigo Hardware 0 12-20-2006 10:58 PM
Bad Timing (1980) Vlvetmorning98 DVD Video 1 08-27-2004 02:07 PM
Roeg's Bad Timing on DVD Frank Malczewski DVD Video 0 07-20-2003 06:12 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46