RGB888转RGB565:
wire [23:0] rgb_888_i;
wire [15:0] rgb_565_o;
assign rgb_565_o = {{rgb_888_i[23:19], rgb_888_i[15:10], rgb_888_i[7:3]}};
RGB565转RGB888:
wire [15:0] rgb_565_i;
wire [23:0] rgb_888_o;
assign rgb_888_o = {rgb_565_i[15:11], 3'b000, rgb_565_i[10:5], 2'b00, rgb_565_i[4:0], 3'b000};