Masking instruction duplication mentioned in #24

This commit is contained in:
Julian Hammer
2019-01-11 16:48:07 +01:00
parent 88856eb573
commit 895a262d5d
3 changed files with 2916 additions and 3 deletions

View File

@@ -132,8 +132,11 @@ def dump_csv(model_data):
if p not in port_occupancy:
port_occupancy[p] = 0.0
po_items = sorted(port_occupancy.items())
csv += '{},{},{},"({})"\n'.format(mnemonic, throughput, latency,
','.join([str(c) for p, c in po_items]))
csv_line = '{},{},{},"({})"\n'.format(mnemonic, throughput, latency,
','.join([str(c) for p, c in po_items]))
csv += csv_line
if '{opmask}' in csv_line:
csv += csv_line.replace('{opmask}', '')
return csv

File diff suppressed because it is too large Load Diff

View File

@@ -74,8 +74,9 @@ class Scheduler(object):
# Check if there's a port occupation stored in the CSV, otherwise leave the
# occ_port list item empty
for i, instrForm in enumerate(self.instrList):
search_string = instrForm[0] + '-' + self.get_operand_suffix(instrForm)
print(search_string)
try:
search_string = instrForm[0] + '-' + self.get_operand_suffix(instrForm)
entry = self.df.loc[lambda df, sStr=search_string: df.instr == sStr]
tup = entry.ports.values[0]
if len(tup) == 1 and tup[0] == -1: