Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Commit

Permalink
Merge pull request #5 from project-rig/use-table-minimisation
Browse files Browse the repository at this point in the history
Use routing table minimisation when required.
  • Loading branch information
mossblaser committed Jun 21, 2016
2 parents e8b5da2 + 958f4fc commit 59f5632
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions network_tester/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@

from rig.place_and_route.utils import \
build_machine, build_core_constraints, \
build_routing_tables, build_application_map
build_application_map

from rig.routing_table import \
routing_tree_to_tables, build_routing_table_target_lengths, \
minimise_tables

from rig.place_and_route.constraints import \
LocationConstraint
Expand Down Expand Up @@ -483,10 +487,16 @@ def run(self, app_id=0xDB, create_group_if_none_exist=True,
# Assign a unique routing key to each flow
flow_keys = {flow: num << 8
for num, flow in enumerate(self._flows)}
routing_tables = build_routing_tables(

# Build routing tables from the generated routes
routing_tables = routing_tree_to_tables(
self._routes,
{flow: (key, 0xFFFFFF00) for flow, key in iteritems(flow_keys)})

# Minimise the routing tables, if required
target_lengths = build_routing_table_target_lengths(self.system_info)
routing_tables = minimise_tables(routing_tables, target_lengths)

network_tester_binary = pkg_resources.resource_filename(
"network_tester", "binaries/network_tester.aplx")
reinjector_binary = pkg_resources.resource_filename(
Expand Down

0 comments on commit 59f5632

Please sign in to comment.