赞
踩
module seqdet(x,z,clk,rst,state);
input x,clk,rst;
output z;
output[2:0] state;
reg[2:0] state;
wire z;
parameter IDLE='d0, A='d1, B='d2,
C='d3, D='d4,
E='d5;
assign z = ( state==D)? 1 : 0; //?x=0???????E?
//???D??x??1???
//???1????? state==E && x==0 ??
always @(posedge clk)
if(!rst)
begin
state <= IDLE;
end
else
casex(state)
IDLE : if(x==1)
begin
state <= A;
end
A:if(x==1)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。