2 module top(input [12:0] a, b, output gtu, gts, ltu, lts, geu, ges, leu, les);
4 assign gts = $signed(a) > $signed(b);
6 assign lts = $signed(a) < $signed(b);
8 assign ges = $signed(a) >= $signed(b);
10 assign les = $signed(a) <= $signed(b);
14 equiv_opt -assert techmap -map +/cmp2lcu.v -D LUT_WIDTH=6
16 select -assert-count 8 t:$lcu r:WIDTH=5 %i
17 select -assert-none t:$gt t:$ge t:$lt t:$le
20 equiv_opt -assert techmap -map +/cmp2lcu.v -D LUT_WIDTH=4
22 select -assert-count 8 t:$lcu r:WIDTH=7 %i
23 select -assert-none t:$gt t:$ge t:$lt t:$le
28 module top(input [8:0] a, b, output gtu, gts, ltu, lts, geu, ges, leu, les);
29 wire [13:0] c = {a[8:6], 3'b101, a[5:4], 2'b11, a[3:0]};
30 wire [13:0] d = {b[8], 3'b101, b[7:4], 2'b01, b[3:0]};
32 assign gts = $signed(c) > $signed(d);
34 assign lts = $signed(c) < $signed(d);
36 assign ges = $signed(c) >= $signed(d);
38 assign les = $signed(c) <= $signed(d);
43 equiv_opt -assert techmap -map +/cmp2lcu.v -D LUT_WIDTH=5
45 select -assert-count 8 t:$lcu r:WIDTH=2 %i
46 select -assert-none t:$gt t:$ge t:$lt t:$le
49 equiv_opt -assert techmap -map +/cmp2lcu.v -D LUT_WIDTH=3
51 select -assert-count 8 t:$lcu r:WIDTH=4 %i
52 select -assert-none t:$gt t:$ge t:$lt t:$le