分类: 嵌入式
2011-06-10 09:28:37
//状态机设计的例子
module FSM(clk,clr,out,start,step2,step3);
input clk,clr,start,step2,step3;
output[2:0] out;
reg[2:0] out;
reg[1:0] state,next_state;
parameter
state2=2'b11,state3=2'b10;
always @(posedge clk or posedge
clr)
begin
end
always @(state or start or step2 or
step3)
begin
case (state)
end
always
@(state)
begin
case(state)
endcase
end