rgb data passthrough with new timings works
This commit is contained in:
parent
fce90e9269
commit
c1d4f8a55f
1 changed files with 13 additions and 7 deletions
20
src/top.v
20
src/top.v
|
|
@ -75,30 +75,36 @@ always @(posedge clk) begin
|
|||
cb_green <= 0;
|
||||
cb_blue <= 0;
|
||||
cb_blank <= 0;
|
||||
cb_cnt <= 0;
|
||||
cb_bar <= 0;
|
||||
|
||||
end else if (cb_vactive && (cb_x == CB_H_FP + CB_HRES - 1)) begin
|
||||
cb_blank <= 1;
|
||||
cb_cnt <= 0;
|
||||
cb_bar <= 0;
|
||||
|
||||
end
|
||||
|
||||
if (!cb_blank) begin
|
||||
cb_cnt <= cb_cnt + 1;
|
||||
|
||||
if (cb_cnt == 255) begin
|
||||
if (cb_cnt == 127) begin
|
||||
cb_cnt <= 0;
|
||||
cb_bar <= cb_bar + 1;
|
||||
|
||||
if (cb_bar == 7) begin
|
||||
cb_bar <= 0;
|
||||
end
|
||||
|
||||
cb_red <= {8{cb_bar[0]}};
|
||||
cb_green <= {8{cb_bar[1]}};
|
||||
cb_blue <= {8{cb_bar[2]}};
|
||||
end
|
||||
end
|
||||
|
||||
if (cb_y < CB_V_FP + 30 || cb_y > CB_V_FP + CB_VRES - 30) begin
|
||||
cb_red <= {8{cb_bar[0]}};
|
||||
cb_green <= {8{cb_bar[1]}};
|
||||
cb_blue <= {8{cb_bar[2]}};
|
||||
|
||||
end else begin
|
||||
cb_red <= in_red;
|
||||
cb_green <= in_green;
|
||||
cb_blue <= in_blue;
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue