[ ? ] A hypercube multicomputer consists of a collection of 2 n processing elements (PEs)...

[➍] A hypercube multicomputer consists of a collection of 2^{n} processing elements (PEs) arranged at the vertices of an n-dimensional cube. Hypercubes with dimensions 1, 2, 3 and 4 are illustrated in Figure 14.9.

Each PE has a unique address, formed by concatenating the index (0 or 1) in each dimension to derive a binary number. Attached to each PE is a message switch with n bidirectional message channels, one in each dimension. The switches are interconnected along the edges of the hypercube. PEs exchange messages by passing them to the attached switches, which route them through the interconnections from source to destination. A message includes source and destination PE addresses, allowing the switches to determine a route for the message. The hypercube structure can be described recursively. A hypercube of dimension 1 is simply a line from position 0 to position 1 in the first dimension. A hypercube of dimension n (n > 1) is composed of two sub-hypercubes of dimension n – 1, one at position 0 in the nth dimension and the other at position 1 in the nth dimension. Each vertex in one sub-hypercube is joined to the vertex with the same address in the other sub-hypercube. Develop a recursive structural model of an n-dimensional hypercube multicomputer, where the number of dimensions is specified by a generic constant in the entity interface. Your model should include separate component instances for the PEs and the message switches. Also develop behavioral models for the PEs and message switches. The PEs should generate streams of test messages to different destinations to test the switch network. Each switch should implement a simple message-routing algorithm of your devising.