Author Topic: FPGA VGA Controller for 8-bit computer  (Read 433887 times)

0 Members and 5 Guests are viewing this topic.

Offline nockieboyTopic starter

  • Super Contributor
  • ***
  • Posts: 1812
  • Country: england
Re: FPGA VGA Controller for 8-bit computer
« Reply #2300 on: December 29, 2020, 05:36:01 pm »
I looked at your schematic.
Are you sure you arent supposed to invert a signal?

I've just gone over it again and yes, it looks like the clock signal (INC) needs to be inverted.  ;)
 

Offline nockieboyTopic starter

  • Super Contributor
  • ***
  • Posts: 1812
  • Country: england
Re: FPGA VGA Controller for 8-bit computer
« Reply #2301 on: December 29, 2020, 06:00:52 pm »
Also, make sure we didn't swap any of the +&- on the TMDS signals.  Any swapped signals need to be inverted in the Quartus Block Diagram Schematic since we cannot do so in the pin-planner.

Literally inverted? As in, insert an inverter between the 'top' module and the output pins for both _p and _n outputs on the clock signal pair?
 

Offline FenTiger

  • Regular Contributor
  • *
  • Posts: 88
  • Country: gb
Re: FPGA VGA Controller for 8-bit computer
« Reply #2302 on: December 29, 2020, 06:14:02 pm »
Just swap the pins, i.e. connect tmds_clock_p to TMDS_CLK_n and vice versa.
 

Offline nockieboyTopic starter

  • Super Contributor
  • ***
  • Posts: 1812
  • Country: england
Re: FPGA VGA Controller for 8-bit computer
« Reply #2303 on: December 29, 2020, 06:23:23 pm »
Just swap the pins, i.e. connect tmds_clock_p to TMDS_CLK_n and vice versa.

Yeah, should have thought of that myself.  The _n pin wasn't explicitly defined in the schematic before, though - but now I've got it there, I can just swap the wires.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7789
  • Country: ca
Re: FPGA VGA Controller for 8-bit computer
« Reply #2304 on: December 30, 2020, 12:33:33 am »

1 single inverter would have also worked...
How did the second pin appear?
« Last Edit: December 30, 2020, 12:35:50 am by BrianHG »
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7789
  • Country: ca
Re: FPGA VGA Controller for 8-bit computer
« Reply #2305 on: December 30, 2020, 05:40:01 am »
Make sure on your scope that both the N&P output are oscillating with a 180degree phase difference.
You'll need 2 probes and need to turn on the horizontal time-base x10 magnification on your scope.
 

Offline asmi

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: FPGA VGA Controller for 8-bit computer
« Reply #2306 on: December 30, 2020, 07:30:02 am »
Also double check that you assign right color channels to HDMI data lanes, as they are not interchangeable. Data lane 0 is for blue color data and sync signals, lane 1 - green, lane 2 - red.

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7789
  • Country: ca
Re: FPGA VGA Controller for 8-bit computer
« Reply #2307 on: December 30, 2020, 09:59:20 am »
Also double check that you assign right color channels to HDMI data lanes, as they are not interchangeable. Data lane 0 is for blue color data and sync signals, lane 1 - green, lane 2 - red.
He's still missing something so much more simple stupid.  I want to see if he can figure it out....
 

Offline nockieboyTopic starter

  • Super Contributor
  • ***
  • Posts: 1812
  • Country: england
Re: FPGA VGA Controller for 8-bit computer
« Reply #2308 on: December 30, 2020, 12:30:15 pm »
Also double check that you assign right color channels to HDMI data lanes, as they are not interchangeable. Data lane 0 is for blue color data and sync signals, lane 1 - green, lane 2 - red.
He's still missing something so much more simple stupid.  I want to see if he can figure it out....

I haven't got DE or DDC_EN outputs set up. DE needs to be LOW, DDC_EN needs to be HIGH.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7789
  • Country: ca
Re: FPGA VGA Controller for 8-bit computer
« Reply #2309 on: December 30, 2020, 12:33:50 pm »
Also double check that you assign right color channels to HDMI data lanes, as they are not interchangeable. Data lane 0 is for blue color data and sync signals, lane 1 - green, lane 2 - red.
He's still missing something so much more simple stupid.  I want to see if he can figure it out....

