Build an XOR gate three ways, using an assign statement, a combinational always block, and a clocked always block. Note that the clocked always block produces a different circuit from the other two: There is a flip-flop so the output is delayed.
文章来源:https://www.toymoban.com/news/detail-636856.html
// synthesis verilog_input_version verilog_2001
module top_module(
input clk,
input a,
input b,
output wire out_assign,
output reg out_always_comb,
output reg out_always_ff );
assign out_assign=a^b;
always@(*) begin
out_always_comb=a^b;
end
always@(posedge clk) begin
out_always_ff<=a^b;
end
endmodule
文章来源地址https://www.toymoban.com/news/detail-636856.html
到了这里,关于[HDLBits] Alwaysblock2的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!