Processors, Wires, and Links

Top  Previous  Next

The hardware on which a Diamond application runs is described as a network of processors, each with a number of links connected in pairs by wires.

 

Each wire is a two-way communication path between exactly two processors. You usually constuct this path by explicitly describing a wire connecting the processors. In practice, different manufacturers provide a variety of ways to connect processors: most efficiently, dedicated point-to-point hardware, but shared memory, bus structures, and many more mechanisms have been used. Diamond hides the details of the physical form of these connections from you and behaves as though real wires exist, giving you access to them through a collection of named link types.

 

Dragons003JTAG connections cannot be used for wires;  their only use in Diamond is to support debugging.

 

 

 

In the diagram above, processor P1 has two links: link 0 connects to processor P2 using wire W1, and link 1 connects to processor P3 using wire W2. As long as you can connect the processors using supported devices, Diamond can create applications for systems of any complexity and any intermixture of hardware types.

 

Diamond must be efficient, particularly in its handling of links. This requirement sometimes forces deviations from the strict abstract model's requirement for blocking on all channel transfers. Very few hardware links have the facilities needed for an efficient implementation in which every output transfer is blocked until the corresponding input side reads. The best that can be done without imposing an unacceptable overhead is to block for transfers greater than a certain, hardware-dependent size. In practice, this is only an issue when channel communications are being used to synchronize two processors. If you want to do this, the safest method is to exchange a data word: one end does a chan_out_word followed by a chan_in_word, and the other end does a chan_in_word followed by a chan_out_word. This is not an issue with local or virtual channels; they block when necessary on all transfers.

 

Groups of processors are sometimes attached to each other in a pre-defined hierarchy. For example, it is quite common for one or more DSPs to be attached to an FPGA which provides them with communication resources. You can explicitly attach such processors to the FPGA or you can allow Diamond to do this for you automatically; Diamond declares for you any processor whose existence is implied by other processor declarations.  This is discussed in more detail under PROCESSOR statement: ATTACH attribute. You do not declare wires connecting processors that are attached to each other, either directly or via a common parent.