I can't for the life of me figure out why I don't get an output from this testbench and entity that i've created. I've tried it several different ways with the OUTPUT y never making it out. I know this is a noob question, but I am a noob so that's ok.
HERE is my entity:
Library IEEE;
use ieee.std_logic_1164.all;
-----------------------------------------
PACKAGE my_vector IS
TYPE vector_array IS ARRAY (Natural RANGE <>) OF STD_LOGIC_VECTOR(8-1 downto 0);--(Natural RANGE <>,Natural RANGE <>) OF STD_LOGIC;
END my_vector;
-----------------------------------------
Library IEEE;
USE work.my_vector.all; --using my package
USE IEEE.STD_LOGIC_1164.all;
USE IEEE.STD_LOGIC_ARITH.all;
USE IEEE.NUMERIC_STD.all;
USE IEEE.STD_LOGIC_ARITH.UNSIGNED;
use ieee.NUMERIC_STD.UNSIGNED;
-----------------------------------------
Entity mux IS
GENERIC ( M : INTEGER := 8;
N : INTEGER := 3 );
PORT ( a : IN vector_array ((2**N)-1 downto 0); -- ,M-1 downto 0);
sel : IN INTEGER; --STD_LOGIC_VECTOR(N-1 downto 0);
y : OUT STD_LOGIC_VECTOR(M-1 downto 0));
END mux;
-----------------------------------------
ARCHITECTURE logic of mux is
signal test : STD_LOGIC_VECTOR(8-1 downto 0);
BEGIN
y <= a(sel);
END logic;
HERE is the TESTBENCH:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
-----------------------------------------
PACKAGE my_vector IS
TYPE vector_array IS ARRAY (Natural RANGE <>) OF STD_LOGIC_VECTOR(8-1 downto 0);--(Natural RANGE <>,Natural RANGE <>) OF STD_LOGIC;
END my_vector;
-----------------------------------------
Library IEEE;
USE work.my_vector.all; --using my package
USE IEEE.STD_LOGIC_1164.all;
USE IEEE.STD_LOGIC_ARITH.all;
USE IEEE.NUMERIC_STD.all;
use ieee.std_logic_arith.UNSIGNED;
-----------------------------------------
entity tb_GenericMux is
-- Port ( );
end tb_GenericMux;
----------------------------------------------------------------
architecture Behavioral of tb_GenericMux is
constant TIME_DELTA : time := 10 ns;
--DUT-----
COMPONENT Mwidth_by_Ninputs_MUX IS
GENERIC ( M : INTEGER := 8;
N : INTEGER := 3 );
PORT ( a : IN vector_array ((2**N)-1 downto 0); --,M-1 downto 0);
sel : IN INTEGER;--STD_LOGIC_VECTOR(N-1 downto 0);
y : OUT STD_LOGIC_VECTOR(M-1 downto 0));
END COMPONENT;
------------
use work.my_vector.all;
signal input : vector_array((2**3)-1 downto 0);--,8-1 downto 0);
signal slt : INTEGER;--STD_LOGIC_VECTOR(3-1 downto 0);
signal outp : STD_LOGIC_VECTOR(8-1 downto 0);
begin
--connect DUT
DUT: Mwidth_by_Ninputs_MUX port map(a => input,
sel => slt,
y => outp);
PROCESS
BEGIN
input(0) <= "00000001";
input(1) <= "00000010";
input(2) <= "00000100";
input(3) <= "00001000";
input(4) <= "00010000";
input(5) <= "00100000";
input(6) <= "01000000";
input(7) <= "10000000";
slt <= 1;
wait for TIME_DELTA;
slt <= 2;
wait for TIME_DELTA;
slt <= 3;
wait for TIME_DELTA;
slt <= 4;
wait for TIME_DELTA;
END PROCESS;
end ARCHITECTURE Behavioral;