Skip to content

Commit

Permalink
don't look in here. nothing to see. honest guv
Browse files Browse the repository at this point in the history
there not be a none random random here.
  • Loading branch information
alan-stokes committed May 22, 2018
1 parent c51923d commit 216993c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pacman/operations/fixed_route_router/fixed_route_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class FixedRouteRouter(object):
FAKE_ETHERNET_CHIP_Y = 0
FAKE_ROUTING_PARTITION = "FAKE_MC_ROUTE"
DEFAULT_LINK_ID = 4
RANDOM_CORE_ID = 4

def __call__(self, machine, placements, board_version, destination_class):
""" Runs the fixed route generator for all boards on machine
Expand Down Expand Up @@ -143,8 +142,17 @@ def _do_dynamic_routing(
rel_y = chip_y - eth_y
if rel_y < 0:
rel_y += machine.max_chip_y + 1

free_processor = 0
while ((free_processor < machine.MAX_CORES_PER_CHIP) and
fake_placements.is_processor_occupied(
self.FAKE_ETHERNET_CHIP_X,
y=self.FAKE_ETHERNET_CHIP_Y,
p=free_processor)):
free_processor += 1

fake_placements.add_placement(Placement(
x=rel_x, y=rel_y, p=self.RANDOM_CORE_ID, vertex=vertex))
x=rel_x, y=rel_y, p=free_processor, vertex=vertex))
down_links.update({
(rel_x, rel_y, link) for link in range(
Router.MAX_LINKS_PER_ROUTER)
Expand Down

0 comments on commit 216993c

Please sign in to comment.