The purpose of the crossbar is to route an input port to an output port depending on the control message.

This is a parametrized crossbar, so it can take any even number of inputs (N_INPUTS) and any even number of outputs (N_OUTPUTS). The messages can be n bit wide.

The first block diagram shows a very high level representation of the crossbar with its input and output ports. The second block diagram shows the mechanisms involved in the crossbar. This routing of one input port to one output port is possible with a combination of muxes and demuxes. 

Testing:

To make sure that the crossbar worked as intended, I wrote a basic test case where the input and output message was 32 bits, the control message was 42 bits and there were 2 inputs and 2 outputs. I checked that every routing worked. Other test cases made sure that the crossbar worked with 1) a smaller message bit width, 2) a smaller control message bit width, 3) 4 inputs and 4 outputs, 4) 4 inputs and 2 outputs, and 5) no recv_val is high. 

This last test case is to demonstrate that the message will be routed from the control message-determined input to control message-determined output port regardless of the recv_val value. However, the recv_val value will be routed to the control message-determined output port's rdy bit. This way the next block will be able to determine if this is a usable message or not. 

  • No labels