Commit 7c437ba6 authored by Iulian Gheorghiu's avatar Iulian Gheorghiu

Compact some wires

parent b11ffd0a
......@@ -43,14 +43,8 @@ module hdmi_out #(
);
reg [2:0]clk5_cnt;/* This is the counter used to create the reference clock divided by 5 */
wire clk_5;/* This is a reference clock divided by 5 */
reg clk_10;/* This is a reference clock divided by 10 */
/* The 5 wires to feed the OSERDES for channel 0 */
wire hdmi_tx_0_D0;
wire hdmi_tx_0_D1;
wire hdmi_tx_0_D2;
wire hdmi_tx_0_D3;
wire hdmi_tx_0_D4;
/* The serial data intermediate wire to go to differential output buffer for channel 0 */
wire hdmi_tx_p_0;
/* The 8 bit wire that represent the XOR/NXOR color symbol for channel 0 */
......@@ -74,12 +68,6 @@ reg hdmi_tx_symbol_0_D7;
reg hdmi_tx_symbol_0_D8;
reg hdmi_tx_symbol_0_D9;
/* The 5 wires to feed the OSERDES for channel 1 */
wire hdmi_tx_1_D0;
wire hdmi_tx_1_D1;
wire hdmi_tx_1_D2;
wire hdmi_tx_1_D3;
wire hdmi_tx_1_D4;
/* The serial data intermediate wire to go to differential output buffer for channel 1 */
wire hdmi_tx_p_1;
/* The 8 bit wire that represent the XOR/NXOR color symbol for channel 1 */
......@@ -103,12 +91,6 @@ reg hdmi_tx_symbol_1_D7;
reg hdmi_tx_symbol_1_D8;
reg hdmi_tx_symbol_1_D9;
/* The 5 wires to feed the OSERDES for channel 2 */
wire hdmi_tx_2_D0;
wire hdmi_tx_2_D1;
wire hdmi_tx_2_D2;
wire hdmi_tx_2_D3;
wire hdmi_tx_2_D4;
/* The serial data intermediate wire to go to differential output buffer for channel 2 */
wire hdmi_tx_p_2;
/* The 8 bit wire that represent the XOR/NXOR color symbol for channel 2 */
......@@ -138,26 +120,26 @@ reg [3:0]bias_cnt_2;
reg shift_compensate_clk10;
assign clk_5 = clk5_cnt == 'h1 | clk5_cnt == 'h2;/* This is a clock divided by 5 of the reference clock, we use two levels to increase the positive pule of the clock. */
wire clk_5 = clk5_cnt == 'h1 | clk5_cnt == 'h2;/* This is a clock divided by 5 of the reference clock, we use two levels to increase the positive pule of the clock. */
assign lcd_clk_out = clk_10;
/* Here we switch between last significative and most significative 5 bits of each symbol fo feed the 5Bit OSERDES channel 0. */
assign hdmi_tx_0_D0 = ~clk_10 ? hdmi_tx_symbol_0_D5 : hdmi_tx_symbol_0_D0;
assign hdmi_tx_0_D1 = ~clk_10 ? hdmi_tx_symbol_0_D6 : hdmi_tx_symbol_0_D1;
assign hdmi_tx_0_D2 = ~clk_10 ? hdmi_tx_symbol_0_D7 : hdmi_tx_symbol_0_D2;
assign hdmi_tx_0_D3 = ~clk_10 ? hdmi_tx_symbol_0_D8 : hdmi_tx_symbol_0_D3;
assign hdmi_tx_0_D4 = ~clk_10 ? hdmi_tx_symbol_0_D9 : hdmi_tx_symbol_0_D4;
/* Here we switch between last significative and most significative 5 bits of each symbol fo feed the 5Bit OSERDES channel 1. */
assign hdmi_tx_1_D0 = ~clk_10 ? hdmi_tx_symbol_1_D5 : hdmi_tx_symbol_1_D0;
assign hdmi_tx_1_D1 = ~clk_10 ? hdmi_tx_symbol_1_D6 : hdmi_tx_symbol_1_D1;
assign hdmi_tx_1_D2 = ~clk_10 ? hdmi_tx_symbol_1_D7 : hdmi_tx_symbol_1_D2;
assign hdmi_tx_1_D3 = ~clk_10 ? hdmi_tx_symbol_1_D8 : hdmi_tx_symbol_1_D3;
assign hdmi_tx_1_D4 = ~clk_10 ? hdmi_tx_symbol_1_D9 : hdmi_tx_symbol_1_D4;
/* Here we switch between last significative and most significative 5 bits of each symbol fo feed the 5Bit OSERDES channel 2. */
assign hdmi_tx_2_D0 = ~clk_10 ? hdmi_tx_symbol_2_D5 : hdmi_tx_symbol_2_D0;
assign hdmi_tx_2_D1 = ~clk_10 ? hdmi_tx_symbol_2_D6 : hdmi_tx_symbol_2_D1;
assign hdmi_tx_2_D2 = ~clk_10 ? hdmi_tx_symbol_2_D7 : hdmi_tx_symbol_2_D2;
assign hdmi_tx_2_D3 = ~clk_10 ? hdmi_tx_symbol_2_D8 : hdmi_tx_symbol_2_D3;
assign hdmi_tx_2_D4 = ~clk_10 ? hdmi_tx_symbol_2_D9 : hdmi_tx_symbol_2_D4;
/* Here we switch between last significative and most significative 5 bits of each symbol to feed the 5Bit OSERDES channel 0. */
wire hdmi_tx_0_D0 = ~clk_10 ? hdmi_tx_symbol_0_D5 : hdmi_tx_symbol_0_D0;
wire hdmi_tx_0_D1 = ~clk_10 ? hdmi_tx_symbol_0_D6 : hdmi_tx_symbol_0_D1;
wire hdmi_tx_0_D2 = ~clk_10 ? hdmi_tx_symbol_0_D7 : hdmi_tx_symbol_0_D2;
wire hdmi_tx_0_D3 = ~clk_10 ? hdmi_tx_symbol_0_D8 : hdmi_tx_symbol_0_D3;
wire hdmi_tx_0_D4 = ~clk_10 ? hdmi_tx_symbol_0_D9 : hdmi_tx_symbol_0_D4;
/* Here we switch between last significative and most significative 5 bits of each symbol to feed the 5Bit OSERDES channel 1. */
wire hdmi_tx_1_D0 = ~clk_10 ? hdmi_tx_symbol_1_D5 : hdmi_tx_symbol_1_D0;
wire hdmi_tx_1_D1 = ~clk_10 ? hdmi_tx_symbol_1_D6 : hdmi_tx_symbol_1_D1;
wire hdmi_tx_1_D2 = ~clk_10 ? hdmi_tx_symbol_1_D7 : hdmi_tx_symbol_1_D2;
wire hdmi_tx_1_D3 = ~clk_10 ? hdmi_tx_symbol_1_D8 : hdmi_tx_symbol_1_D3;
wire hdmi_tx_1_D4 = ~clk_10 ? hdmi_tx_symbol_1_D9 : hdmi_tx_symbol_1_D4;
/* Here we switch between last significative and most significative 5 bits of each symbol to feed the 5Bit OSERDES channel 2. */
wire hdmi_tx_2_D0 = ~clk_10 ? hdmi_tx_symbol_2_D5 : hdmi_tx_symbol_2_D0;
wire hdmi_tx_2_D1 = ~clk_10 ? hdmi_tx_symbol_2_D6 : hdmi_tx_symbol_2_D1;
wire hdmi_tx_2_D2 = ~clk_10 ? hdmi_tx_symbol_2_D7 : hdmi_tx_symbol_2_D2;
wire hdmi_tx_2_D3 = ~clk_10 ? hdmi_tx_symbol_2_D8 : hdmi_tx_symbol_2_D3;
wire hdmi_tx_2_D4 = ~clk_10 ? hdmi_tx_symbol_2_D9 : hdmi_tx_symbol_2_D4;
/* Calculate how many one bits are in each color data. */
wire [3:0]nr_of_ones_r = lcd_r[0] + lcd_r[1] + lcd_r[2] + lcd_r[3] + lcd_r[4] + lcd_r[5] + lcd_r[6] + lcd_r[7];
wire [3:0]nr_of_ones_g = lcd_g[0] + lcd_g[1] + lcd_g[2] + lcd_g[3] + lcd_g[4] + lcd_g[5] + lcd_g[6] + lcd_g[7];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment