1.

Write A Verilog Code To Swap Contents Of Two Registers With And Without A Temporary Register?

Answer»

With temp reg ;
ALWAYS @ (posedge clock)
begin 
temp=b;
b=a;
a=temp;
END

Without temp reg;
always @ (posedge clock)
begin 
a <= b;
b <= a;
end 

With temp reg ;
always @ (posedge clock)
begin 
temp=b;
b=a;
a=temp;
end

Without temp reg;
always @ (posedge clock)
begin 
a <= b;
b <= a;
end 



Discussion

No Comment Found