ソースを参照

projects/rgb_panel: Only start scanning after the first frame is written

This avoid displaying garbage on boot

Fixes #6

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut 5 年 前
コミット
1f3b5ea6e1
1 ファイル変更11 行追加0 行削除
  1. 11 0
      projects/rgb_panel/rtl/top.v

+ 11 - 0
projects/rgb_panel/rtl/top.v

@@ -107,6 +107,9 @@ module top (
 	wire frame_swap;
 	wire frame_rdy;
 
+	// Control
+	reg  ctrl_run;
+
 
 	// Hub75 driver
 	// ------------
@@ -134,6 +137,7 @@ module top (
 		.fbw_wren(fbw_wren),
 		.frame_swap(frame_swap),
 		.frame_rdy(frame_rdy),
+		.ctrl_run(ctrl_run),
 		.cfg_pre_latch_len(8'h80),
 		.cfg_latch_len(8'h80),
 		.cfg_post_latch_len(8'h80),
@@ -142,6 +146,13 @@ module top (
 		.rst(rst)
 	);
 
+	// Only start the scan when we have our first frame
+	always @(posedge clk or posedge rst)
+		if (rst)
+			ctrl_run <= 1'b0;
+		else
+			ctrl_run <= ctrl_run | frame_swap;
+
 
 	// Host Streaming
 	// --------------