To create a central server object in a Simics instance, the new-central-server can be used:
simics> new-central-server [central_server info] Listening to port 1909 [central_server info] Listening to unix socket /tmp/simics-central.user Created central_server
Without arguments, this command will listen for TCP connections on the standard port (1909), and on the standard file socket name. This can be changed by specifying on the command line where it should listen for connections.
The minimum latency is by default set to 10 milliseconds, but this can also be changed when creating the central server object. It is not possible to change the minimum latency after the server is created.
Creating a central server like this does not automatically make the Simics instance in which the server runs part of the distributed simulation. If any simulation is to be done in the Simics instance acting as a central server, a central client is required in the same Simics, and can be added with the connect-central command:
simics> connect-central obj=central_server Created central_client [central_server info] New connection with id 0 Connected to Simics Central
Other Simics instances can be connected using TCP connections. This works both for instances on the same host or over the host network:
simics> connect-central hostname Created central_client [central_client info] Connected to server Connected to Simics Central
When running a client Simics on the same host as the server, it is better to use file sockets. This can be done by specifying the socket file name to the connect-central, but if the server uses the default socket file name, and runs as the same user as the client, it is simpler to specify localhost as the server. This will automatically be changed to a file socket if the socket is found, otherwise a TCP connection to local host is tried.
simics> connect-central localhost Created central_client [central_client info] Connected to server Connected to Simics Central simics> central_client.info Information about central_client [class central-client] ======================================================= Identification : a string Server : /tmp/simics-central.user
Another way to specify that a Simics instance should connect to a Central server is to use the -central flag to start Simics. This makes it very simple to use the same Simics script without modification even when running with different servers.