用D触发器实现2倍分频的Verilog描述? (

19 查阅
用D触发器实现2倍分频的Verilog描述? (汉王笔试)

参考答案:

正确答案:
module divide2( clk , clk_o, reset);
input clk , reset;
output clk_o;
wire in;
reg out ;
always @ ( posedge clk or posedge reset)
if ( reset)
out <= 0;
else
out <= in;
assign in = ~out;
assign clk

汉王