You'll need a Verilog or a mixed-language simulator to run your testbench, but the simulator doesn't need to be on your own system. rtv has a client/server mode, which allows a remote simulator to be used. When running in this mode, rtv has to transmit all the HDL source files to the remote system, so this mode may not be suitable if there are a large number of source files, or if the source files cannot easily be listed on the simulator command line. Note that you cannot use client/server mode in mtv if your testbench uses streams (in other words, if it has any file I/O).
You'll need to check your simulator vendor's licensing terms to find out whether this usage is permissible. Note, however, that rtv itself must run on the remote system, and it runs the simulator locally, on the remote system. Your own system never needs to check out a licence; your local instance of rtv communicates only with the remote instance of rtv. You own system never communicates directly with the remote simulator.
You can use the client/server mode to communicate between Windows and Unix machines. If you're running Windows, for example, you can use a remote Linux simulator, and vice-versa.
The remote system is the server, while the local system is the client. rtv must be available on both systems, while mtv runs only on the client, and the selected simulator runs only on the server. You'll need to open a port on the server (but not the client); this is assumed to be port 5000, although any unused port will do. For these examples, the local system is named 'minnie', and the remote system is named 'mickey'. On the remote system, you should run:
mickey $ rtv --server 5000
If you want to check the network traffic to confirm that the client is connecting, you can enable debug as follows:
mickey $ rtv --server 5000 --debug-level 1
The client needs to have either an IP address, or a name, for the server. If our testbench is test.tv, and that the DUT files are stored locally in the dut directory, then the client can run the testbench as follows:
minnie $ rtv --client mickey:5000 test.tv :dut/dut1.v :dut/dut2.v
- In general, you will need a fully-qualified domain name (FQDN) for the server, or an IP address. For this example, 'mickey' is assumed to be on the local network. Only IPV4 addresses are currently supported
- The DUT files have a preceding : character. This instructs the client to transmit these files to the server; see below
- The client is responsible for selecting the required simulator. It can do this in the normal way, either by setting the RTV_SIMULATOR environment variable, or by specifying the --sim switch. Some care may be necessary, though. If the client is Linux, but the server is Windows, for example, then the client will need to select an appropriate Windows configuration file entry. If the client wants the server to run Icarus on Windows, for example, then it should set RTV_SIMULATOR to icarus_mgw, and not to icarus.
The client compiles test.tv locally, and transmits the HDL output to the server. The client also transmits any files which have a leading : character in their name to the server. It then instructs the server to carry out the simulation, and to return the results to the client. If the client had instead executed this command:
minnie $ rtv --client mickey:5000 test.tv dut/dut1.v dut/dut2.v
then the server would instead have attempted to find local copies, on the server, of dut/dut1.v and dut/dut2.v, in a path relative to rtv's current working directory.
The colon-prefix technique can only be used if all the required HDL files can be listed on the rtv (and simulator) command line. If the HDL sources include other files on the client file system, or if the simulation requires a '-y' (or equivalent) option to find missing files, then you will need to find another way to run the simulation. Two options are:
- Create a network share, so that the server can directly see the DUT files. In this case, the required DUT files should be specified without a leading : character
- Install the simulator locally on the client system, and check out a licence
The leading : character will be ignored if rtv is not running in client/server mode.