非常不错。现在的状态机在高速设计时都用one-hot编码方式。 但是one-hot编码在代码里也有两种不同的书写,第一种就是采用上述的方法,还有一种如下面所示的编码方式:
always @ (*) begin
ca本人 (1'b1) // synthesis parallel_case full_case
cur_syncn[0]: begin end
cur_syncn[1]: begin end
cur_syncn[2]: begin end
cur_syncn[3]: begin end
cur_syncn[4]: begin end
endcase
end
always @ (posedge clk) begin
cur_syncn <= nxt_syncn;
end
后一种在很多书里面提到,综合后的速度应该比第一种更快一些,为什么?
|