Skip to content

Commit

Permalink
axi_hdmi_tx: Add parameter to configure the output clock polarity
Browse files Browse the repository at this point in the history
In order to maximize the window where it is safe to capture data we ideally
want to launch data on the opposite edge to which it is captured. Since the
edge on which data is captured depends on the connected device add a
parameter that allows to configure the launching edge.

Signed-off-by: Lars-Peter Clausen <[email protected]>
  • Loading branch information
larsclausen committed Nov 3, 2015
1 parent 296093a commit e98382f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions library/axi_hdmi_tx/axi_hdmi_tx.v
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ module axi_hdmi_tx (
parameter PCORE_Cr_Cb_N = 0;
parameter PCORE_DEVICE_TYPE = 0;
parameter PCORE_EMBEDDED_SYNC = 0;
/* 0 = Launch on rising edge, 1 = Launch on falling edge */
parameter OUT_CLK_POLARITY = 0;

localparam XILINX_7SERIES = 0;
localparam XILINX_ULTRASCALE = 1;
Expand Down Expand Up @@ -376,8 +378,8 @@ module axi_hdmi_tx (
if (PCORE_DEVICE_TYPE == XILINX_ULTRASCALE) begin
ODDRE1 #(.SRVAL(1'b0)) i_clk_oddr (
.SR (1'b0),
.D1 (1'b1),
.D2 (1'b0),
.D1 (~OUT_CLK_POLARITY),
.D2 (OUT_CLK_POLARITY),
.C (hdmi_clk),
.Q (hdmi_out_clk));
end
Expand All @@ -389,8 +391,8 @@ module axi_hdmi_tx (
.sset (1'b0),
.oe (1'b1),
.outclocken (1'b1),
.datain_h (1'b1),
.datain_l (1'b0),
.datain_h (~OUT_CLK_POLARITY),
.datain_l (OUT_CLK_POLARITY),
.outclock (hdmi_clk),
.oe_out (),
.dataout (hdmi_out_clk));
Expand All @@ -400,8 +402,8 @@ module axi_hdmi_tx (
.R (1'b0),
.S (1'b0),
.CE (1'b1),
.D1 (1'b1),
.D2 (1'b0),
.D1 (~OUT_CLK_POLARITY),
.D2 (OUT_CLK_POLARITY),
.C (hdmi_clk),
.Q (hdmi_out_clk));
end
Expand Down

0 comments on commit e98382f

Please sign in to comment.