|
|
|
@ -7,11 +7,6 @@ module dt(
|
|
|
|
|
output reg S1, S2, S3, S4
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
parameter _SELECT_1 = 4'b1110;
|
|
|
|
|
parameter _SELECT_2 = 4'b1101;
|
|
|
|
|
parameter _SELECT_3 = 4'b1011;
|
|
|
|
|
parameter _SELECT_4 = 4'b0111;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ABCDEFG
|
|
|
|
|
parameter _SHOW_0 = 8'B1111110;
|
|
|
|
@ -55,13 +50,12 @@ always @(data) begin
|
|
|
|
|
default: ;
|
|
|
|
|
endcase
|
|
|
|
|
|
|
|
|
|
case (data[7:5])
|
|
|
|
|
3'b000: {S4, S3, S2, S1} = _SELECT_1;
|
|
|
|
|
3'b001: {S4, S3, S2, S1} = _SELECT_2;
|
|
|
|
|
3'b010: {S4, S3, S2, S1} = _SELECT_3;
|
|
|
|
|
3'b011: {S4, S3, S2, S1} = _SELECT_4;
|
|
|
|
|
default: {S4, S3, S2, S1} = 4'b1111;
|
|
|
|
|
endcase
|
|
|
|
|
if (data[7]) begin
|
|
|
|
|
{S4, S3, S2, S1} = ~(4'b0001 << data[6:5]);
|
|
|
|
|
end
|
|
|
|
|
else begin
|
|
|
|
|
{S4, S3, S2, S1} = 4'b1111;
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
endmodule
|