Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library IEEE;
- use IEEE.STD_LOGIC_1164.ALL;
- use IEEE.NUMERIC_STD.ALL;
- entity mac_last is
- generic (input_data_width : natural :=12);
- Port ( u_i : in STD_LOGIC_VECTOR (input_data_width-1 downto 0);
- b_i : in STD_LOGIC_VECTOR (input_data_width-1 downto 0);
- mac_i : in STD_LOGIC_VECTOR (2*input_data_width-1 downto 0);
- mac_o : out STD_LOGIC_VECTOR (2*input_data_width-1 downto 0));
- end mac_last;
- architecture Behavioral of mac_last is
- begin
- mac_o <= std_logic_vector(signed(mac_i) + (signed(u_i) * signed(b_i)));
- end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement