Forum Discussion
Hi,
Sorry for the delay. Sorry as I am not very familiar with HDL design to implement the digit reverse. However, you can refer to the following mapping table for Radix-4 digit reverse for your 256 data to see if it is helpful.
Original, Digitrev Radix-4
0 0
1 64
2 128
3 192
4 16
5 80
6 144
7 208
8 32
9 96
10 160
11 224
12 48
13 112
14 176
15 240
16 4
17 68
18 132
19 196
20 20
21 84
22 148
23 212
24 36
25 100
26 164
27 228
28 52
29 116
30 180
31 244
32 8
33 72
34 136
35 200
36 24
37 88
38 152
39 216
40 40
41 104
42 168
43 232
44 56
45 120
46 184
47 248
48 12
49 76
50 140
51 204
52 28
53 92
54 156
55 220
56 44
57 108
58 172
59 236
60 60
61 124
62 188
63 252
64 1
65 65
66 129
67 193
68 17
69 81
70 145
71 209
72 33
73 97
74 161
75 225
76 49
77 113
78 177
79 241
80 5
81 69
82 133
83 197
84 21
85 85
86 149
87 213
88 37
89 101
90 165
91 229
92 53
93 117
94 181
95 245
96 9
97 73
98 137
99 201
100 25
101 89
102 153
103 217
104 41
105 105
106 169
107 233
108 57
109 121
110 185
111 249
112 13
113 77
114 141
115 205
116 29
117 93
118 157
119 221
120 45
121 109
122 173
123 237
124 61
125 125
126 189
127 253
128 2
129 66
130 130
131 194
132 18
133 82
134 146
135 210
136 34
137 98
138 162
139 226
140 50
141 114
142 178
143 242
144 6
145 70
146 134
147 198
148 22
149 86
150 150
151 214
152 38
153 102
154 166
155 230
156 54
157 118
158 182
159 246
160 10
161 74
162 138
163 202
164 26
165 90
166 154
167 218
168 42
169 106
170 170
171 234
172 58
173 122
174 186
175 250
176 14
177 78
178 142
179 206
180 30
181 94
182 158
183 222
184 46
185 110
186 174
187 238
188 62
189 126
190 190
191 254
192 3
193 67
194 131
195 195
196 19
197 83
198 147
199 211
200 35
201 99
202 163
203 227
204 51
205 115
206 179
207 243
208 7
209 71
210 135
211 199
212 23
213 87
214 151
215 215
216 39
217 103
218 167
219 231
220 55
221 119
222 183
223 247
224 11
225 75
226 139
227 203
228 27
229 91
230 155
231 219
232 43
233 107
234 171
235 235
236 59
237 123
238 187
239 251
240 15
241 79
242 143
243 207
244 31
245 95
246 159
247 223
248 47
249 111
250 175
251 239
252 63
253 127
254 191
255 255
Hi CheePin,
Thanks for your explanation.
I think I got a bit understanding about digit reverse now .
for radix-4 ,floating representation data,below translation from digit reverse order to natural order index is verified for my case.
Let's call the digit reversed index(non-natural order) as dr_index[7..0] 8 bits, then we call a natural order index na_index[7..0] ,below is my summary how to convert it
For my case, let verify it for the first spike at index 4
from above conversion ,index 4(8'b 00000100) will turn to index 16(8'b 00010000, ie index 4 turn to index 16 under digit reverse calculation,that matches the simulation result.
another spike, which presents at index 252(8'b 11111100) , should be at location index 63(8'b 00111111) under digit reverse order output.
that matches the simulation result too.
hope this summary can help more people to understand this index conversion.
In verilog ,can use below
assign na_index[7:0] ={dr_index[1], dr_index[0],
dr_index[3], dr_index[2],
dr_index[5], dr_index[4],
dr_index[7], dr_index[6] };
thanks
Jim