mirror of
https://github.com/MPSU/APS.git
synced 2025-09-15 17:20:10 +00:00
Initial commit
This commit is contained in:
19
Other/vector_abs/max_min.v
Normal file
19
Other/vector_abs/max_min.v
Normal file
@@ -0,0 +1,19 @@
|
||||
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
|
Reference in New Issue
Block a user