cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bmoore
Contributor
Contributor
362 Views
Registered: ‎01-09-2018

1ppc to 2ppc conversion

Does anyone have any native video (not axis) RTL code for 1 pixel/clk to/from 2 pixel/clk conversion? I don't feel like re-inventing the wheel.

thanks

Tags (1)
1 Reply
reaiken
Explorer
Explorer
344 Views
Registered: ‎07-18-2011

@bmoore 

Use an asymmetric FIFO in your RTL code.

For example,  24bit in/48-bit out, using a common-clock or independent-clock FIFO using a BRAM.   Distributed RAM implementations won't allow asymmetric FIFOs.

You could also use a simple register delay to do the conversion and register the output with a half-rate clock,  something like shown below, but pay attention to your clock crossing, or use a clock enable and only one clock.

always@(posedge clk) begin

    rgb_d[23:0] <= rgb_in[23:0];

    rgb_2ppc[47:0] <= {rgb_in[23:0],rgb_d[23:0]}; 

end

always@(posedge clk_div2) begin

    rgb_out[47:0] <= rgb_2ppc[47:0];

end