-
Notifications
You must be signed in to change notification settings - Fork 3
/
block_1.rb
76 lines (72 loc) · 2.28 KB
/
block_1.rb
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# frozen_string_literal: true
register_block {
name 'block_1'
byte_size 128
comment <<~COMMENT
this is block_1.
this block includes six registers.
COMMENT
register_file {
name 'register_file_0'
offset_address 0x00
register {
name 'register_0'
offset_address 0x00
comment [
'this is register_0.',
'bit_field_0 is within this register.'
]
bit_field { name 'bit_field_0'; bit_assignment lsb: 0, width: 8; type :rw; initial_value 0 }
}
register {
name 'register_1'
offset_address 0x04
bit_field { name 'bit_field_0'; bit_assignment lsb: 0, width: 8; type :rw; initial_value 0 }
}
}
register_file {
name 'register_file_1'
offset_address 0x10
register {
name 'register_0'
offset_address 0x00
size [2]
type [
:indirect,
'register_file_0.register_0.bit_field_0', ['register_file_0.register_1.bit_field_0', 0]
]
bit_field { name 'bit_field_0'; bit_assignment lsb: 0, width: 8; type :rw; initial_value 0 }
}
register {
name 'register_1'
offset_address 0x00
size [2]
type [
:indirect,
'register_file_0.register_0.bit_field_0', ['register_file_0.register_1.bit_field_0', 1]
]
bit_field { name 'bit_field_0'; bit_assignment lsb: 0, width: 8; type :rw; initial_value 0 }
}
}
register_file {
name 'register_file_2'
offset_address 0x20
size [2, step: 32]
register_file {
name 'register_file_0'
register {
name 'register_0'
offset_address 0x00
size [2, 3]
bit_field { name 'bit_field_0'; bit_assignment lsb: 0, width: 4, sequence_size: 2; type :rw; initial_value 0 }
bit_field { name 'bit_field_1'; bit_assignment lsb: 8, width: 4, sequence_size: 2; type :rwe; initial_value 0; reference 'register_file_0.register_0.bit_field_0' }
bit_field { name 'bit_field_2'; bit_assignment lsb: 16, width: 4, sequence_size: 2; type :rwl; initial_value 0; reference 'register_file_2.register_file_0.register_1.bit_field_0' }
}
register {
name 'register_1'
offset_address 0x18
bit_field { name 'bit_field_0'; bit_assignment lsb: 0, width: 1, sequence_size: 2; type :rw; initial_value 0 }
}
}
}
}