Until recently, Specman used to look for its licenses in the following strict, hardcoded order:
1. "Incisive Specman Elite"
2. "Incisive Enterprise Simulator"
3. "Incisive Enterprise Verifier"
1. "Incisive Enterprise Simulator"
2. "Incisive Enterprise Verifier"
3. "Incisive Specman Elite"
Starting from Specman 12.1, Specman supports -uselicense and -noievlic command line switches. These switches provide you a high degree of control over what licenses Specman will look for and in what order:
In typical Specman fashion, the same functionality is also provided via environment variables:
If you use both the switch and its corresponding variable (e.g., both the SPECMAN_USE_LIC variable and "-uselicense" switch), the switch takes precedence. This precedence can be especially useful,because you can use the variables to set a permanent, long-standing policy, and then override them when desired via the switches or the env command.
When using Specman's -uselicense switch, you specify as a parameter a colon-separated list of mnemonics for the licenses you want searched, in search order (in this way, it works like NCSIM):
Incisive Specman Elite
Incisive Enterprise Simulator
Incisive Enterprise Verifier
Default lookup order
Notice that you can specify DEFAULT as the mnemonic; this value causes Specman to switch to its default, hardcoded lookup order. Note: If you specify DEFAULT, any other values specified in the parameter are ignored.
There are, or course, multiple ways to invoke Specman, and each of them supports -uselicense and -noievlic, as the following examples illustrate:
Note that when irun is used, if only e files are passed to it, irun invokes standalone Specman rather than NCSIM; the -uselicense parameter is interpreted in Specman context here.
Now, let's examine some practical usages, add some environment variables to the mix, and look at Specman's behavior. We begin with the following:
In this case, the switch prevails, so Specman will look only for the "Incisive Specman Elite" license key.
Now let's look at another example:
No switch is specified, so the variable is in effect. Specman will look for "Incisive Enterprise Simulator," and then for "Incisive Enterprise Verifier."
And several more examples:
Specman will look for "Incisive Specman Elite" and then for "Incisive Enterprise Simulator".
In this case, the SPECMAN_NO_IEV variable takes effect together with the -uselic switch, so Specman will end looking for "Incisive Enterprise Simulator" only.
The DEFAULT value overrides all other specified values; the default Specman lookup order (SN:IES:IEV) is used, and the rest is ignored.
And now, let's add a "cherry on top". What happens if the -uselicense switch contains inappropriate (e.g. IUS-only) mnemonics, or just plain garbage?
The following examples illustrate this point:
Falls back to SN:IES.
Falls back to default lookup order.
Falls back to the default lookup order.