1 | -- Version 20240623_07:14
|
2 | -- (Lieutenant Junior Grade) Bradward Boimler
|
3 |
|
4 | -- SubModule LogicVHLD_1
|
5 | -- Created Test
|
6 | --------------------------------------------------------------------------------
|
7 |
|
8 | library IEEE;
|
9 | use IEEE.Std_Logic_1164.all;
|
10 | --use IEEE.STD_LOGIC_UNSIGNED.all;
|
11 |
|
12 | entity e_3led3tast is
|
13 | port (
|
14 | LED1 : out std_logic;
|
15 | LED2 : out std_logic;
|
16 | LED3 : out std_logic;
|
17 | TASTER1 : in std_logic;
|
18 | TASTER2 : in std_logic;
|
19 | TASTER3 : in std_logic);
|
20 | end e_3led3tast;
|
21 |
|
22 | architecture Structure1 arch_ledtast1 of e_3led3tast is
|
23 |
|
24 | begin
|
25 |
|
26 | LED1 <= TASTER1;
|
27 | LED2 <= '0';
|
28 | LED3 <= '1';
|
29 |
|
30 | end arch_ledtast1;
|
31 |
|
32 |
|
33 | architecture arch_ledtast2 of e_3led3tast is
|
34 |
|
35 | begin
|
36 |
|
37 | LED1 <= '0';
|
38 | LED2 <= TASTER2;
|
39 | LED3 <= '1';
|
40 |
|
41 | end arch_ledtast2;
|
42 |
|
43 |
|
44 |
|
45 | --now comes the top which use the different components
|
46 | --this shall be placed in an extra VHDL source-file
|
47 |
|
48 | library IEEE;
|
49 | use IEEE.Std_Logic_1164.all;
|
50 | --use IEEE.STD_LOGIC_UNSIGNED.all;
|
51 | use work.all;
|
52 |
|
53 |
|
54 | entity e_top is
|
55 | port (
|
56 | LED_o : out std_logic_vector(6 downto 1);
|
57 | TASTER_i : in std_logic_vector(3 downto 1));
|
58 | end e_top;
|
59 |
|
60 |
|
61 | architecture arch_top is
|
62 | component comp_3led3tast is
|
63 | port (
|
64 | LED1 : out std_logic;
|
65 | LED2 : out std_logic;
|
66 | LED3 : out std_logic;
|
67 | TASTER1 : in std_logic;
|
68 | TASTER2 : in std_logic;
|
69 | TASTER3 : in std_logic);
|
70 | end component comp_3led3tast;
|
71 |
|
72 | begin
|
73 |
|
74 | i_3led3tast_1 : comp_3led3tast
|
75 | port map (
|
76 | LED1 => LED_o(1),
|
77 | LED2 => LED_o(2),
|
78 | LED3 => LED_o(3),
|
79 | TASTER1 => TASTER_i(1),
|
80 | TASTER2 => TASTER_i(2),
|
81 | TASTER3 => TASTER_i(3));
|
82 |
|
83 |
|
84 | i3led3tast_2 : comp_3led3tast
|
85 | port map (
|
86 | LED1 => LED_o(4),
|
87 | LED2 => LED_o(5),
|
88 | LED3 => LED_o(6),
|
89 | TASTER1 => TASTER_i(1),
|
90 | TASTER2 => TASTER_i(2),
|
91 | TASTER3 => TASTER_i(3));
|
92 | end architecture;
|
93 |
|
94 |
|
95 |
|
96 | configuration cnf1 of e_top is
|
97 | for arch_top
|
98 | for i_3led3tast_1 : comp_3led3tast
|
99 | use entity work.e_3led3tast(arch_ledtast1);
|
100 | end for;
|
101 | for i_3led3tast_2 : comp_3led3tast
|
102 | use entity work.e_3led3tast(arch_ledtast2);
|
103 | end for;
|
104 | end for;
|
105 | end configuration cnf1;
|