Gowin Vol.3 第3部第2章 リスト3

wire bayer_out_de;
wire [9:0] out_data_r;
wire [9:0] out_data_g;
wire [9:0] out_data_b;

//—————————
bayer_encoder bayer0 (
.clk(PIXCLK),
.reset(1’b0),

.vsync_i(~VSYNC),
.de_i(HREF),
.data_i(PIXDATA),

.de_o(bayer_out_de),
.data_r_o(out_data_r),
.data_g_o(out_data_g),
.data_b_o(out_data_b)
);

assign cam_data = {out_data_r[9:5] | out_data_r[4], out_data_g[9:4] | out_data_g
[3], out_data_b[9:5] | out_data_b[4]};