分析下面这段用于描述有限状态机(FSM)次态逻辑的 `always` 块。在 `S1` 状态下,如果输入信号 `in` 为 `0`,代码中没有明确指定 `next_state` 的值。请问一个典型的逻辑综合工具在处理这段代码时,最有可能为 `next_state` 推断出什么类型的硬件电路?
parameter IDLE=0, S1=1, S2=2; reg [1:0] current_state, next_state; reg in; always @(current_state or in) begin // 默认赋值可以避免latch,但这里特意省略 // next_state = current_state; case (current_state) IDLE: if (in) next_state = S1; else next_state = IDLE; S1: if (in) next_state = S2; // 当 in 为 0 时, next_state 未被赋值 S2: if (!in) next_state = IDLE; else next_state = S2; default: next_state = IDLE; endcase end
