Fixing minmax teset for input/select tuplec change
@@ -32,12 +32,12 @@ def chip():
if step == "synmin":
chip.set('flowgraph', step, str(index), 'function', 'step_minimum')
for j in range(N):
- chip.add('flowgraph', step, '0', 'input', flowpipe[i-1] + str(j))
+ chip.add('flowgraph', step, '0', 'input', (flowpipe[i-1],str(j)))
elif step == 'import':
chip.set('flowgraph', step, str(index), 'tool', tools[step])
else:
chip.set('flowgraph', step, str(index), 'tool', tools[step])
- chip.set('flowgraph', step, str(index), 'input', flowpipe[i-1] + '0')
+ chip.set('flowgraph', step, str(index), 'input', (flowpipe[i-1],'0'))
#weight
chip.set('flowgraph', step, str(index), 'weight', 'cellarea', 1.0)
#goal
@@ -60,8 +60,11 @@ def test_minmax(chip):
chip.write_flowgraph('minmax.png')
chip.write_manifest('minmax.json')
- (score, winner) = chip.step_minimum(*[f'syn{i}' for i in range(N)])
- assert winner == ['syn9']
+ steplist = []
+ for i in range(N):
+ steplist.append(('syn',str(i)))
+ (score, winner) = chip.step_minimum(*steplist)
+ assert winner[0] + winner[1] == 'syn9'
# TODO: fix step_maximum
# (score, winner) = chip.step_maximum(*[f'syn{i}' for i in range(N)])
@@ -73,7 +76,11 @@ def test_all_failed(chip):
for index in range(N):
chip.set('flowstatus', 'syn', str(index), 'error', 1)
- (score, winner) = chip.step_minimum(*[f'syn{i}' for i in range(N)])
+ steplist = []
+ for i in range(N):
+ steplist.append(('syn',str(i)))
+
+ (score, winner) = chip.step_minimum(*steplist)
assert winner is None
@@ -83,10 +90,14 @@ def test_winner_failed(chip):
# set error bit on what would otherwise be winner
chip.set('flowstatus', 'syn', '9', 'error', 1)
- (score, winner) = chip.step_minimum(*[f'syn{i}' for i in range(N)])
+ steplist = []
+ for i in range(N):
+ steplist.append(('syn',str(i)))
+
+ (score, winner) = chip.step_minimum(*steplist)
# winner should be second-best, not syn9
- assert winner == ['syn8']
+ assert winner[0] + winner[1] == 'syn8'
#########################
if __name__ == "__main__":
