Vivado VGA control ip

Başlatan Emre_Tuncay_, 26 Kasım 2017, 15:06:21

Emre_Tuncay_

Merhaba
Vivado üzerinde Zybo kartım için vga monitör sürecek verilog kodu yazmaya çalışıyorum.Elimde Burak KELLECİ hocanın kitabı var buradaki bir örnek üzerinden yapmaya çalışıyorum ama başarılı olamadım.Acaba vga monitör sürmek için vga control ip kullanananınız oldumu.Veya böyle bir ip ye nasıl ulaşabilirim.

Bertan

Merhaba hocam. Blogumda VGA kontrolcü tasarımı ile ilgili bir yazı yazmıştım, belki yardımcı olur.

http://bertantaskin.com/fpga-ile-vga-monitor-kontrolu/

MC_Skywalker

deneme amaçlı BASYS3 ile VGA çıkışı yapmıştım. zamanlamalar dikkat emek gerekiyor.

-- Create Date: 20.05.2017 21:14:07
-- Design Name: 
-- Module Name: VGA_Top_Level - Behavioral
---------------------------
-- 1366x768@60Hz için VGA
--Pixel Clock Fr: 85.86Mhz
--HOR
----1368 pixel görünür
----  72 Front Porch
---- 144 Senkron
---- 216 Back Porch
----1800 Toplam pixel
--VER
----768 Pixel Görünür
----  1 Front Proch
----  3 Senkron
---- 23 Back Porch
----795 Toplam Pixel
---------------------------

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;

entity VGA_Top_Level is
Port (
        Clock_100: IN STD_LOGIC; --VECTOR (1 downto 0);
        VGA_HS,VGA_VS: OUT STD_LOGIC;
        VGA_R,VGA_G,VGA_B: OUT STD_LOGIC_VECTOR (3 downto 0)
      );                            
end VGA_Top_Level;

architecture MAIN of VGA_Top_Level is
signal VGACLK: std_logic;
--------------------------------------------------
component PLL83Mhz is 
port (
        clk_in1: in std_logic;
        clk_out: out std_logic
       ); 
end component PLL83Mhz;
--------------------------------------------------
component SYNC is
 port (
       CLK : IN STD_LOGIC;
       HSYNC,VSYNC: OUT std_logic;
       R,G,B: OUT STD_LOGIC_VECTOR (3 downto 0) 
       );
end component SYNC;
begin 
C1: SYNC port map (VGACLK,VGA_HS,VGA_VS,VGA_R,VGA_G,VGA_B);
C2: PLL83Mhz port map(Clock_100, VGACLK);


end MAIN;

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;

Entity SYNC is
port (
        CLK : IN STD_LOGIC;
        HSYNC,VSYNC: OUT std_logic;
        R,G,B: OUT STD_LOGIC_VECTOR (3 downto 0)
      );
end SYNC;

architecture MAIN of SYNC is
        signal HPOS: integer range 0 to 1800:=0;
        signal VPOS: integer range 0 to 795:=0; 
    begin 
        process (CLK)
          begin 
            if(CLK'EVENT and CLK='1')then
             if(HPOS=1115 or VPOS=425) then 
               R<=(others=>'1');
               G<=(others=>'1');
               B<=(others=>'1');
             else
               R<=(others=>'0');
               G<=(others=>'0');
               B<=(others=>'0');
             end if;              
               if (HPOS<1800) then 
                HPOS<=HPOS+1;
               else 
                HPOS<=0;
               if (VPOS<795) then 
               VPOS<=VPOS+1;
               else 
               VPOS<=0;
               end if;
               end if;
               if (HPOS>72 and HPOS <216) then 
                 HSYNC <='0';
                 else 
                 HSYNC <='1';
               end if;  
               if (VPOS>1 and VPOS <4) then 
                 VSYNC <='0';
                 else 
                 VSYNC <='1';
               end if;
               if ((HPOS >0 and HPOS<432) or (VPOS>0 and VPOS<27))then
                 R<=(others=>'0');
                 G<=(others=>'0');
                 B<=(others=>'0'); 
               end if;
            end if;
        end process;
end  MAIN;
                 

Emre_Tuncay_

Geri dönüşünüz için teşekkür ederim kodunuzu deneyeceğim.

Emre_Tuncay_

Bu arada monitörüme zybo kartımı bağlayınca monitörümde şu uyarıyı alıyorum.



Sizce neden böyle bir hata alıyorum.

MC_Skywalker

Monitörün desteklemediği bir frekansa sahip sinyal gönderiyorsunuz.

1280x1024 60Hz için tavsiye edilen değerler aşağıdaki gibi.
Alıntı Yap
General timing
Screen refresh rate    60 Hz
Vertical refresh    63.981042654028 kHz
Pixel freq.    108.0 MHz
Horizontal timing (line)
Polarity of horizontal sync pulse is positive.

Scanline part    Pixels    Time [µs]
Visible area    1280    11.851851851852
Front porch    48    0.44444444444444
Sync pulse    112    1.037037037037
Back porch    248    2.2962962962963
Whole line    1688    15.62962962963
Vertical timing (frame)
Polarity of vertical sync pulse is positive.

Frame part    Lines    Time [ms]
Visible area    1024    16.004740740741
Front porch    1    0.01562962962963
Sync pulse    3    0.046888888888889
Back porch    38    0.59392592592593
Whole frame    1066    16.661185185185