diff --git a/b_asic/signal_flow_graph.py b/b_asic/signal_flow_graph.py index c6156a3a378cc624e887ba4358bac374b8918ac8..8f119022ae5057385627f6026aa78f5450e96e8b 100644 --- a/b_asic/signal_flow_graph.py +++ b/b_asic/signal_flow_graph.py @@ -1542,14 +1542,6 @@ class SFG(AbstractOperation): f"{new_ops[layer][op_idx].graph_id}_{suffix}" ) - def sanity_check(): - all_ops = [op for op_list in new_ops for op in op_list] - cmul201 = [ - op for op in all_ops if op.graph_id == GraphID("cmul2_0_1") - ] - if cmul201: - print(f"NOW: {cmul201[0]}") - # Walk through the operations, replacing delay nodes with connections for layer in range(factor): for op_idx, op in enumerate(self.operations): @@ -1625,14 +1617,6 @@ class SFG(AbstractOperation): target_output ) - print( - f"Connecting {new_ops[layer][op_idx].name} <-" - f" {target_output.operation.name} ({target_output.operation.graph_id})" - ) - print(f" |>{new_ops[layer][op_idx]}") - print(f" |<{target_output.operation}") - sanity_check() - all_ops = [op for op_list in new_ops for op in op_list] # To get the input order correct, we need to know the input order in the original @@ -1663,12 +1647,6 @@ class SFG(AbstractOperation): ) ) - print("All ops: ") - print(*all_ops, sep="\n") - - print("All outputs: ") - print(*all_outputs, sep="\n") - # Sanity check to ensure that no duplicate graph IDs have been created ids = [op.graph_id for op in all_ops] assert len(ids) == len(set(ids)) diff --git a/test/test_sfg.py b/test/test_sfg.py index bdbbd7db859228b8b1a05e5554e2c2192ebefce8..59cda52abbd7ced4b18704d48556c042d3452f14 100644 --- a/test/test_sfg.py +++ b/test/test_sfg.py @@ -1662,16 +1662,10 @@ class TestUnfold: for _ in sfg.inputs ] - print("In: ") - print(input_list) - sim = Simulation(sfg, input_list) sim.run() ref = sim.results - print("out: ") - print(list(ref[ResultKey("0")])) - # We have i copies of the inputs, each sourcing their input from the orig unfolded_input_lists = [ [] for _ in range(len(sfg.inputs) * factor) @@ -1687,10 +1681,6 @@ class TestUnfold: sim.run() unfolded_results = sim.results - print("ref out: ") - print("0: ", unfolded_results[ResultKey("0")]) - print("1: ", unfolded_results[ResultKey("1")]) - for n, _ in enumerate(sfg.outputs): # Outputs for an original output ref_values = list(ref[ResultKey(f"{n}")]) @@ -1698,7 +1688,6 @@ class TestUnfold: # Output n will be split into `factor` output ports, compute the # indicies where we find the outputs out_indices = [n + k * len(sfg.outputs) for k in range(factor)] - print("out indices: ", out_indices) u_values = [ [ unfolded_results[ResultKey(f"{idx}")][k] @@ -1707,13 +1696,8 @@ class TestUnfold: for k in range(int(NUM_TESTS)) ] - print("u_values: ", u_values) - flat_u_values = list(itertools.chain.from_iterable(u_values)) - print("ref_values: ", ref_values) - print("flat u_values: ", flat_u_values) - assert flat_u_values == ref_values def test_value_error(self, sfg_two_inputs_two_outputs: SFG):