Skip to content
Snippets Groups Projects

Better schedule, including plotting

Merged Oscar Gustafsson requested to merge plotschedule into master
1 file
+ 14
6
Compare changes
  • Side-by-side
  • Inline
+ 14
6
@@ -189,13 +189,21 @@ class TestExecutionTime:
class TestCopyOperation:
def test_copy_buttefly_latency_offsets(self):
def test_copy_butterfly_latency_offsets(self):
bfly = Butterfly(latency_offsets={'in0': 4, 'in1': 2, 'out0': 10, 'out1': 9})
bfly_copy = bfly.copy_component()
assert bfly_copy.latency_offsets == {'in0': 4, 'in1': 2, 'out0': 10, 'out1': 9}
def test_copy_execution_time(self):
add = Addition()
add.execution_time = 2
add_copy = add.copy_component()
assert add_copy.execution_time == 2
class TestPlotCoordinates():
def test_simple_case(self):
@@ -209,11 +217,11 @@ class TestPlotCoordinates():
def test_complicated_case():
bfly = Butterfly(latency_offsets={'in0': 2, 'in1': 3, 'out0': 5, 'out1': 10})
bfly.set_execution_time(7)
bfly.execution_time(7)
lat, exe = bfly.get_plot_coordinates()
assert lat = [[2, 0], [2, 0.5], [3, 0.5], [3, 1], [10, 1], [10, 0.5], [5, 0.5], [5, 0], [2, 0]]
assert exe = [[0, 0], [0, 1], [7, 1], [7, 0], [0, 0]]
assert lat == [[2, 0], [2, 0.5], [3, 0.5], [3, 1], [10, 1], [10, 0.5], [5, 0.5], [5, 0], [2, 0]]
assert exe == [[0, 0], [0, 1], [7, 1], [7, 0], [0, 0]]
class TestIOCoordinates():
@@ -231,5 +239,5 @@ class TestIOCoordinates():
bfly.set_execution_time(7)
i_c, o_c = bfly.get_io_coordinates()
assert i_c = [[2, 0.25], [3, 0.75]]
assert o_c = [[5, 0.25], [10, 0.75]]
assert i_c == [[2, 0.25], [3, 0.75]]
assert o_c == [[5, 0.25], [10, 0.75]]
Loading