|
地板
樓主 |
發表于 2009-8-17 16:14:15
|
只看該作者
always@(posedge spck)// or negedge erd)
begin
if (spck_cnt==15) //after clock 15,will have a delay
begin
ext_in_wr <= 1'b1;//ext_in data to ext_in FIFO
ext_in_wdata[17:0] <= {ea0,1'b0,ext_in_buf[14:0],mosi};//{ea0,1'b0,ext_in_buf[14:0],mosi};
test_data[17:0]<= test_data[17:0]+1'b1;//{ea0,1'b0,ext_in_buf[14:0],mosi};//{ea0,1'b0,ext_in_buf[14:0],mosi};
end
else
begin
ext_in_wr<=0;
ext_in_buf[14:0]<={ext_in_buf[13:0],mosi};
end
// if (ea0==ea0_old)
// spck_cnt<=0;
// else
spck_cnt<=spck_cnt+1;
ea0_old<=ea0;
end |
|