Booth's Algorith Implementation

A

Atif

Guest
I want to implement Booth's algorithm in verilog for multiplying two
four bit numbers with an output of 8 bits.

I have designed two modules addsub and shift which works fine
indivisually. But when I use them in my mul module (that is a module
to implement booth's algo). I've to use them inside the procedural
blocks to add/sub or shift the numbers to implement the booth's algo.
But I cannot instantiate any module inside a procedural block.

module addsub(out, a, b);
....
endmodule

module shift(out, a, b);
....
endmodule

module mul(out, a, b);
....
initial
begin
if(out[0]<invbit)
addsub myadd(out,..,.. );
end
endmodule

How can I solve this problem?

Regards
Atif Nadeem
 
"Atif" <atif@kics.edu.pk> wrote in message
news:6a0a3f23.0307250506.5aff4ecb@posting.google.com...
I want to implement Booth's algorithm in verilog for multiplying two
four bit numbers with an output of 8 bits.



How can I solve this problem?

Regards
Atif Nadeem

The TA might know.
 
"Kevin Neilson" <kevin_neilson@removethistextcomcast.net> wrote in message news:<BTHUa.154609$N7.21473@sccrnsc03>...
"Atif" <atif@kics.edu.pk> wrote in message
news:6a0a3f23.0307250506.5aff4ecb@posting.google.com...
I want to implement Booth's algorithm in verilog for multiplying two
four bit numbers with an output of 8 bits.



How can I solve this problem?

Regards
Atif Nadeem


The TA might know.
So might Mr Google!
 

Welcome to EDABoard.com

Sponsor

Back
Top