small bugfixes

This commit is contained in:
Jan Laukemann
2017-10-04 12:03:48 +02:00
parent eb7aafdcc0
commit a734f233f4
2 changed files with 7 additions and 1 deletions

View File

@@ -265,7 +265,11 @@ class Scheduler(object):
port_line += '\n'
cyc_line = '| Cycles |'
for i in range(len(port_bndg)):
cyc_line += ' {} |'.format(round(port_bndg[i], 2))
space = ' '
cyc = str(round(port_bndg[i], 2))
if(len(cyc) == 4):
space = ''
cyc_line += ' {}{}|'.format(cyc, space)
cyc_line += '\n'
binding = header + horiz_line + port_line + horiz_line + cyc_line + horiz_line
return binding

View File

@@ -524,6 +524,7 @@ class Osaca(object):
param_list[i] = str(op)
param_list_types[i] = op
# Add to list
instr = instr.rstrip()
if(len(instr) > self.longestInstr):
self.longestInstr = len(instr)
instr_form = [mnemonic]+list(reversed(param_list_types))+[instr]
@@ -700,6 +701,7 @@ class Osaca(object):
op_ext_regs.append(False)
if(True not in op_ext_regs):
# No register in whole instr form. How can I find out what regsize we need?
print('test')
print('Feature not included yet: ', end='')
print(elem[0]+' for '+operands)
tp = 0