The BusMatrix is designed to allow for all configurations of input and output ports, up to a maximum of eight:
from two to eight input ports
from one to eight output ports
round-robin or fixed arbitration.
This gives a total of 112 different configurations (7 × 8 × 2).
A script called
configmatrix.pl is supplied
to allow the construction of any version that is required.
The script is located in both the
To obtain information on the usage of the script, run the script
with the help switch:
> configmatix.pl --help
This prints the following information:
Purpose: Builds particular configurations of the BusMatrix component. Usage: Builds a BusMatrix component with a given number of input ports <inports>, a given number of output ports <outports> and a particular arbitration scheme. Options: --inports=NUM Number of input ports (2,3..8) --outports=NUM Number of output ports (1,2..8) --arb=SCHEME Arbitration scheme (f - fixed, r - round-robin) --all Builds all possible configurations --verbose Prints progress information --help Prints this help
To run the script and build all possible variants use the following command:
> configmatrix.pl --all --verbose
When run, the script generates the RTL for the required BusMatrix
built directory. The name of the directory
has the maximum number of the input and outputs as found in the
RTL and this is one less than might be expected, because the ports
are numbered from zero up to the maximum number. For example, a
BusMatrix with three input ports and five output ports is found
in the directory named
If only a single configuration of the BusMatrix is required, the script can be run to only build that option. Three parameters are required:
number of input ports
number of output ports
arbitration scheme, which can be either fixed priority or round-robin
To build a BusMatrix with three input ports, five output ports, and a fixed priority arbitration scheme, use the following command:
> configmatrix.pl --inports=3 --outports=5 --arb==fixed
The different configurations are generated from a source design that is constructed for the maximum configuration of eight input ports and eight output ports. Throughout this design pragmas are used to indicate the portions of code that can be removed for smaller BusMatrix configurations.
For example, the code required for just one output port (port number 0) is followed by the pragma
-- busswitch output0
the code required for two output ports (up to port number 1) is followed by the pragma
-- busswitch output1
and so on, until finally the code required for all output ports (up to port number 7) is followed by the pragma
-- busswitch output7
Therefore, to generate the code required for a two output
port configuration the script is used to remove all the RTL code
-- busswitch output1 and
busswitch output7 pragmas.