## Setting Up the MAX+PLUS II/Mentor Graphics/Exemplar Logic Working Environment

To use the MAX+PLUS® II software with Mentor Graphics/Exemplar Logic software, you must install the MAX+PLUS II software, then establish an environment that facilitates entering and processing designs. The MAX+PLUS II/Mentor Graphics/Exemplar Logic interface is installed automatically when you install the MAX+PLUS II software on your computer.

Go to MAX+PLUS II Installation in the MAX+PLUS II Getting Started manual for more information on installation and details on the directories that are created during MAX+PLUS II installation. Go to MAX+PLUS II/Mentor Graphics/Exemplar Logic Interface File Organization for information about the MAX+PLUS II/Mentor Graphics directories that are created during MAX+PLUS II installation.

| The information presented here assumes that you are using a C shell and that your MAX+PLUS II system directory is /usr/maxplus2. If not, you must use the appropriate syntax and procedures to set environment variables for your shell.

To set up your working environment for the MAX+PLUS II/Mentor Graphics interface, follow these steps:

1. Ensure that you have correctly installed the MAX+PLUS II and Mentor Graphics software versions described in MAX+PLUS II/Mentor Graphics Software Requirements.

2. Add the following environment variables to your .cshrc file:

| `setenv ALT_HOME /usr/maxplus2`
| `setenv MGC_WD` <user-specified working directory>
| `setenv MGC_HOME` <Mentor Graphics system directory>
| `setenv MAX2_MENTOR /usr/maxplus2/mentor/max2`
| `setenv MGC_LOCATION_MAP` <user-specified location_map file>
| `setenv EXEMPLAR` <Galileo or Leonardo system directory>

| Installing the Altera®provided MAX+PLUS II/Mentor Graphics interface on your computer automatically installs a template for these environment variables in the /usr/maxplus2/mentor/max2/.cshrc file.

3. Add the $MGC_HOME/bin, $MAX2_MENTOR/bin, $ALT_HOME/bin, $EXEMPLAR/bin/<os>, and $ALT_HOME/bin directories to the `PATH` environment variable in your .cshrc file, where <os> is the operating system, e.g., `SUN4` for SunOS; `SUN5` for Solaris.

4. If you plan to use the Altera Schematic Express (sch_exprss) utility or the Altera VHDL Express (vhd_exprss) utility, add the following environment variable to your .cshrc file:

| `setenv MAX2_QSIM /usr/maxplus2/simlib/mentor/max2sim`

5. Type `source ~/.cshrc` at a UNIX prompt to source the .cshrc file and validate the settings in steps 1 through 4.

6. Add the following lines to your MGC_location_map file:

| `$MAX2_MENTOR`
| `/usr/maxplus2/mentor/max2`
| `$MGC_GENLIB`
| `/`<user-specified Mentor Graphics GEN_LIB directory>
| `$MGC_LSLIB`
| `/`<user-specified Mentor Graphics LS_LIB directory>
| `$MAX2_EXAMPLES`
| `/`<user-specified example directory>
| `$MAX2_LMCLIB`
| `/`<user-specified Logic Modeling directory>
| `$MAX2_GENLIB`
| `/usr/maxplus2/simlib/mentor/alt_max2`
| `$MAX2_QSIM`
| `/usr/maxplus2/simlib/mentor/max2sim`
| `$MAX2_FONT`
| `/usr/maxplus2/mentor/max2/fonts`
| `$MGC_SYS1076_STD`
| `/`<user-specified MGC_HOME directory>`/pkgs/sys_1076_std/ std`
| `$MGC_SYS1076_ARITHMETIC`
| `/`<user-specified MGC_HOME directory>`/pkgs/sys_1076_std/arithmetic`
| `$MGC_SYS1076_PORTABLE`
| `/`<user-specified MGC_HOME directory>`/pkgs/sys_1076_std/mgc_portable`
| `$MGC_SYS1076_IEEE`
| `/`<user-specified MGC_HOME directory>`/pkgs/sys_1076_std/ieee`
| `$MGC_SYS1076_SRC`
| `/`<user-specified MGC_HOME directory>`/pkgs/sys_1076_std/` src
| `$MAX2_MFLIB`
| `/usr/maxplus2/simlib/mentor/alt_mf`

| Installing the Alteraprovided MAX+PLUS II/Mentor Graphics/Exemplar Logic interface on your computer automatically installs a template for these environment variables in the /usr/maxplus2/mentor/max2/location_map/location_map file.

7. If you want to use QuickHDL software to simulate VHDL or Verilog HDL designs, add the following line in the `[library]` section of your quickhdl.ini file: `altera = $MAX2_MFLIB`.

8. If you plan to use QuickHDL software to simulate VITAL-compliant VHDL files, add the following lines to your MGC_location_map file:

| `$MAX2_VTLLIB`
| `/usr/maxplus2/simlib/mentor/alt_vtl`

9. Copy the /usr/maxplus2/maxplus2.ini file to your $HOME directory:

| `cp /usr/maxplus2/maxplus2.ini $HOME`
| `chmod u+w $HOME/maxplus2.ini`

| The maxplus2.ini file contains both Altera- and user-specified initialization parameters that control the MAX+PLUS II software, such as Alteraprovided logic and symbol library paths and the current project name. The MAX+PLUS II installation procedure creates and copies the maxplus2.ini file to the /usr/maxplus2 directory.
Normally, you do not have to edit your local copy of maxplus2.ini, because the MAX+PLUS II software updates the file automatically whenever you change any parameters or settings. However, if you move the max2lib and max2inc library subdirectories, you must update the file. Go to "Creating & Using a Local Copy of the maxplus2.ini File" in MAX+PLUS II Help for more information.

| Go to the following topics, which are available on the web, for additional information:

- MAX+PLUS II Getting Started version 8.1 (5.4 MB)
- This manual is also available in 4 parts:
  - Preface & Section 1: MAX+PLUS II Installation
  - Section 2: MAX+PLUS II - A Perspective
  - Section 3: MAX+PLUS II Tutorial
  - Appendices, Glossary & Index

Last Updated: August 28, 2000 for MAX+PLUS II version 10.0 |
| Home | List by Vendor | List by Tool | List by Function | Mentor Graphics/Exemplar Logic Topics | Documentation Conventions Copyright © 2000 Altera Corporation, 101 Innovation Drive, San Jose, California 95134, USA. All rights reserved. By accessing any information on this CD-ROM, you agree to be bound by the terms of Altera's Legal Notice.