Question

VI. Write the shortest sequence of instructions to multiply a value b concurrent statements. (8 points) ng V HDL
0 0
Add a comment Improve this question Transcribed image text
Answer #1

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
use ieee.numeric_std.all;

entity multiplier is
port
   (
       a   : in std_logic_vector(7 downto 0);
       result   : out std_logic_vector(15 downto 0);
       result_integer : out integer
   );

end multiplier;

architecture arch of multiplier is

constant number : std_logic_vector (7 downto 0):="01110111"; ---binary 119

begin
   result <= a * number;

   result_integer <= conv_integer(a * number); ---optional. its required if you want to see result in integer
  
end arch;

------------------------------------------------------------------------------------------------------------------------------------------------

E Wave File Edit View Add Format Tools Bookmarks Window Help Wave -Default Msgs 00000100 mulbplerjresult 400 0 ps to 1ns Now:

Add a comment
Know the answer?
Add Answer to:
VI. Write the shortest sequence of instructions to multiply a value b concurrent statements. (8 p...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT