1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
// $Id: tss_max32.v,v 1.6 1999/01/20 17:34:54 wsnyder Exp $
//============================================================================
`time_scale
module tss_max32 (/*AUTOARG*/
// Outputs
max,
// Inputs
a, b
);
//======================================================================
// Inputs/Outputs
//======================================================================
input [31:0] a; // Time a
input [31:0] b; // Time b
output [31:0] max; // MAX (a,b)
//======================================================================
// Automatic Wire/Register Declarations
//======================================================================
/*AUTOREG*/
//======================================================================
// Comparison
//======================================================================
wire alessb; // a<b or carry
//Verilint 110 off // WARNING: Incompatible width
DW01_cmp2 #(31) cmp (.LT_LE(alessb), .GE_GT(unused_ok),
.A(a[30:0]),
.B(b[30:0]),
.LEQ(1'b0), .TC(1'b0));
//Verilint 110 on // WARNING: Incompatible width
// Note because a has more bits we MUST choose it if a[31:8]==b[31:8]!
wire sela = ((a[31] != b[31]) ^ alessb);
wire [31:0] max = (sela ? b : a);
endmodule
|