题目描述:构造一个顶层模块--包含一个mux和dff
使用行为级语言描述一个模块
module top_module (
input clk,
input L,
input r_in,
input q_in,
output reg Q);
wire w1;
always
begin
case(L)
'b0:w1= q_in;
'b1:w1= r_in;
endcase
@(posedge clk)
Q = w1;
end
endmodule