Electronics > FPGA

FPGA VGA Controller for 8-bit computer

<< < (704/725) > >>

BrianHG:
 :scared: You got to be FN kidding me....  :scared:

     I spent all day trying to fix this.  Thankfully, my new I2C initializer with RS232 monitor/debugger had all the tools built in to see what was going on and play with the ADV7513 HDMI transmitter in real-time to see why it sometimes fails.

     The ADV7513 HDMI transmitter needs to be sent and I2C command to power-up the transmitter after a monitor has been disconnected and reconnected.  Thankfully, it sends an 'INTERRUPT'.  But wait, around 50% of the time you freshly power up the IC, the interrupt actually does nothing.  And yes, all the proper I2C commands have been sent to enable it.

     So, how did the original DECA's I2C HDMI initializer work?  They did have the interrupt wire wired in.

 :scared:  Believe it or not, they inverted the signal, meaning, the powerup I2C sequence is being transmitted non-stop.  So, after disconnecting the monitor, or on a lemon power-up where the interrupt would never trigger to turn on the HDMI output, they just blasted away the 'enable output' command.  And, if an interrupt did come in pulsing for a few milliseconds, during those few milliseconds they would actually stop sending the script, then continue sending away bypassing the 'non' problem in that instance.

     Well, I've attached a patched GPU_DECA_DDR3_top.sv replicating the same thing.  Please let me know if this one works and you get sound out of both the HDMI and Line Out analog jack.

BrianHG:
Besides the above fix, my new FP logs the ppm error of the output clocks.

Integer divider mode PPM results for the YM2149:

--- Code: ---#   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#   XXX   BHG_FP_clk_divider.v settings/results.   XXX
#   XXX   https://github.com/BrianHGinc            XXX
#   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#   XXX   USE_FLOATING_DIVIDE = 0
#   XXX   Set INPUT_CLK_HZ    = 100000000 Hz.
#   XXX   Set OUTPUT_CLK_HZ   = 1789000 Hz.
#   XXX   --------------------------------------------- (Floats only accurate to 2 decimal places)
#   XXX   True output freq    = 1785714.280000 Hz.
#   XXX   Frequency error     = -5878.150000 ppm.
#   XXX   Periodic jitter     = +/- 0.000000 ns.
#   XXX   ---------------------------------------------
#   XXX   Integer Divider     = 56.
#   XXX   Divider Fraction    = 0/65536.           OutHz = InHz/(ID+(DF/65536))
#   XXX   ~Divider to 6dp.    = 56.000000.
#   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
--- End code ---

Floating point divider mode PPM error:

--- Code: ---#   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#   XXX   BHG_FP_clk_divider.v settings/results.   XXX
#   XXX   https://github.com/BrianHGinc            XXX
#   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#   XXX   USE_FLOATING_DIVIDE = 1
#   XXX   Set INPUT_CLK_HZ    = 100000000 Hz.
#   XXX   Set OUTPUT_CLK_HZ   = 1789000 Hz.
#   XXX   --------------------------------------------- (Floats only accurate to 2 decimal places)
#   XXX   True output freq    = 1788999.790000 Hz.
#   XXX   Frequency error     = -0.370000 ppm.
#   XXX   Periodic jitter     = +/- 5.000000 ns.
#   XXX   ---------------------------------------------
#   XXX   Integer Divider     = 55.
#   XXX   Divider Fraction    = 58796/65536.           OutHz = InHz/(ID+(DF/65536))
#   XXX   ~Divider to 6dp.    = 55.897156.
#   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
--- End code ---

-0.370000 ppm VS -5878.150000 ppm, well, its not as bad as the I2S audio clock in integer mode:

--- Code: ---#   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#   XXX   BHG_FP_clk_divider.v settings/results.   XXX
#   XXX   https://github.com/BrianHGinc            XXX
#   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#   XXX   USE_FLOATING_DIVIDE = 0
#   XXX   Set INPUT_CLK_HZ    = 100000000 Hz.
#   XXX   Set OUTPUT_CLK_HZ   = 3072000 Hz.
#   XXX   --------------------------------------------- (Floats only accurate to 2 decimal places)
#   XXX   True output freq    = 3030303.030000 Hz.
#   XXX   Frequency error     = -128093.090000 ppm.
#   XXX   Periodic jitter     = +/- 0.000000 ns.
#   XXX   ---------------------------------------------
#   XXX   Integer Divider     = 33.
#   XXX   Divider Fraction    = 0/65536.           OutHz = InHz/(ID+(DF/65536))
#   XXX   ~Divider to 6dp.    = 33.000000.
#   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
--- End code ---
-128kppm...

nockieboy:

--- Quote from: BrianHG on August 16, 2022, 11:53:51 pm --- :scared: You got to be FN kidding me....  :scared:

     I spent all day trying to fix this.  Thankfully, my new I2C initializer with RS232 monitor/debugger had all the tools built in to see what was going on and play with the ADV7513 HDMI transmitter in real-time to see why it sometimes fails.

     The ADV7513 HDMI transmitter needs to be sent and I2C command to power-up the transmitter after a monitor has been disconnected and reconnected.  Thankfully, it sends an 'INTERRUPT'.  But wait, around 50% of the time you freshly power up the IC, the interrupt actually does nothing.  And yes, all the proper I2C commands have been sent to enable it.

     So, how did the original DECA's I2C HDMI initializer work?  They did have the interrupt wire wired in.

 :scared:  Believe it or not, they inverted the signal, meaning, the powerup I2C sequence is being transmitted non-stop.  So, after disconnecting the monitor, or on a lemon power-up where the interrupt would never trigger to turn on the HDMI output, they just blasted away the 'enable output' command.  And, if an interrupt did come in pulsing for a few milliseconds, during those few milliseconds they would actually stop sending the script, then continue sending away bypassing the 'non' problem in that instance.

     Well, I've attached a patched GPU_DECA_DDR3_top.sv replicating the same thing.  Please let me know if this one works and you get sound out of both the HDMI and Line Out analog jack.

--- End quote ---

Haven't had time to give this patch justice in testing, but I can confirm that the image is back on the TV, but no HDMI sound output.  Can't test line out yet as I'm having trouble finding a cable.  ::)

BrianHG:
Give these 2 alternate top .sv a try.
You know, you could try connecting a headphone to the line out.

Also, I've been working off of the 'GPU_DECA_DDR3_version_16_pre_BHG_audiofilter.zip' code from above.

nockieboy:

--- Quote from: BrianHG on August 17, 2022, 06:19:17 pm ---Give these 2 alternate top .sv a try.
You know, you could try connecting a headphone to the line out.
--- End quote ---

I'll give them a try as soon as I can.


--- Quote from: BrianHG on August 17, 2022, 06:19:17 pm ---Also, I've been working off of the 'GPU_DECA_DDR3_version_16_pre_BHG_audiofilter.zip' code from above.
--- End quote ---

That's probably the issue then.  I've made a few changes since I last uploaded the project, I think.  Here's the latest version (not including your latest changes to duplicate sound out of the DECA's DAC).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version