Verilog code for a 4-bit unsigned up
accumulator with an asynchronous clear.
module accum (clk, clr, d, q);
input clk, clr;
input [3:0] d;
output [3:0] q;
reg [3:0] tmp;
always @(posedge clk or posedge clr)
begin
if (clr)
tmp <= 4’b0000;
else
tmp <= tmp + d;
end
assign q = tmp;
endmodule
Showing an error..Syntax error !!!
ReplyDeletechange ’ to '
ReplyDeleteWat is accumulator
ReplyDeletecan any one send verilog code for 3X3 matrix multiplication using memory
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteto get correct output use this:
ReplyDeleteif (clr)
tmp <= 0;
else
tmp <= d;
end
accumulator is a storing register memory for the logical and arithmetic data in cpu,
ReplyDeletePLS SEND CODE FOR VEDIC MULTIPLIER USING YAVADANUM FORMULA
ReplyDeleteMAIL ID:dorathyabisha@gmail.com