|
42 | 42 | type: "int unsigned", |
43 | 43 | default: "4", |
44 | 44 | } |
45 | | - { name: "MaxIndexBitsDiv32", |
46 | | - desc: "Max number of bits in the word index / word address, divided by 32", |
47 | | - type: "int unsigned", |
48 | | - default: "1", |
49 | | - } |
50 | 45 | ] |
51 | 46 |
|
52 | 47 | features: [ |
|
72 | 67 | //////////////////////// |
73 | 68 | // Ctrl / Status CSRs // |
74 | 69 | //////////////////////// |
75 | | - |
76 | | - { name: "INFO", |
77 | | - desc: "Information about this backdoor loader.", |
78 | | - swaccess: "ro", |
79 | | - hwaccess: "none", |
80 | | - hwqe: "false", |
| 70 | + { name: "Status", |
| 71 | + desc: "Status register", |
| 72 | + swaccess: "rc", |
| 73 | + hwaccess: "hwo", |
| 74 | + hwext: "true", |
| 75 | + hwqe: "true", |
81 | 76 | fields: [ |
82 | | - { bits: "2:0" |
83 | | - name: "MAX_WORD_SIZE" |
| 77 | + { bits: "0" |
| 78 | + name: "Error" |
| 79 | + swaccess: "ro", |
| 80 | + hwaccess: "hwo", |
84 | 81 | desc: ''' |
85 | | - The maximum number of bits supported in a word, encoded as a power of 2. |
| 82 | + Whether an error happened on the last access. Clear on read. |
86 | 83 | ''', |
87 | | - resval: "7" // Need templating to derive this value |
88 | | - |
89 | 84 | } |
90 | | - { bits: "13:8" |
91 | | - name: "MAX_INDEX_BITS" |
| 85 | + { bits: "15:8" |
| 86 | + name: "IDX" |
92 | 87 | desc: ''' |
93 | | - The maximum number of bits supported in a word index (word "address"). |
| 88 | + Index of last memory access. |
94 | 89 | ''', |
95 | | - resval: "32" |
96 | 90 | } |
97 | 91 | ] |
98 | 92 | } |
99 | | - { name: "OP", |
100 | | - desc: "Operation control and status", |
101 | | - swaccess: "rw", |
| 93 | + { name: "Control", |
| 94 | + desc: "Control register", |
| 95 | + swaccess: "wo", |
102 | 96 | hwaccess: "hro", |
| 97 | + hwqe: "true", |
103 | 98 | fields: [ |
104 | 99 | { bits: "0" |
105 | | - name: "ISSUE_WRITE" |
106 | | - swaccess: "rw1s", |
107 | | - hwaccess: "hrw", |
| 100 | + name: "DONE" |
| 101 | + swaccess: "wo", |
| 102 | + hwaccess: "hro", |
108 | 103 | desc: ''' |
109 | | - Issue a write transaction with the current state of the other CSRs. |
| 104 | + Switch to mission mode. |
| 105 | + ''', |
| 106 | + }, |
| 107 | + { bits: "1" |
| 108 | + name: "WRITE_ENA" |
| 109 | + swaccess: "wo", |
| 110 | + hwaccess: "hro", |
| 111 | + desc: ''' |
| 112 | + Whether to write or read. |
110 | 113 | ''', |
111 | 114 | } |
112 | | - { bits: "15:8" |
113 | | - name: "MEM_SELECT" |
| 115 | + ] |
| 116 | + } |
| 117 | + { name: "FPGA_INFO", |
| 118 | + desc: "FPGA info register", |
| 119 | + swaccess: "ro", |
| 120 | + hwaccess: "hwo", |
| 121 | + hwext: "true", |
| 122 | + fields: [ |
| 123 | + { bits: "31:0" |
| 124 | + name: "VAL" |
| 125 | + swaccess: "ro", |
| 126 | + hwaccess: "hwo", |
114 | 127 | desc: ''' |
115 | | - Binary-encoded memory selector for issuing an operation. |
| 128 | + FGPA information. |
116 | 129 | ''', |
117 | 130 | } |
118 | 131 | ] |
119 | 132 | } |
120 | 133 | { skipto: "0x40" } |
121 | 134 | { multireg: { |
122 | | - name: "DATA", |
123 | | - desc: "Value to be written to the RAM", |
| 135 | + name: "READ_DATA", |
| 136 | + desc: "Value to be read from the RAM", |
124 | 137 | count: "MaxWordWidthDiv32", |
125 | 138 | cname: "VAL", |
126 | | - swaccess: "rw", |
127 | | - hwaccess: "hro", |
| 139 | + swaccess: "ro", |
| 140 | + hwaccess: "hwo", |
| 141 | + hwext: "true", |
128 | 142 | fields: [ |
129 | 143 | { bits: "31:0", |
130 | 144 | name: "VAL", |
|
134 | 148 | }, |
135 | 149 | ] |
136 | 150 | } }, |
| 151 | + { skipto: "0x80" } |
137 | 152 | { multireg: { |
138 | | - name: "INDEX", |
139 | | - desc: "Index of the word to be written", |
140 | | - count: "MaxIndexBitsDiv32", |
| 153 | + name: "WRITE_DATA", |
| 154 | + desc: "Value to be written to the RAM", |
| 155 | + count: "MaxWordWidthDiv32", |
141 | 156 | cname: "VAL", |
142 | | - swaccess: "rw", |
| 157 | + swaccess: "wo", |
143 | 158 | hwaccess: "hro", |
| 159 | + hwqe: "true", |
144 | 160 | fields: [ |
145 | 161 | { bits: "31:0", |
146 | 162 | name: "VAL", |
|
150 | 166 | }, |
151 | 167 | ] |
152 | 168 | } }, |
| 169 | + { skipto: "0x120" } |
| 170 | + { name: "ADDRESS", |
| 171 | + desc: "Byte address of the word to be accessed", |
| 172 | + swaccess: "wo", |
| 173 | + hwaccess: "hro", |
| 174 | + hwqe: "true", |
| 175 | + fields: [ |
| 176 | + { bits: "31:0", |
| 177 | + name: "VAL", |
| 178 | + desc: ''' |
| 179 | + ''', |
| 180 | + resval: 0x0 |
| 181 | + }, |
| 182 | + ] |
| 183 | + }, |
153 | 184 | ], |
154 | 185 | } |
155 | 186 | } |
0 commit comments