- UID
- 809227
|
always @(posedge clk or negedge rst)
if (rst)
begin
sta_condition <= #1 1'b0;
sto_condition <= #1 1'b0;
end
else
begin
sta_condition <= #1 ~sSDA & dSDA & sSCL;//
sto_condition <= #1 sSDA & ~dSDA & sSCL;//
end
always @(posedge clk or negedge rst)
else if (rst)
busy <= #1 1'b0;
else
busy <= #1 sta_condition & ~sto_condition;
由于两个always模块都是在clk下触发,在第二个always模块中如果来了一个clk上升沿busy按照sta_condition和sto_condition在clk上升沿以前的值变化还是按照经过此上升沿后的新值变化呢? |
|