Lines Matching refs:field

266                'field {} has end ({}) < start ({})'.format(self.name, self.end,
270 'bool field ({}) is too wide'.format(self.name)
361 for field in self.fields:
362 field.emit_template_struct(dim)
371 for field in self.fields:
372 if isinstance(field, Group):
373 if field.count == 1:
374 field.collect_dwords(dwords, start + field.start, dim)
376 for i in range(field.count):
377 field.collect_dwords(dwords,
378 start + field.start + i * field.size,
382 index = (start + field.start) // 32
386 clone = copy.copy(field)
392 if field.type == "address":
396 # Coalesce all the dwords covered by this field. The two cases we
398 # and address and a few bits) or where a single struct field
400 while index < (start + field.end) // 32:
439 # Special case: only one field and it's a struct at the beginning
444 field = dw.fields[0]
445 name = field.name + field.dim
446 if field.is_struct_type() and field.start % 32 == 0:
449 (self.parser.gen_prefix(safe_name(field.type)), index, name))
455 for field in dw.fields:
456 if isinstance(field, Field) and field.is_struct_type():
457 name = field.name + field.dim
461 (self.parser.gen_prefix(safe_name(field.type)), index, field_index, name))
482 for field in dw.fields:
483 if field.type != "mbo" and field.type != "mbz":
484 name = field.name + field.dim
486 nz = "_nonzero" if field.nonzero else ""
488 if field.type == "mbo":
490 (field.start - dword_start, field.end - dword_start))
491 elif field.type == "mbz":
492 assert not field.nonzero
493 elif field.type == "address":
495 elif field.type == "uint":
497 (nz, name, field.start - dword_start, field.end - dword_start))
498 elif field.is_enum_type():
500 (nz, name, field.start - dword_start, field.end - dword_start))
501 elif field.type == "int":
503 (nz, name, field.start - dword_start, field.end - dword_start))
504 elif field.type == "bool":
506 (nz, name, field.start - dword_start, field.end - dword_start))
507 elif field.type == "float":
509 elif field.type == "offset":
511 (nz, name, field.start - dword_start, field.end - dword_start))
512 elif field.type == 'ufixed':
514 (nz, name, field.start - dword_start, field.end - dword_start, field.fractional_size))
515 elif field.type == 'sfixed':
517 (nz, name, field.start - dword_start, field.end - dword_start, field.fractional_size))
518 elif field.is_struct_type():
520 (index, field_index, field.start - dword_start, field.end - dword_start))
523 non_address_fields.append("/* unhandled field %s, type %s */\n" % \
524 (name, field.type))
532 (index, index, dw.address.name + field.dim, v,
539 (v_address, index, dw.address.name + field.dim, v,
611 elif name == "field":
641 elif name == "field":
684 for field in self.group.fields:
685 if not isinstance(field, Field):
687 if field.default is None:
690 if field.is_builtin_type():
691 default_fields.append(" .%-35s = %6d" % (field.name, field.default))
694 assert field.is_enum_type()
695 default_fields.append(" .%-35s = (enum %s) %6d" % (field.name, self.gen_prefix(safe_name(field.type)), field.default))