I am working on a project but whatever I do I can’t understand what this code does. Since I am not familiar with VHDL, it’s really hard for me to understand the purpose of this code.
library iee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use work.my_package.all;
Entity multiplier is
generic (size: integer :=4);
Port (a,b : in unsigned( size-1 downto 0);
y : out unsigned( size-1 downto 0));
End multiplier ;
ARCHITECTURE behavior of multiplier is
Begin
y<= mult(a,b);
End behavior;
You have an entity which describes the interface of your design. In this case inputs
aandbas well as outputy. These are all 4-bit values.The architecture contains the implementation of what you’re trying to do (the body if you will). In this case it’s simply a multiplication of
aandb, which is assigned toy. And (should you be confused) no, the<=does not stand for “smaller than or equal to” but it’s an assignment.