为什么这两段不合在一个always里面写

2019-07-16 01:57发布

为什么这两段不合在一个always里面写

/* Detecting STOP Condition on the SDA Bus */
always @ (posedge sda or posedge reset)
if (reset) begin
    stop <= 0;
end else if (sclk) begin
    stop <= 1;
end


/* Detecting START Condition on the SDA Bus */
always @ (negedge sda or posedge reset)
if (reset) begin
    start <= 0;
end else if (sclk) begin
    start <= 1;
end

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。