跳轉到內容

FPGA 設計的 VHDL/4 位乘法器

來自華夏公益教科書,開放的書籍,為開放的世界

4×4 位乘法器 VHDL 程式碼設計

[編輯 | 編輯原始碼]
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;

entity Multiplier_VHDL is
   port
   (
      Nibble1, Nibble2: in std_logic_vector(1 downto 0);

      Result: out std_logic_vector(2 downto 0)
   );
end Multiplier_VHDL;

architecture Behavioral of Multiplier_VHDL is
begin

   Result <= std_logic_vector(unsigned(Nibble1) * unsigned(Nibble2));

end Behavioral;

模擬波形

[編輯 | 編輯原始碼]
 
華夏公益教科書