half_sel.v

来自「用VERILOG HDL实现的任意 频率分频器源代码」· Verilog 代码 · 共 31 行

V
31
字号
//--------------------------------------//
//module name: Half_sel-----------------//
//file   name: Half_sel.v---------------//
//module function:
//            Xor select module---------//
//Coder      : h0nly--------------------//
//Time       : 2008-08-13th 11:00pm-----//
//--------------------------------------//
module Half_sel(sel,
				a,
				b,
				c
				);
//output ports----------------------------
output c;
//input  ports----------------------------
input  b, a;
input  sel;
//inner parameter declaration-------------
wire   w;
//code starts here------------------------
xor xor_ (w, a, b);
//----------------------------------------
//sel |  function
//----------------------------------------
// 1  |  half_integer_Freq_div
// 0  |  integer_Freq_div
//----------------------------------------
assign c = sel ? w : a;
//
endmodule//End Of Module Half_sel

⌨️ 快捷键说明

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