-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDUT.vhd
More file actions
32 lines (27 loc) · 958 Bytes
/
DUT.vhd
File metadata and controls
32 lines (27 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
-- A DUT entity is used to wrap your design.
-- This example shows how you can do this for the Ripple Carry Adder.
library ieee;
use ieee.std_logic_1164.all;
library work;
use work.Gates.all;
entity DUT is
port(input_vector: in std_logic_vector(6 downto 0);
output_vector: out std_logic_vector(0 downto 0));
end entity;
architecture DutWrap of DUT is
begin
-- input/output vector element ordering is critical,
-- and must match the ordering in the trace file!
add_instance: MUX_4by1
port map (
-- order of inputs EnS(1)S(2)I(1)I(2)I(3)I(4)
En => input_vector(6),
S(1) => input_vector(5),
S(2) => input_vector(4),
I(1) => input_vector(3),
I(2) => input_vector(2),
I(3) => input_vector(1),
I(4) => input_vector(0),
-- order of output Y
Y => output_vector(0));
end DutWrap;