Implement the following circuit:
图中有一个 D 触发器与一个异或门,触发器的输出 q 和输入信号 in 一起作为异或门的输入。异或门的输入作为触发器的输入 d
module top_module (
input clk,
input in,
output reg out);
always @(posedge clk) begin
out <= in ^ out;
end
endmodule
Implement the following circuit:
图中有一个 D 触发器与一个异或门,触发器的输出 q 和输入信号 in 一起作为异或门的输入。异或门的输入作为触发器的输入 d
module top_module (
input clk,
input in,
output reg out);
always @(posedge clk) begin
out <= in ^ out;
end
endmodule