Merge pull request #432 from esden/csr-doc-fix-int
Don't let python convert lane number to float.
This commit is contained in:
commit
fbadfa1764
|
@ -270,10 +270,11 @@ class DocumentedCSRRegion:
|
|||
attr_str = "\"attr\": 'reset: " + str(reg.reset_value) + "', "
|
||||
print(" {\"name\": \"" + reg.short_name.lower() + self.bit_range(reg.offset, reg.offset + reg.size, empty_if_zero=True) + "\", " + attr_str + "\"bits\": " + str(reg.size) + "}" + term, file=stream)
|
||||
if reg.size != self.csr_data_width:
|
||||
multilane = True
|
||||
print(" {\"bits\": " + str(self.csr_data_width - reg.size) + "},", file=stream)
|
||||
if reg.size < 8:
|
||||
multilane = True
|
||||
if multilane:
|
||||
lanes = self.busword / 8
|
||||
lanes = self.busword // 8
|
||||
else:
|
||||
lanes = 1
|
||||
print(" ], \"config\": {\"hspace\": 400, \"bits\": " + str(self.busword) + ", \"lanes\": " + str(lanes) + " }, \"options\": {\"hspace\": 400, \"bits\": " + str(self.busword) + ", \"lanes\": " + str(lanes) + "}", file=stream)
|
||||
|
|
Loading…
Reference in New Issue