Skip to content

Commit

Permalink
Fix errant doctest.
Browse files Browse the repository at this point in the history
  • Loading branch information
mossblaser committed Jan 12, 2016
1 parent 2b9314d commit 43b74b1
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions docs/source/routing_table_tools_doctest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,35 +51,35 @@ The outline below shows how routing tables might be generated from the results
of Rig's :py:mod:`place and route <rig.place_and_route>` tools, minimised and
then loaded onto a SpiNNaker machine.

::

>>> # Interrogate the SpiNNaker machine to determine what resources are
>>> # available (including the number of multicast routing table entries on
>>> # each chip).
>>> from rig.machine_control import MachineController
>>> machine_controller = MachineController("hostname")
>>> system_info = machine_controller.get_system_info()
.. code-block:: python
# Interrogate the SpiNNaker machine to determine what resources are
# available (including the number of multicast routing table entries on
# each chip).
from rig.machine_control import MachineController
machine_controller = MachineController("hostname")
system_info = machine_controller.get_system_info()
>>> # Place-and-route your application as normal and select suitable
>>> # routing keys for each net.
>>> from rig.place_and_route import route
>>> routes = route(...)
>>> net_keys = {Net: (key, mask), ...}
# Place-and-route your application as normal and select suitable
# routing keys for each net.
from rig.place_and_route import route
routes = route(...)
net_keys = {Net: (key, mask), ...}
>>> # Produce routing tables from the generated routes
>>> from rig.routing_table import routing_tree_to_tables
>>> routing_tables = routing_tree_to_tables(routes, net_keys)
# Produce routing tables from the generated routes
from rig.routing_table import routing_tree_to_tables
routing_tables = routing_tree_to_tables(routes, net_keys)
>>> # Minimise the routes (if required), trying a sensible selection of table
>>> # minimisation algorithms.
>>> from rig.routing_table import (
... build_routing_table_target_lengths,
... minimise_tables)
>>> target_lengths = build_routing_table_target_lengths(system_info)
>>> routing_tables = minimise_tables(routing_tables, target_lengths)

>>> # Load the minimised routing tables onto SpiNNaker
>>> machine_controller.load_routing_tables(routing_tables)
# Minimise the routes (if required), trying a sensible selection of table
# minimisation algorithms.
from rig.routing_table import (
build_routing_table_target_lengths,
minimise_tables)
target_lengths = build_routing_table_target_lengths(system_info)
routing_tables = minimise_tables(routing_tables, target_lengths)
# Load the minimised routing tables onto SpiNNaker
machine_controller.load_routing_tables(routing_tables)
:py:class:`.RoutingTableEntry` and :py:class:`.Routes`: Routing table data structures
Expand Down

0 comments on commit 43b74b1

Please sign in to comment.