Question: Given the VHDL code for a 16-to-1 Multiplexer, please provide a Test Bench file. VHDL Code for a 16-to-1 Multiplexer: library IEEE; use IEEE.STD_LOGIC_1164.ALL; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values --use IEEE.NUMERIC_STD.ALL; -- Uncomment the following library declaration if instantiating -- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity mux16to1 is     Port ( w0 : in  STD_LOGIC;            w1 : in  STD_LOGIC;            w2 : in  STD_LOGIC;            w3 : in  STD_LOGIC;            w4 : in  STD_LOGIC;            w5 : in  STD_LOGIC;            w6 : in  STD_LOGIC;            w7 : in  STD_LOGIC;            w8 : in  STD_LOGIC;            w9 : in  STD_LOGIC;            w10 : in  STD_LOGIC;            w11 : in  STD_LOGIC;            s : in  STD_LOGIC_VECTOR(3 DOWNTO 0);            f : out  STD_LOGIC); end mux16to1; architecture Behavioral of mux16to1 is begin             process (s) begin             case s is                         when "0000" => f <= w0                         when "0001" => f <= w1                         when "0010" => f <= w2                         when "0011" => f <= w3                         when "0100" => f <= w4                         when "0101" => f <= w5                         when "0110" => f <= w6                         when "0111" => f <= w7                         when "1000" => f <= w8                         when "1001" => f <= w9                         when "1010" => f <= w10                         when "1011" => f <= w11                         when others => f <= 'z';             end case end process end Behavioral;

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Question: Given the VHDL code for a 16-to-1 Multiplexer, please provide a Test Bench file.

VHDL Code for a 16-to-1 Multiplexer:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;

-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity mux16to1 is
    Port ( w0 : in  STD_LOGIC;
           w1 : in  STD_LOGIC;
           w2 : in  STD_LOGIC;
           w3 : in  STD_LOGIC;
           w4 : in  STD_LOGIC;
           w5 : in  STD_LOGIC;
           w6 : in  STD_LOGIC;
           w7 : in  STD_LOGIC;
           w8 : in  STD_LOGIC;
           w9 : in  STD_LOGIC;
           w10 : in  STD_LOGIC;
           w11 : in  STD_LOGIC;
           s : in  STD_LOGIC_VECTOR(3 DOWNTO 0);
           f : out  STD_LOGIC);
end mux16to1;

architecture Behavioral of mux16to1 is

begin
            process (s)

begin
            case s is
                        when "0000" => f <= w0
                        when "0001" => f <= w1
                        when "0010" => f <= w2
                        when "0011" => f <= w3
                        when "0100" => f <= w4
                        when "0101" => f <= w5
                        when "0110" => f <= w6
                        when "0111" => f <= w7
                        when "1000" => f <= w8
                        when "1001" => f <= w9
                        when "1010" => f <= w10
                        when "1011" => f <= w11
                        when others => f <= 'z';
            end case
end process

end Behavioral;

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education