Comport Links

Top  Previous  Next

Comports provide the fundamental mechanism for interconnecting Sundance modules. Every processor TIM has a number of comports that can be connected with external wires or with facilities built into carrier boards holding multiple TIMs. You should refer to the documentation for your particular types of TIM for details, including restrictions on the connections that can be made.

 

Diamond provides the link type 'CP' for comports and these correspond directly to the six comports defined by the TIM standard.

 

PROCESSOR root SMT361

PROCESSOR node SMT361

WIRE ? root[CP:1] node[CP:4] ! comports 1 and 4 are connected

 

Comports are documented to operate at a maximum speed of 20MB/s, but some implementations may be a little faster, particularly those operating between processors in a multi-processor TIM. This maximum performance is usually achieved only for transfers of 1KB or more.

 

Dragons003The comport link used by Sundance modules is based on a standard developed by Texas Instruments for their C4x processors. The standard leads to a potential situation in which a comport can deadlock. This is a consequence of comports being half-duplex with a variable direction of transfer, rather than a pair of uni-directional links.
 
Each comport has a transmit FIFO and a receive FIFO. Consider a task writing to a comport. It writes enough words to be transmitted to the receiver and fill its receive FIFO. It now transmits one more word. That word remains in the local transmit FIFO and holds the link in transmit mode. Normally, the receiver  read some of the data and give the link hardware an opportunity to change direction, but if the receiver needs to send data over the same link to the transmitter before reading anything, we have a deadlock; the transmitter is holding the link in transmit mode and it cannot be turned round to let the receiver become a transmitter. This is an inherent problem in comports and is a trap for any software. The mechanism used by Diamond to implement virtual channels ensures that the deadlock can never happen, but it is possible to write Diamond applications using physical channels that can become deadlocked. Users of any other software using comports are also at risk.