Files
APS/Other/vector_abs/max_min.v
Andrei Solodovnikov f4c0960704 Initial commit
2023-09-07 17:06:55 +03:00

19 lines
250 B
Verilog

module max_min(
input [31:0] a,
input [31:0] b,
output reg[31:0] max,
output reg[ 3:0] min
);
always @(*) begin
if(a > b) begin
max = a;
min = b;
end
else begin
max = b;
min = b;
end
end
endmodule