38译码器
// --------------------------------------------------------------------
// >>>>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<
// --------------------------------------------------------------------
// Module: Decode38
//
// Author: Step
//
// Description: Decode38
//
// Web: www.ecbcamp.com
//
// --------------------------------------------------------------------
// Code Revision History :
// --------------------------------------------------------------------
// Version: |Mod. Date: |Changes Made:
// V1.0 |2015/11/11 |Initial ver
// --------------------------------------------------------------------
module Decode38
(
input Enable,
input [2:0] A_in,
output reg [7:0] Y_out
);
always@(A_in or Enable) begin
if (Enable)
case (A_in)
3'b000: Y_out = 8'b11111110;
3'b001: Y_out = 8'b11111101;
3'b010: Y_out = 8'b11111011;
3'b011: Y_out = 8'b11110111;
3'b100: Y_out = 8'b11101111;
3'b101: Y_out = 8'b11011111;
3'b110: Y_out = 8'b10111111;
3'b111: Y_out = 8'b01111111;
default:Y_out = 8'b11111111;
endcase
else Y_out = 8'b11111111;
end
endmodule