VGA to HDMI

Use VGA to HDMI/DVI Converter IP

363

Step 1: Download hdmi_tx IP and add it to repository

Download HDMI/DVI IP Core, unzip it. Then click on the IP catalog as shown in figure 1.

Figure 1. IP Catalog in Project Manager
Figure 1. IP Catalog in Project Manager

Next, right click on Vivado Repositories and select add repository. Choose the HDMI_tx_1 folder that you downloaded and unzipped. Press ok.

Figure 2. Add Repository
Figure 2. Add Repository

You’ll see that a repository was added. Double click on the hdmi_tx IP

Figure 3.Double click on HDMI/DVI Encoder
Figure 3.Double click on HDMI/DVI Encoder

Customize IP dialog appears, set the parameters as shown. You may configure the color data widths to be smaller at first (you can re-configure the IP later by double clicking on it in your project file folder). Then press OK.

Figure 4. Customize IP Dialog
Figure 4. Customize IP Dialog

Generate output products dialog appears. Press “Generate”.

Figure 5. Generate output products
Figure 5. Generate output products

Verify that the IP block appeared to your design sources.

Figure 6. Verify if IP was added
Figure 6. Verify if IP was added

Step 2: Add Clocking Wizard IP

Since HDMI requires high speed clock frequency, you will use Clocking wizard to generate 25MHz and 125MHz clock frequencies. Go back to IP Catalog, and search for Clocking Wizard IP. Double click on the “Clocking Wizard”

Figure 7. Add Clocking Wizard
Figure 7. Add Clocking Wizard

Customize IP dialog appears for the clocking wizard. Select output clock tab and set frequencies for the output clocks as shown below. Press ok and generate output products. You will notice that Clocking wizard IP was added to the sources folder as well.

Figure 8. Clocking Wizard
Figure 8. Clocking Wizard

Step 3: Combine vga_controller module, hdmi_tx, and clocking wizard

To use these IP’s that you added, use the following code in your main WRAPPER file to tie these clocks into the system. Remember that pix_clock is 25MHz clock and pix_clkx5 is 125MHz. Make sure that you make the connections with the rest of the system properly.

clk_wiz_0 my_clock_wizard(
    // Clock out ports
    .clk_out1(pix_clk),       // output clk_out1
    .clk_out2(pix_clkx5),     // output clk_out2
    // Status and control signals
    .reset(rst), // input reset
    .locked(locked),       // output locked
   // Clock in ports
    .clk_in1(clk)  // input clk_in1
);     
hdmi_tx_0 my_hdmi (
  .pix_clk(pix_clk),                // input wire pix_clk
  .pix_clkx5(pix_clkx5),            // input wire pix_clkx5
  .pix_clk_locked(locked),          // input wire pix_clk_locked
  .rst(rst),                        // input wire rst
  .red(red),                        // input wire [3 : 0] red
  .green(green),                    // input wire [3 : 0] green
  .blue(blue),                      // input wire [3 : 0] blue
  .hsync(HS),                       // input wire hsync
  .vsync(VS),                       // input wire vsync
  .vde(vde),                        // input wire vde
  .aux0_din(4'd0),                  // input wire [3 : 0] aux0_din
  .aux1_din(4'd0),                  // input wire [3 : 0] aux1_din
  .aux2_din(4'd0),                  // input wire [3 : 0] aux2_din
  .ade(1'd0),                       // input wire ade
  .TMDS_CLK_P(TMDS_CLK_P),          // output wire TMDS_CLK_P
  .TMDS_CLK_N(TMDS_CLK_N),          // output wire TMDS_CLK_N
  .TMDS_DATA_P(TMDS_DATA_P),        // output wire [2 : 0] TMDS_DATA_P
  .TMDS_DATA_N(TMDS_DATA_N)          // output wire [2 : 0] TMDS_DATA_N
);