1
0

Perform integer division when parsing rocketchip.DefaultConfig.conf (#493)

This commit is contained in:
GuzTech 2017-01-14 01:40:02 +01:00 committed by Henry Cook
parent 52bb6cd9d9
commit 8157cf1ede

View File

@ -30,7 +30,7 @@ def parse_line(line):
mask_gran = int(tokens[i+1])
else:
sys.exit('%s: unknown argument %s' % (sys.argv[0], a))
return (name, width, depth, mask_gran, width/mask_gran, ports)
return (name, width, depth, mask_gran, width//mask_gran, ports)
def gen_mem(name, width, depth, mask_gran, mask_seg, ports):
addr_width = max(math.ceil(math.log(depth)/math.log(2)),1)