-
Notifications
You must be signed in to change notification settings - Fork 0
/
destruction_sound_rom.vhd
56 lines (53 loc) · 1.18 KB
/
destruction_sound_rom.vhd
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity explosion_sound is
generic(
ADDR_WIDTH: integer := 5
);
port(
addr: in std_logic_vector(ADDR_WIDTH - 1 downto 0);
data: out std_logic_vector(8 downto 0)
);
end explosion_sound;
architecture content of explosion_sound is
type tune is array(0 to 2 ** ADDR_WIDTH - 1)
of std_logic_vector(8 downto 0);
constant TEST: tune :=
(
"001001001",
"010001001",
"001001001",
"010001001",
"001001010",
"010001010",
"001001010",
"010001010",
"001001011",
"010001011",
"001001011",
"010001011",
"001001100",
"010001100",
"001001100",
"010001100",
"001001101",
"010001101",
"001001101",
"010001101",
"001001110",
"010001110",
"001001110",
"010001110",
"001001111",
"010001111",
"001001111",
"010001111",
"001001111",
"000000000",
"000000000",
"000000000"
);
begin
data <= TEST(conv_integer(addr));
end content;