瀏覽代碼

broadcom/xml: Throw an #error in XML-based codegen for a >1bit bool

I've debugged two nasty errors now due to copy-and-pasting a bool type
when writing a uint field.  Make sure I don't do that again.
tags/18.0-branchpoint
Eric Anholt 8 年之前
父節點
當前提交
443e1984d2
共有 1 個檔案被更改,包括 3 行新增0 行删除
  1. 3
    0
      src/broadcom/cle/gen_pack_header.py

+ 3
- 0
src/broadcom/cle/gen_pack_header.py 查看文件

@@ -111,6 +111,9 @@ class Field(object):
self.end = self.start + int(attrs["size"]) - 1
self.type = attrs["type"]

if self.type == 'bool' and self.start != self.end:
print("#error Field {} has bool type but more than one bit of size".format(self.name));

if "prefix" in attrs:
self.prefix = safe_name(attrs["prefix"]).upper()
else:

Loading…
取消
儲存