非阻塞赋值符号右边的信号值要看前一个时钟的数值
module top(
input wire sclk,
input wire rst_n,
output reg sw,
output reg skip_en
);
always @(posedge sclk or negedge rst_n) begin
if(!rst_n) begin
sw <= 1'b0;
end
else begin
sw <= ~sw;
...
原创
2022-01-15 16:41:53 ·
130 阅读 ·
0 评论