本帖最后由 kdurant 于 2012-5-13 23:15 编辑
always @(posedge SMG_CLK or negedge RSTn)
begin
if(~RSTn)
begin
SMG_DATA <= 0;
count_sent <= 0;
SELECT_ALL <= 8'b00000000;
SELECT_1st <= 8'b11100000;
SELECT_2nd <= 8'b11010000;
SELECT_3th <= 8'b10110000;
SELECT_4th <= 8'b01110000;
end
else
begin
if(count_sent < 7)
begin
count_sent <= count_sent + 1;
SMG_DATA <= SELECT_2nd[7-count_sent];
end
else
count_sent <= 0;
end
end
后仿真的时候count_sent居然在SMG_CLK跳变之前就加1了,求解释 |