def bit_length(self):
try:<EOL><INDENT>itemSize = self.elmType.bit_length<EOL><DEDENT>except AttributeError:<EOL><INDENT>itemSize = None<EOL><DEDENT>if itemSize is None:<EOL><INDENT>raise TypeError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>s = self.size<EOL>if isinstance(s, RtlSignalBase):<EOL><INDENT>s = int(s.staticEval())<EOL><DEDENT>return s * itemSize()<EOL>
:return: bit width for this type