diff --git a/pipelined/src/ieu/comparator.sv b/pipelined/src/ieu/comparator.sv index 67fd476d..26ea6d86 100644 --- a/pipelined/src/ieu/comparator.sv +++ b/pipelined/src/ieu/comparator.sv @@ -36,9 +36,8 @@ module comparator #(parameter WIDTH=32) ( logic [WIDTH-1:0] bbar, diff; logic carry, eq, neg, overflow, lt, ltu; - - // NOTE: This can be replaced by some faster logic optimized - // to just compute flags and not the difference. +/* + // Subtractor implementation // subtraction assign bbar = ~b; @@ -52,47 +51,36 @@ module comparator #(parameter WIDTH=32) ( assign overflow = (a[WIDTH-1] ^ b[WIDTH-1]) & (a[WIDTH-1] ^ diff[WIDTH-1]); assign lt = neg ^ overflow; assign ltu = ~carry; -// assign flags = {eq, lt, ltu}; + assign flags = {eq, lt, ltu}; +*/ /* verilator lint_off UNOPTFLAT */ - // prefix implementation localparam levels=$clog2(WIDTH); genvar i; genvar level; - logic [WIDTH-1:0] ee[levels:0]; - logic [WIDTH-1:0] ll[levels:0]; + logic [WIDTH-1:0] e[levels:0]; + logic [WIDTH-1:0] l[levels:0]; logic eq2, lt2, ltu2; - // Bitwise logic - for (i=0; i