-
Notifications
You must be signed in to change notification settings - Fork 0
/
shooting_sound_rom.vhd
56 lines (53 loc) · 1.17 KB
/
shooting_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 shooting_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 shooting_sound;
architecture content of shooting_sound is
type tune is array(0 to 2 ** ADDR_WIDTH - 1)
of std_logic_vector(8 downto 0);
constant TEST: tune :=
(
"100001001",
"011001011",
"001001010",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000",
"000000000"
);
begin
data <= TEST(conv_integer(addr));
end content;