summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/intel/genxml/gen_pack_header.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/intel/genxml/gen_pack_header.py b/src/intel/genxml/gen_pack_header.py
index 4bce425d12e..c3d712c7a86 100644
--- a/src/intel/genxml/gen_pack_header.py
+++ b/src/intel/genxml/gen_pack_header.py
@@ -235,6 +235,13 @@ class Field(object):
self.end = int(attrs["end"])
self.type = attrs["type"]
+ assert self.start <= self.end, \
+ 'field {} has end ({}) < start ({})'.format(self.name, self.end,
+ self.start)
+ if self.type == 'bool':
+ assert self.end == self.start, \
+ 'bool field ({}) is too wide'.format(self.name)
+
if "prefix" in attrs:
self.prefix = attrs["prefix"]
else: