Added all Testbenches to Modelsim and confirmed working operation
This commit is contained in:
1 parent
c4ebde7692
commit
05361dcf70
349 files changed
+15719
-1096
No files matched your search
@@ -0,0 +1,19 @@
|
||||
`ifndef LU_H_SV
|
||||
`define LU_H_SV
|
||||
module lu #(parameter width = 2) (
|
||||
input logic [1:0] op,
|
||||
input logic [2**width-1:0] A,
|
||||
input logic [2**width-1:0] B,
|
||||
output logic [2**width-1:0] Y);
|
||||
|
||||
always_comb begin
|
||||
case (op)
|
||||
2'b00: Y = A & B;
|
||||
2'b01: Y = A | B;
|
||||
2'b10: Y = A ^ B;
|
||||
2'b11: Y = ~(A | B);
|
||||
default:Y = '0;
|
||||
endcase
|
||||
end
|
||||
endmodule
|
||||
`endif
|
||||
Reference in new issue
Block a user