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:
- -uselicense - allows you to explicitly list which licenses Specman should look for, in the desired search order. This command can be abbreviated -uselic or -usel.
- -noievlic - prevents Specman from looking for the "Incisive Enterprise Verifier" license. This command can be abbreviated -noiev.
In typical Specman fashion, the same functionality is also provided via environment variables:
- SPECMAN_USE_LIC - this variable is the equivalent of the -uselicense switch
- SPECMAN_NO_IEV - this variable is the equivalent of the -noievlic switch
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:
- specman -uselic SN:IEV
- specview -uselic IES:SN
- specrun -uselic SN:IES
- irun -uselic SN:IES -gui top_file.e
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:
- env SPECMAN_USE_LIC=IES:IEV specman -uselic SN
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:
- env SPECMAN_USE_LIC=IES:IEV specview
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:
- env SPECMAN_NO_IEV=1 specman
Specman will look for "Incisive Specman Elite" and then for "Incisive Enterprise Simulator".
- env SPECMAN_NO_IEV=1 specman -uselic IEV:IES
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.
- env SPECMAN_USE_LIC=SN:IES SPECMAN_NO_IEV=1 specman -uselic IEV:IES:DEFAULT
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?
- - If SPECMAN_USE_LIC is set and its content is OK, it will be used
- - Otherwise, the default lookup order will be used.
The following examples illustrate this point:
- env SPECMAN_USE_LIC=SN:IES specman -uselic foo:bar
Falls back to SN:IES.
- env SPECMAN_USE_LIC=foo:bar specman -uselic baz:bat
Falls back to default lookup order.
Falls back to the default lookup order.