你这要啥呢?语法?
module state(
parameter A = a,
parameter B = b)
(
input clk ,
input rst ,
input ........,
input [A-1:0] state_A,
input[B -1:0]state_B
output ..........
);
always @(posedge clk or posedge rst)
if(rst)
begin
...........
............
end
else
begin
case (state_A)
A'hxx:
begin
case(state_B)
B'hxxxx:
begin
.........
end
endcase
.........
.........
end
endcase
end
endmodule