分析一下超标的路径, 看看延时在各段分布情况. 就可以找到原因.
我大致看了下, DATA_10BIT_OUT_N的输入逻辑太复杂了.
可以把每个case分支都赋给一个reg, 采用寄存器方式. 然后延时一时钟, 直接赋给DATA_10BIT_OUT.
always@(posedge SYSCLK or negedge RST_B)
begin
if(!RST_B) begin
DATA_10BIT_OUT <= 0;
DATA_10BIT_OUT_LIST[0] <= 0;
DATA_10BIT_OUT_LIST[1] <= 0;
DATA_10BIT_OUT_LIST[2] <= 0;
DATA_10BIT_OUT_LIST[3] <= 0;
DATA_10BIT_OUT_LIST[4] <= 0;
DATA_10BIT_OUT_LIST[5] <= 0;
DATA_10BIT_OUT_LIST[6] <= 0;
DATA_10BIT_OUT_LIST[7] <= 0;
DATA_10BIT_OUT_LIST[8] <= 0;
DATA_10BIT_OUT_LIST[9] <= 0;
DATA_10BIT_OUT_LIST[10] <= 0;
DATA_10BIT_OUT_LIST[11] <= 0;
DATA_10BIT_OUT_LIST[12] <= 0;
DATA_10BIT_OUT_LIST[13] <= 0;
end
else begin
DATA_10BIT_OUT_LIST[0] <= {1'h0,
VIDEO_7BIT_IN_REG_7[1] ,
VIDEO_7BIT_IN_REG_7[0] ,
VIDEO_7BIT_IN_0[6] ,
VIDEO_7BIT_IN_0[5] ,
VIDEO_7BIT_IN_0[4] ,
VIDEO_7BIT_IN_0[3] ,
VIDEO_7BIT_IN_0[2] ,
VIDEO_7BIT_IN_0[1] ,
VIDEO_7BIT_IN_0[0]
};
DATA_10BIT_OUT_LIST[1] <= {1'h0,
VIDEO_7BIT_IN_REG_7[3] ,
VIDEO_7BIT_IN_REG_7[2] ,
VIDEO_7BIT_IN_1[6] ,
VIDEO_7BIT_IN_1[5] ,
VIDEO_7BIT_IN_1[4] ,
VIDEO_7BIT_IN_1[3] ,
VIDEO_7BIT_IN_1[2] ,
VIDEO_7BIT_IN_1[1] ,
VIDEO_7BIT_IN_1[0]
};
DATA_10BIT_OUT_LIST[2] <= {1'h0,
VIDEO_7BIT_IN_RE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N_13[6] ,
VIDEO_7BIT_IN_13[5] ,
VIDEO_7BIT_IN_13[4] ,
VIDEO_7BIT_IN_13[3] ,
VIDEO_7BIT_IN_13[2] ,
VIDEO_7BIT_IN_13[1] ,
VIDEO_7BIT_IN_13[0]
};
DATA_10BIT_OUT_LIST[13] <={1'h1,
1'h1,
1'h0,
VIDEO_7BIT_IN_14[6] ,
VIDEO_7BIT_IN_14[5] ,
VIDEO_7BIT_IN_14[4] ,
VIDEO_7BIT_IN_14[3] ,
VIDEO_7BIT_IN_14[2] ,
VIDEO_7BIT_IN_14[1] ,
VIDEO_7BIT_IN_14[0]
};
case(COUNTER)
4'd0 : DATA_10BIT_OUT <= DATA_10BIT_OUT_LIST[0];
4'd1 : DATA_10BIT_OUT <= DATA_10BIT_OUT_LIST[1];
4'd2 : DATA_10BIT_OUT <= DATA_10BIT_OUT_LIST[2];
4'd3 : DATA_10BIT_OUT <= DATA_10BIT_OUT_LIST[3];
4'd4 : DATA_10BIT_OUT <= DATA_10BIT_OUT_LIST[4];
4'd5 : DATA_10BIT_OUT <= DATA_10BIT_OUT_LIST[5];
4'd6 : DATA_10BIT_OUT <= DATA_10BIT_OUT_LIST[6];
//-----------second 8v------------
4'd7 : DATA_10BIT_OUT <= DATA_10BIT_OUT_LIST[7];
4'd8 : DATA_10BIT_OUT <= DATA_10BIT_OUT_LIST[8];
4'd9 : DATA_10BIT_OUT <= DATA_10BIT_OUT_LIST[9];
4'd10 : DATA_10BIT_OUT <= DATA_10BIT_OUT_LIST[10];
4'd11 : DATA_10BIT_OUT <= DATA_10BIT_OUT_LIST[11];
4'd12 : DATA_10BIT_OUT <= DATA_10BIT_OUT_LIST[12];
4'd13 : DATA_10BIT_OUT <= DATA_10BIT_OUT_LIST[13];
endcase |