parameter A, B, C, D;
reg state, next;
reg 变量位数与 parameter 值相互匹配;
如: parameter A = 0, B = 1, C = 2, D = 3; 则 reg [1:0] state, next;
parameter A = 4' h0, B = 4' h2, C = 4' h4, D = 4' h8; 则 reg [3:0] state, next;
parameter A, B, C, D;
reg state, next;
reg 变量位数与 parameter 值相互匹配;
如: parameter A = 0, B = 1, C = 2, D = 3; 则 reg [1:0] state, next;
parameter A = 4' h0, B = 4' h2, C = 4' h4, D = 4' h8; 则 reg [3:0] state, next;