R
rootz
Guest
I have a design which blows up significantly when I add a comparator
(sig_ans >`VALONE2). This is because the comparator is used several
times in a module and the module is also replicated several times. How
can I create a more efficient comparator ?
reg signed [63:0] sig_d3, sig_ans;
reg [63:0] val_3, res_3;
reg sig_dn3;
`define VALONE2 17'h10000
reg dne3;
always @ (posedge clk)
begin
if (sig_dn | (sig_ans >`VALONE2)) begin
sig_d3 = val_3 - res_3;
sig_dn3 = sig_d3[63];
end
else begin
sig_d3 = prev_2;
cdne3 = prev_dn2;
end
end
(sig_ans >`VALONE2). This is because the comparator is used several
times in a module and the module is also replicated several times. How
can I create a more efficient comparator ?
reg signed [63:0] sig_d3, sig_ans;
reg [63:0] val_3, res_3;
reg sig_dn3;
`define VALONE2 17'h10000
reg dne3;
always @ (posedge clk)
begin
if (sig_dn | (sig_ans >`VALONE2)) begin
sig_d3 = val_3 - res_3;
sig_dn3 = sig_d3[63];
end
else begin
sig_d3 = prev_2;
cdne3 = prev_dn2;
end
end