Multiplier using HDL library

4 views (last 30 days)
Safiya
Safiya on 12 May 2015
Commented: Stephen23 on 28 May 2015
Hi, I want to make a multiplier of 4bit and to generate vhdl code using "HDL code generation" in simulink. for example A = [ 1 0 1 1]; B = [ 1 1 0 1];
Y= A*B ;
should give us 10001111; Thank you;
Safiya
  1 Comment
Stephen23
Stephen23 on 28 May 2015
Here is the text of the original question, just in case Safiya decides to delete the text of this question too (like this one):
Hi, I want to make a multiplier of 4bit and to generate vhdl code using "HDL code generation" in simulink. for example A = [ 1 0 1 1]; B = [ 1 1 0 1];
Y= A*B ;
should give us 10001111; Thank you;
Safiya

Sign in to comment.

Accepted Answer

Tim McBrayer
Tim McBrayer on 12 May 2015
Place a Product block in your design subsystem; feed it two ufix4 inputs.
Alternatively: use a MATLAB Function block that contains Y = A*B; feed it two ufix4 inputs.

More Answers (0)

Categories

Find more on Optimization in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!