Here is a larger demultiplexor that I did that demultiplexes multiple inputs. I currently have the error :
Error (10309): VHDL Interface Declaration error in testvhdl.vhd(77): interface object "signedmultiply1" of mode out cannot be read. Change object mode to buffer.
Error (10327): VHDL error at testvhdl.vhd(77): can't determine definition of operator ""<="" -- found 0 possible definitions
Here is the code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity alu_multiplicationordivisionchooser is
port (
unsigneddivide0 : out std_logic_vector(31 downto 0); --output bit_vector
unsigneddivide1 : out std_logic_vector(31 downto 0); --output bit_vector
signeddivide0 : out std_logic_vector(31 downto 0); --output bit_vector
signeddivide1 : out std_logic_vector(31 downto 0); --output bit_vector
unsignedmultiply0 : out std_logic_vector(31 downto 0); --output bit_vector
unsignedmultiply1 : out std_logic_vector(31 downto 0); --output bit_vector
signedmultiply0 : out std_logic_vector(31 downto 0); --output bit_vector
signedmultiply1 : out std_logic_vector(31 downto 0); --output bit_vector
hiandlowregisterout : out std_logic_vector(63 downto 0); --output bit_vector
gotoadder : out std_logic; --output bit
subtract : out std_logic; --output bit
sel : in std_logic_vector(2 downto 0); --input bit_vector
busin0 : in std_logic_vector(31 downto 0); --input bit_vector
busin1 : in std_logic_vector(31 downto 0); --input bit_vector
hiandlowregisterin : in std_logic_vector(63 downto 0) --input bit_vector
);
end alu_multiplicationordivisionchooser;
architecture Behavioral of alu_multiplicationordivisionchooser is
begin
process(busin0,busin1,sel)
begin
unsigneddivide0 <= (others => '0');
unsigneddivide1 <= (others => '0');
unsignedmultiply0 <= (others => '0');
unsignedmultiply1 <= (others => '0');
signeddivide0 <= (others => '0');
signeddivide1 <= (others => '0');
signedmultiply0 <= (others => '0');
signedmultiply1 <= (others => '0');
hiandlowregisterout <= (others => '0');
gotoadder <= '0';
subtract <= '0';
case sel is
when "000" => signedmultiply0 <= busin0, signedmultiply1
<= busin1;
when "001" => unsignedmultiply0 <= busin0, unsignedmultiply1
<= busin1;
when "010" => signeddivide0 <= busin0, signeddivide1
<= busin1;
when "011" => unsigneddivide0 <= busin0, unsigneddivide1
<= busin1;
when "100" => signedmultiply0 <= busin0, signedmultiply1
<= busin1, hiandlowregisterout <= hiandlowregisterin ,gotoadder <= '1' ;
when "101" => unsignedmultiply0 <= busin0, unsignedmultiply1
<= busin1, hiandlowregisterout <= hiandlowregisterin ,gotoadder <= '1';
when "110" => signedmultiply0 <= busin0, signedmultiply1
<= busin1, hiandlowregisterout <= hiandlowregisterin, gotoadder <= '1', subtract <= '1';
when others => out3 <= unsignedmultiply0 <= busin0, unsignedmultiply1
<= busin1, hiandlowregisterout <= hiandlowregisterin ,gotoadder <= '1', subtract <= '1';
end case;
end process;
end Behavioral;
I am guessing the issue I have is with the case, and how I tell it to assign multiple outputs a value at the same time.
EDIT: Nevermind I figured out the issue. I had to replace:
case sel is
when "000" => signedmultiply0 <= busin0, signedmultiply1
<= busin1;
when "001" => unsignedmultiply0 <= busin0, unsignedmultiply1
<= busin1;
when "010" => signeddivide0 <= busin0, signeddivide1
<= busin1;
when "011" => unsigneddivide0 <= busin0, unsigneddivide1
<= busin1;
when "100" => signedmultiply0 <= busin0, signedmultiply1
<= busin1, hiandlowregisterout <= hiandlowregisterin ,gotoadder <= '1' ;
when "101" => unsignedmultiply0 <= busin0, unsignedmultiply1
<= busin1, hiandlowregisterout <= hiandlowregisterin ,gotoadder <= '1';
when "110" => signedmultiply0 <= busin0, signedmultiply1
<= busin1, hiandlowregisterout <= hiandlowregisterin, gotoadder <= '1', subtract <= '1';
when others => out3 <= unsignedmultiply0 <= busin0, unsignedmultiply1
<= busin1, hiandlowregisterout <= hiandlowregisterin ,gotoadder <= '1', subtract <= '1';
end case;
With:
case sel is
when "000" =>
signedmultiply0 <= busin0;
signedmultiply1 <= busin1;
when "001" =>
unsignedmultiply0 <= busin0;
unsignedmultiply1 <= busin1;
when "010" =>
signeddivide0 <= busin0;
signeddivide1 <= busin1;
when "011" =>
unsigneddivide0 <= busin0;
unsigneddivide1 <= busin1;
when "100" =>
signedmultiply0 <= busin0;
signedmultiply1<= busin1;
hiandlowregisterout <= hiandlowregisterin;
gotoadder <= '1' ;
when "101" =>
unsignedmultiply0 <= busin0;
unsignedmultiply1 <= busin1;
hiandlowregisterout <= hiandlowregisterin;
gotoadder <= '1';
when "110" =>
signedmultiply0 <= busin0;
signedmultiply1 <= busin1;
hiandlowregisterout <= hiandlowregisterin;
gotoadder <= '1';
subtract <= '1';
when others =>
unsignedmultiply0 <= busin0;
unsignedmultiply1<= busin1;
hiandlowregisterout <= hiandlowregisterin;
gotoadder <= '1';
subtract <= '1';
end case;