General Description: This Answer Record contains information about using the 4.2i Xilinx tools under Linux/WINE for advanced users in client/server environments.
These guidelines will help you configure your Linux/WINE system in a client/server environment so that multiple users may access and run the Xilinx software tools from a single server. For information regarding a simpler, single-user installation on a local PC, please see (Xilinx Answer 13532).
Before beginning, be sure that you have root privileges to the server and that you have installed RedHat 7.2 and WINE version 20010731 or later. If you check your WINE installation with the command "which wine" and receive the message "usr/bin/wine", this indicates that WINE has been installed correctly and is working. (To confirm your version, enter "wine -v".) WINE is included on the second CD of the RedHat 7.2 distribution and is typically installed automatically.
Choosing the installation location The following steps will configure a single master installation of the Xilinx Software Environment on a server that individual users may access as needed in order to run Xilinx jobs. Linux file trees are typically organized according to the FHS (File-system Hierarchy Standard). Given this standard, you may wish to install packages in the "/opt" directory under "root", which is for packages that are not required for system operation (although you may use any directory location of your choosing). Hereafter, these instructions will refer to this installation directory as "your_server_dir".
Configure WINE for Xilinx The WINE Windows API emulator uses a configuration file containing entries that map Windows directory locations to an equivalent in the Linux environment. When WINE is invoked, it first looks in the home directory for a ".wine" directory that contains the file "config"; if, this is not found, the default configuration file called "wine.reg" in the "/etc" directory will be used.
These instructions will create a Xilinx-specific configuration file for use in the .wine directory. If you do not intend to use WINE for any other Windows programs, you may choose to apply these configurations to the default wine.reg file; this will eliminate the need for each user to source a master configuration file.
You will need to be logged in as "Root" to perform the following steps:
1. Create the following directories: your_server_dir/xilinx (i.e., this would represent /opt/xilinx) your_server_dir/xilinx/windows (represents the equivalent of a c:\windows directory on a Windows OS) your_server_dir/xilinx/windows/system (represents the equivalent of a c:\windows\system directory) your_server_dir/xilinx/Xilinx (represents the equivalent of a c:\Xilinx directory)
Optionally, you may want to install third-party tools in this directory tree to use with Xilinx tools on Linux, such as "your_server_dir/xilinx/synplicity", etc.
2. Copy the DLL files "NETBIOS.DLL" and "NETAPI32.DLL" into the your_server_dir/xilinx/windows/system directory to emulate Windows 98 SE. (This is the recommended way to run WINE, but you may also use "netapi32.dll", "netrap.dll" to emulate Windows NT. Do not use Windows 2000 DLLs, as they will not work with this installation.) You must copy these DLLs from a Windows machine to a network file system or onto a floppy disk. Additionally, copy "NOTEPAD.EXE" to the same area so that you can test your installation.
3. Copy the configuration file "wine.reg" from /etc to your_server_dir/xilinx/config. (Rename the file as "config".)
4. Edit the WINE configuration file "your_server_dir/xilinx/config" file to point to the correct paths. Scroll down to the entry for [Drive C], and edit it so that it points to your newly created "your_server_dir/xilinx" directory. [Drive D] should already point to /mnt/cdrom.
5. Continue to scroll down the configuration file to the [wine] section. Add c:\\Xilinx and c:\\Xilinx\\bin\\nt to the PATH variable. Note that the path requires double slashes and is enclosed in quotation marks:
Set up a client and test your WINE configuration Each user must simply source the master configuration on the server to use the Xilinx tools. To test this functionality, log in using your standard user name. Make a directory in your home directory called ".wine" and cd to .wine. Then, create a symbolic link to the master configuration file by executing the command "ln -sf your_server_dir/xilinx/". To check your symbolic link, execute "ls - al" and you will see the following entry in your list:
This indicates that your .wine directory has a link named "config" that connects to the master configuration file you created above.
If you execute "wine NOTEPAD.EXE", NotePad should open and display a message indicating that your WINE configuration is complete. (NOTE: It may take some time to execute NOTEPAD.EXE with WINE the first time; you will see a number of messages in the terminal from which you executed it. This is normal and will not occur to this extent in successive executions of WINE.)
Install the Xilinx tools 1. Place the PC version of the Xilinx Installation CD into your CD-ROM drive, open a terminal window, and execute cd mnt/cdrom. 2. Type "wine setup". 3. At the "Type of Installation" screen, choose "Custom Installation". 4. At the "Select Software Components to Install" screen, de-select the checkboxes for "ISE Documentation", "MultiLINX Cable Driver", and "Parallel Cable Drivers". 5. At the "Update Your Environment" screen, de-select both checkboxes -- the PATH is set manually in the WINE configuration file, and the XILINX environment variable will be set by log-in scripts or at the command line. 6. At the end of the setup, do not restart the computer; select "NO".
Set the Environment Variables You must set two environment variables in order to run the Xilinx tools. These may be placed in a script in the "your_server_dir/xilinx" directory, and individual users will source that script. Alternately, a copy can be placed in each user's .wine directory, and each user may customize the environment variable as desired. The following commands set the environment variables under different shells:
Test your Xilinx installation After executing the script to set the environment variables, execute "echo $XILINX" to see if it is set to "c:\Xilinx". Execute "echo $XIL_LINUX_WINE" to be sure it is set to "1".
You may now check the execution of Xilinx command line tools with the command "wine par", "wine map", etc. (Again, note that it may take extra time to execute a program with WINE the first time, as the program must create WINESERVER entries; you will see messages in the terminal from which you executed it -- this is normal and will not occur in successive executions.)
Please see the following resolutions for information regarding passing command-line parameters to Xilinx tools under Linux/WINE, and for known issues.
Passing command line parameters to Xilinx tools under Linux/WINE
If you are using WINE and invoke Xilinx command line parameters without modification, the switches will be interpreted as WINE command line parameters. WINE uses a double dash (--) to signify that the parameters following the double dash are to be interpreted by the program that is being called up by WINE. There are two ways to correctly pass parameters:
Known Linux/WINE Issues regarding scripting and memory usage
The following issues are unique to the WINE environment, not the Xilinx tools. These issues are currently under investigation and hopefully will be addressed in future WINE releases.
Use of relative paths in scripts When a script job is run, an error similar to the following may be reported: "The app <xdl.exe> cannot find the input file <test.xdl>". In some cases, WINE does not properly resolve the CWD (current working directory) when using relative paths in a script. If you experience this problem, you must supply the complete path to the input and output files in your script.
Known issues regarding WINE memory usage
The following two issues regarding memory usage may arise when script jobs are run:
1. When an attempt is made to run two jobs concurrently on one WINE server (e.g., two instances of PAR), the second process crashes and WINE goes into debug mode, even though the system appears to have plenty of memory available. This is caused by a memory allocation issue within WINE; to work around it, use two WINE servers. This is done by opening two separate user shells to launch the two jobs.
2. When a client application is used to submit a job that invokes WINE to run a Xilinx program, and the client also sends a job cancellation request, the server application will kill the Xilinx job. The application will exit normally, but the memory will not be released in some instances. This causes a memory leak that prevents successive jobs from running. To work around this problem, an administrator must use the "ps -u <username>" command to identify the process that is hanging, and use "kill #" to kill that process and release the memory.