Initial commit
This commit is contained in:
37
Exp1-2-3/Exp1-2-3.srcs/sources_1/new/LU.v
Normal file
37
Exp1-2-3/Exp1-2-3.srcs/sources_1/new/LU.v
Normal file
@@ -0,0 +1,37 @@
|
||||
`timescale 1ns / 1ps
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
// Company:
|
||||
// Engineer:
|
||||
//
|
||||
// Create Date: 2024/09/25 20:04:39
|
||||
// Design Name:
|
||||
// Module Name: LU
|
||||
// Project Name:
|
||||
// Target Devices:
|
||||
// Tool Versions:
|
||||
// Description:
|
||||
//
|
||||
// Dependencies:
|
||||
//
|
||||
// Revision:
|
||||
// Revision 0.01 - File Created
|
||||
// Additional Comments:
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
module LU(a, b, s, Y);
|
||||
input a, b;
|
||||
input [1:0] s;
|
||||
output Y;
|
||||
reg Y;
|
||||
always @(*) begin
|
||||
case (s)
|
||||
2'b00: Y = a & b;
|
||||
2'b01: Y = a | b;
|
||||
2'b10: Y = a ^ b;
|
||||
2'b11: Y = 0;
|
||||
default: Y = 0;
|
||||
endcase
|
||||
end
|
||||
endmodule
|
||||
Reference in New Issue
Block a user