ELEC40006-P1-CW/max_min.v

11 lines
222 B
Coq
Raw Normal View History

2020-06-13 00:41:24 +00:00
module max_min(a, b, maximum, minimum);
input unsigned [7:0] a;
input unsigned [7:0] b;
output unsigned [7:0] maximum;
output unsigned [7:0] minimum;
assign minimum = (a<b) ? a:b;
assign maximum = (a>b) ? a:b;
endmodule