rom_color_gen_rgb.v

来自「视频采集」· Verilog 代码 · 共 57 行

V
57
字号
module rom_color_gen_RGB(	in,	R_out,	G_out,	B_out	);input	[3:0]	in;output	[7:0]	R_out;output	[7:0]	G_out;output	[7:0]	B_out;reg	[7:0]	R_out,G_out,B_out;always @ (in)	case(in)	'b0101:     begin					//white					R_out = 8'd255;					G_out = 8'd255;					B_out = 8'd255;				end	'b0110:     begin					//yellow					R_out = 8'd255;					G_out = 8'd255;					B_out = 8'd0;				end	'b0111:     begin					//cyan					R_out = 8'd0;					G_out = 8'd255;					B_out = 8'd255;				end	'b1001:     begin					//green					R_out = 8'd0;					G_out = 8'd255;					B_out = 8'd0;				end	'b1010:     begin					//Magenta					R_out = 8'd255;					G_out = 8'd0;					B_out = 8'd255;				end	'b1011:     begin					//Red					R_out = 8'd255;					G_out = 8'd0;					B_out = 8'd0;				end	'b1101:     begin					//Blue					R_out = 8'd0;					G_out = 8'd0;					B_out = 8'd255;				end	default:	begin					R_out = 8'd0;					G_out = 8'd0;					B_out = 8'd0;				end        endcaseendmodule 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?