ROM器件

AI summary
ROM器件用于控制音符数据的读取和地址变化,包含音符、数据和地址的简谱数据示例。设计架构包括ROM_IP模块及其他模块,需完成音乐播放器的仿真和下板,支持多种音符数据和时长的配置。
Last edited time
Sep 3, 2024 02:17 AM
Last edited by
Tags
Music Data
ROM Architecture
Music Player Simulation

ROM器件

ROM读出的数据低三位(节拍)控制地址的变化;高5位数据(音标和音调)即可。
notion image
ROM存储的简谱数据:两只老虎为例
音符
数据
地址
音符
数据
地址
1
001_10_001
0
3
011_10_001
20
2
010_10_001
1
1
001_10_001
21
3
011_10_001
2
5
101_10_000
22
1
001_10_001
3
6
110_10_000
23
1
001_10_001
4
5
101_10_000
24
2
010_10_001
5
4
100_10_000
25
3
011_10_001
6
3
011_10_001
26
1
001_10_001
7
1
001_10_001
27
3
011_10_001
8
1
001_10_001
28
4
100_10_001
9
5
101_01_001
29
5
101_10_001
10
1
001_10_010
30
0
000_10_001
11
0
000_10_000
31
3
011_10_001
12
1
001_10_001
32
4
100_10_001
13
5
101_01_001
33
5
101_10_001
14
1
001_10_010
34
0
000_10_001
15
0
000_10_000
35
5
101_10_000
16
6
110_10_000
17
5
101_10_000
18
4
100_10_000
19
  1. 设计架构
    1. notion image
      除过ROM_IP模块外,其他模块都有时钟和复位。
练习:
  1. 完成上课内容
  1. 音乐播放器自行仿真和下板
自行选择音乐简谱,取其音符数据,播放该歌曲。
低三位:
  • 000: 0.25s
  • 001: 0.50s
  • 010: 0.75s
  • 011: 1.00s
  • 100: 1.25s
  • 101: 1.50s
  • 110: 1.75s
  • 111: 2.00s
高五位:
For the LOW range:
  • 0001_01: LOW1
  • 0010_01: LOW1Up
  • 0011_01: LOW2
  • 0100_01: LOW2Up
  • 0101_01: LOW3
  • 0110_01: LOW4
  • 0111_01: LOW4Up
  • 1000_01: LOW5
  • 1001_01: LOW5Up
  • 1010_01: LOW6
  • 1011_01: LOW6Up
  • 1100_01: LOW7
For the MID range:
  • 0001_10: MID1
  • 0010_10: MID1Up
  • 0011_10: MID2
  • 0100_10: MID2Up
  • 0101_10: MID3
  • 0110_10: MID4
  • 0111_10: MID4Up
  • 1000_10: MID5
  • 1001_10: MID5Up
  • 1010_10: MID6
  • 1011_10: MID6Up
  • 1100_10: MID7
For the HIGH range:
  • 0001_11: HIGH1
  • 0010_11: HIGH1Up
  • 0011_11: HIGH2
  • 0100_11: HIGH2Up
  • 0101_11: HIGH3
  • 0110_11: HIGH4
  • 0111_11: HIGH4Up
  • 1000_11: HIGH5
  • 1001_11: HIGH5Up
  • 1010_11: HIGH6
  • 1011_11: HIGH6Up
  • 1100_11: HIGH7
音符
数据
地址
0
0000_10_010
0
L5
1000_01_000
1
L5
1000_01_000
2
M1
0001_10_010
3
M3
0101_10_101
4
M1
0001_10_001
5
M2
0011_10_010
6
M1
0001_10_000
7
M1
0001_10_001
8
L6
1010_01_001
9
L5
1000_01_001
10
M1
0001_10_101
11
0
0000_10_001
12
L7
1100_01_001
13
M1
0001_10_001
14
M3
0101_10_001
15
M5
1000_10_101
16
M1
0001_10_001
17
M6
1010_10_010
18
M5
1000_10_000
19
M5
1000_10_001
20
M3
0101_10_001
21
M2
0011_10_111
22
0
0000_10_001
23
M5
1000_10_001
24
M6
1010_10_001
25
M7
1100_10_001
26
H1
0001_11_101
27
M7
1100_10_001
28
M7
1100_10_001
29
M6
1010_10_001
30
M5
1000_10_001
31
M4
0110_10_001
32
M5
1000_10_011
33
M3
0101_10_011
34
0
0000_10_001
35
M1
0001_10_001
36
M5
1000_10_001
37
M4
0110_10_001
38
M3
0101_10_101
39
M3
0101_10_001
40
M3
0101_10_001
41
M2
0011_10_000
42
M1
0001_10_010
43
L7
1100_01_001
44
M1
0001_10_101
45
Loading...