Altera_Forum
Honored Contributor
14 years agoWhat is the difference between direct arithmetic computation and using MegaWizard blo
When I try to do addition, reduction, multiplication, previously I will use
plug ins in Quartus II like LPM_ADD_SUB. Then I will program use this addtion block to do addtion.The program will be: module Test1121(out1,out2,a,b); input [7:0] a,b; output [8:0] out1; output [15:0] out2; add1(a,b,out1); mul1(a,b,out2); endmodule However, It seems I can directly programing like this: module Test1121(out1,out2,a,b); input [7:0] a,b; output [8:0] out1; output [15:0] out2; always@(a or b) begin out1=a+b; out2=a*b; end endmodule So I wonder what is the difference between them? Which one is better to be used? Thanks