Simics provides link objects that model common network protocols such as Ethernet (ethernet-switch
, etc.) or serial networks (ser-link
). These are documented respectively in the Ethernet Networking Technology Guide and a section of the Simics User's Guide.
In addition, Simics makes available the necessary infrastructure to build custom network simulation links while enjoying the same benefits as the standard Simics links. How to best build custom network simulation is dependent on the intended usage:
Communication between devices does not require links at all: simple interface calls between objects suffice. For easier configuration, a common broadcast bus object can redistribute the messages on behalf of the sender, with possibly more complex addressing schemes. All of this can be achieved with a proper combination of Simics interfaces, and is no different than an interrupt controller sending "messages" to the processor.
It is important to note however, that this type of network simulation is quickly constrained by the fact that it can not be multithreaded, so it will limit the possibilities of simulating large systems. There are cases where this does not matter—or at least, does not matter enough yet—such as for the standard Simics i2c-link
, which uses a similar scheme as described above.
For multithreaded communication between devices, Simics link objects are a requirement. However, there are simple cases that can be covered with an existing link: the datagram_link
. The datagram_link
is a simple, yet fully functional broadcast link that transmit simple byte string messages from one sender to all the other devices on the link. It is meant primarily as an example of a custom link, but it can be reused directly for simple point-to-point communication between two devices, or a simple broadcast communication. The datagram_link
interface used for communication is documented in the API Reference Manual while the connector type used for components is described in section 24.10.
For more complex communication protocol, such as multiple message types (link status, link speed, data transfer, etc.), more advanced addressing schemes (unicast, multicast groups, etc) or different device roles on the link (such as senders and receivers in the signal-link
), a custom link is more appropriate. The link library for custom links is described, along with the link API, in the Link Library Programming Guide.