mirror of
https://github.com/MPSU/APS.git
synced 2025-09-16 09:40:10 +00:00
Перевод Verilog-кода на SystemVerilog
This commit is contained in:
19
Other/vector_abs/max_min.sv
Normal file
19
Other/vector_abs/max_min.sv
Normal file
@@ -0,0 +1,19 @@
|
||||
module max_min(
|
||||
input logic [31:0] a,
|
||||
input logic [31:0] b,
|
||||
output logic [31:0] max,
|
||||
output logic [ 3:0] min
|
||||
);
|
||||
|
||||
always_comb @(*) 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