@@ -160,12 +160,14 @@ def yaml_file(filename):
160
160
prev_bit = 0x0 #keep track of the even or odd order of bytes globally sent for masking
161
161
#% %
162
162
config = y ['config' ]
163
-
164
163
for c in config : # loop over entries in configuration (sensor category)
165
164
i = 0 # counter over the number of sensors within a category
166
165
names = c ['names' ]
167
166
start = c ['start' ]
167
+ count = c ['count' ]
168
168
for n in names : # loop over names of sensors within a category
169
+ if (n == "R0B" and start != prev_start + prev_count + 1 ):
170
+ print ("warning: the start address of clkmon should continue from clkr0a" )
169
171
if 'postfixes' in c :
170
172
postfixes = c ['postfixes' ]
171
173
j = 0
@@ -191,14 +193,25 @@ def yaml_file(filename):
191
193
node = make_node (pp , p , c , j , bit , n )
192
194
else : #the low byte with an increasing postfix node by one
193
195
node = make_node (pp , p , c , j + 1 , bit , n )
196
+ if (prev_bit == bit and prev_addr == addr and prev_addr != 0 ) :
197
+ print ("warning : please check if masks overlapped at node " , n , " addr " , hex (prev_addr ))
194
198
prev_addr = addr
195
199
prev_j = j
196
200
prev_bit = bit
197
201
i += 1
198
202
j += 1
203
+
204
+ #print("if : n : ", n, " p : ", p, " bit : ", bit)
199
205
else :
200
206
make_node (cm , n , c , start + i , (start + i )% 2 , "" )
207
+ if (prev_bit == (start + i )% 2 and prev_addr == int ((start + i )/ 2 ) and prev_addr != 0 ) :
208
+ print ("warning : please check if masks overlapped at node " , n , " addr " , hex (prev_addr ))
209
+ prev_addr = int ((start + i )/ 2 )
210
+ prev_bit = (start + i )% 2
211
+ #print("else : n : ", n, " bit : ", (start+i)%2)
201
212
i += 1
213
+ prev_start = start
214
+ prev_count = count
202
215
tree = ET .ElementTree (cm )
203
216
ET .indent (tree , space = '\t ' )
204
217
#create output file name based on input file, replacing 'yml' with 'xml'
0 commit comments