Guest
Hi,
I have a query on the RTL designing for addsub based implementations.
I heard that addsubs are not preferred on FPGAs as they produce worse area and timing QoR. Is it true ? Is resource sharing not preferred in general on FPGAs.
However, if I try a very simple design of addsub shown below it shows me no difference. May be in case of small examples, the difference in implementation might not be evident. That is why I wanted to ask a broader audience.
The reasoning & cases for both 'yes' and 'no' will help in understanding the cause ?
Thanks
Vipin
module addsub(a, b, oper, res);
input oper;
input [7:0] a;
input [7:0] b;
output [7:0] res;
reg [7:0] res;
always @(a or b or oper)
begin
if (oper == 1b0)
res = a + b;
else
res = a - b;
end
endmodule
I have a query on the RTL designing for addsub based implementations.
I heard that addsubs are not preferred on FPGAs as they produce worse area and timing QoR. Is it true ? Is resource sharing not preferred in general on FPGAs.
However, if I try a very simple design of addsub shown below it shows me no difference. May be in case of small examples, the difference in implementation might not be evident. That is why I wanted to ask a broader audience.
The reasoning & cases for both 'yes' and 'no' will help in understanding the cause ?
Thanks
Vipin
module addsub(a, b, oper, res);
input oper;
input [7:0] a;
input [7:0] b;
output [7:0] res;
reg [7:0] res;
always @(a or b or oper)
begin
if (oper == 1b0)
res = a + b;
else
res = a - b;
end
endmodule