I haven't got DE or DDC_EN outputs set up. DE needs to be LOW, DDC_EN needs to be HIGH.
;)
 

Offline nockieboyTopic starter

  • Super Contributor
  • ***
  • Posts: 1812
  • Country: england
Re: FPGA VGA Controller for 8-bit computer
« Reply #2310 on: December 30, 2020, 01:54:48 pm »
Silly-scope traces for clock p & n and data lane 0 p & n attached, showing 180-degree phase difference.

Despite adding the DE signal (permanently LOW), still no image on the monitor.  I'm going to need to do some further testing with the monitor (root out my old RPi with full-size HDMI connector on it) to make sure it's not the monitor messing me about (there's only one HDMI connector on the back, so no confusion over DVI/HDMI).

I guess I'm going to need to start thinking about somehow testing for signals coming out at the HDMI connector on the DVI tester?
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7789
  • Country: ca
Re: FPGA VGA Controller for 8-bit computer
« Reply #2311 on: December 31, 2020, 12:43:24 am »
Strange, usually the pixel clock is the lowest frequency component.
The other data lines should have components averaging to the middle of your low bandwidth scope since they are operating in the 125MHz domain...

Also, channels 0,1 & 2 may be backwards.
« Last Edit: December 31, 2020, 12:48:07 am by BrianHG »
 

Offline asmi

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: FPGA VGA Controller for 8-bit computer
« Reply #2312 on: December 31, 2020, 01:26:19 am »
Silly-scope traces for clock p & n and data lane 0 p & n attached, showing 180-degree phase difference.
Is horizontal scale the same on both traces? If so, your clock is wrong - HDMI clock lane is a symbol clock, not pixel one. As such, one period of symbol clock should cover 10 bit times for the data lanes.

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7789
  • Country: ca
Re: FPGA VGA Controller for 8-bit computer
« Reply #2313 on: December 31, 2020, 04:01:25 am »
Silly-scope traces for clock p & n and data lane 0 p & n attached, showing 180-degree phase difference.
Is horizontal scale the same on both traces? If so, your clock is wrong - HDMI clock lane is a symbol clock, not pixel one. As such, one period of symbol clock should cover 10 bit times for the data lanes.
This is a bit of a problem as his scope is 20MHz only and we cannot predict what the output and trace lock & would look like on the lanes.  Especially with a fixed test pattern.  I would have foreseen more middle level junk.  Perhaps in the horizontal frame, there just seems to be a repetitious pattern which appears to be lower frequency than the pixel clock.  In the simulation output, the data lanes do have 10 distinct bits per 'symbol clock'.  And the symbol clock does end up being equal to what would be the equivilant VGA dac pixel clock in the end.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7789
  • Country: ca
Re: FPGA VGA Controller for 8-bit computer
« Reply #2314 on: December 31, 2020, 04:05:14 am »
@Nockieboy, with the 'IO Standard' set to LVDS_E_3R, you probably need to add those 8x 51ohm resistors to your DVI tester board.  However, I only see this as an issue above 300mbps.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7789
  • Country: ca
Re: FPGA VGA Controller for 8-bit computer
« Reply #2315 on: December 31, 2020, 04:49:58 am »
You have been Nockied!!!



I wonder how long this would have gone on if I hadn't checked...
 
The following users thanked this post: asmi

Offline nockieboyTopic starter

  • Super Contributor
  • ***
  • Posts: 1812
  • Country: england
Re: FPGA VGA Controller for 8-bit computer
« Reply #2316 on: December 31, 2020, 01:36:26 pm »
 :palm:  I'll get my coat...

All the outputs need to be reversed on the Quartus schematic - so that means the clock is the one pair that now doesn't need to be reversed...? :o

EDIT:  In my defence, the TX outputs where connected up to the PTN3366 to create the simplest routing to the HDMI connector.  If I'd connected positive to positive, negative to negative, each of the pairs would have had to cross over to get to the HDMI connector...  Which seems a bit odd, you'd think the chip or the connector would be made so that wouldn't happen, but I recall someone telling me a while ago that it didn't matter which way round the connections were made, but I guess it helps to know that they're swapped around though, so that the outputs can be swapped accordingly in Quartus...  I'd forgotten I'd done that. ::)
« Last Edit: December 31, 2020, 01:40:01 pm by nockieboy »
 

Offline nockieboyTopic starter

  • Super Contributor
  • ***
  • Posts: 1812
  • Country: england
Re: FPGA VGA Controller for 8-bit computer
« Reply #2317 on: December 31, 2020, 01:45:12 pm »
I just want to confirm that reversing the outputs is simply a case of swapping the output as per the attached schematic?

 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7789
  • Country: ca
Re: FPGA VGA Controller for 8-bit computer
« Reply #2318 on: December 31, 2020, 01:46:07 pm »
Yes, in Quartus, move the clk pin back to the positive output from the module and move the 3 data lines to the module's negative output...
You got it right.
 

Offline nockieboyTopic starter

  • Super Contributor
  • ***
  • Posts: 1812
  • Country: england
Re: FPGA VGA Controller for 8-bit computer
« Reply #2319 on: December 31, 2020, 02:04:34 pm »
Apologies for the potato-camera picture, but IT WORKS!!  ;D ;D ;D :-+



Bit blurry, but the screen boundaries are clearly visible and the monitor is picking up a 480p/60Hz HDMI signal.

EDIT: Not shown in the picture above, but I stepped through the monitor's menu and it was also picking up the audio component in the HDMI signal - although there's no sound to hear just yet.
« Last Edit: December 31, 2020, 02:06:21 pm by nockieboy »
 
The following users thanked this post: BrianHG

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7789
  • Country: ca
Re: FPGA VGA Controller for 8-bit computer
« Reply #2320 on: December 31, 2020, 02:19:22 pm »
Ready to try 720 @ 60Hz?
Also, 1080p @ 30Hz?  (No blur on this one...)

Also, a 2.5v IO test...  Though, that NXP amplifier IC was explicit, it should work from 2.5v drive all the way to 0.325v drive.

« Last Edit: December 31, 2020, 02:22:24 pm by BrianHG »
 

Offline nockieboyTopic starter

  • Super Contributor
  • ***
  • Posts: 1812
  • Country: england
Re: FPGA VGA Controller for 8-bit computer
« Reply #2321 on: December 31, 2020, 02:22:09 pm »
Ready to try 720 @ 60Hz?
Also, 1080p @ 30Hz?  (No blur on this one...)

Definitely.  I'm just looking through the code currently to see how to set it up for 720p.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7789
  • Country: ca
Re: FPGA VGA Controller for 8-bit computer
« Reply #2322 on: December 31, 2020, 02:25:24 pm »
Bit blurry, but the screen boundaries are clearly visible and the monitor is picking up a 480p/60Hz HDMI signal.
Yes, unlike analog VGA where the monitor may add artificial sharpness for the quality of the ADC sampling and poor analog cables, the full digital DVI/HDMI upsampling usually looks smoother/softer...
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7789
  • Country: ca
Re: FPGA VGA Controller for 8-bit computer
« Reply #2323 on: December 31, 2020, 02:33:59 pm »
Oooops, the module you are using uses x10 on the PLL instead of x5.  I don't think they are using Altera's SERDES.  If not, it may not be possible to achieve the 742.5mbps as the code cant run that fast if they are using a software SERDES instead of a hardware one.

The code internally seems to support DDRIO mode, IE shift 2 bits per clock.  You will need to read up on how to get it to work, or it might be automatic...
« Last Edit: December 31, 2020, 02:44:08 pm by BrianHG »
 

Offline nockieboyTopic starter

  • Super Contributor
  • ***
  • Posts: 1812
  • Country: england
Re: FPGA VGA Controller for 8-bit computer
« Reply #2324 on: December 31, 2020, 02:34:19 pm »
Bit blurry, but the screen boundaries are clearly visible and the monitor is picking up a 480p/60Hz HDMI signal.
Yes, unlike analog VGA where the monitor may add artificial sharpness for the quality of the ADC sampling and poor analog cables, the full digital DVI/HDMI upsampling usually looks smoother/softer...

Oh it was sharp enough irl, it's just my mobile camera was having trouble with the lighting in the room and my hands weren't steady enough to take a sharp picture.  ;)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf