Showing posts with label enVision. Show all posts
Showing posts with label enVision. Show all posts

Wednesday, July 4, 2018

How to Create Periodic and One-shot Timer in EIM

**Note that this also works on EIM @ solaris**


Assuming you want to create a periodic timer that starts with program or EIM loading, add the these codes to the following EIM entry points:

void myEIM::ExtIntfInit( ProgramControl *program, const int head )
{
// ------------------------------------------------------------------
// create periodic timer that fires every x amount of seconds
// ------------------------------------------------------------------
StopTimer(0xFF); // stop this timer first in case there's already one running with this id
unsigned int nSec = 60;
if (!CreateTimer(0xFF, 1, nSec, 0, true))
{
program->writeln(STDOUT, "ERROR! Failed to create periodic timer of %d seconds!\n", nSec);
}
else
{
time_t tTime;
  struct tm * localTime;
time ( &tTime );
  localTime = localtime ( &tTime );
program->writeln(STDOUT, "SUCCESS! Created periodic timer of %d seconds Starting at %s", nSec, asctime (localTime));
}
}

- myEIM is the external interface' name
- timer id for this code is 0xFF; you can set any unique integer you want
- the above code creates a periodic timer that immediately starts its countdown when CreateTimer() call is successful
- the timer is set to periodically trigger every 60 seconds

Monday, August 15, 2016

Understanding Loaded and Selected Sites in EVXA /EIM

ProgramControl.getNumberLoadedSites()
- returns the number of defined sites in Adapter Object of the test program + 1


ProgramControl.getNumberSelectedSites()
- returns the number of sites (selected or not selected in bin tool) from site 1 up to maximum site that is active (selected in bin tool) + 1
- say 4-site is [1101] where site 3 is inactive. return value is 5
- say 4-site is [1010] where sites 2 and 4 are inactive, return value is 4
- say 4-site is [0110] where sites 1 and 4 are inactive, return value is 4
- say 4-site is [0001] where sites 1, 2, and 3 are inactive, return value is 5


ProgramControl.getLoadedSites()
- returns a a pointer to an array of sites that are defined in Adapter Object of the test program
- site 1 is referenced to array [1] and array[0] does not really define a site
- the size of the array it points to is the return value of getNumberLoadedSites()


ProgramControl.getSelectedSites()
- returns a a pointer to an array of sites from site 1 to last site that is active (selected in bin tool)
- if no site is selected in bin tool, returns 0 ***
- site 1 is referenced to array [1] and array[0] does not really define a site
- the size of the array it points to is the return value of getNumberSelectedSites()











Tuesday, July 26, 2016

Clone an Existing EIM using MethodTool

  1. Load the EIM to be cloned
    • Set MethodTool>Edit>Test Methods>External Interface
    • Click "External Interface" button and "Find enVision Object" dialog box will appear and shows a list of ExternalInterface to choose. 
    • Select The ExternalInterface to clone and press OK.
    • The text box beside "ExternalInterface" button now displays the name of the EIM you selected
    • The "Method Directory" now displays the path of the source code for the loaded EIM
    • All the member functions and variables defined or added into this EIM are also displayed 
  2. Clone the loaded EIM 
    • Set MethodTool>File>Clone...
    • in "Select Clone Directory" popup
      • set name of cloned EIM in text box beside "ExternalInterface"
      • set directory where the cloned EIM will be stored in text box beside "Method Directory:"
        • make sure to specify the folder where the source code and binaries will be stored
      • Click OK 
        • If a new folder is specified, it will be created 
        • mid, tmk, cxx, and hxx files will be created and are copies of the EIM that is cloned
        • the newly created cloned EIM is automatically compiled and DNT/FX1 folder with evso is created after successful build 
  3. Update sources
    • You can now make changes to the source code of the clone EIM

    Thursday, July 21, 2016

    How to Update enVision Demo License in Solaris (Unix Box for EIM Compiling)

    1. Follow instruction from AppsWiki on how to create demo license "license.dat" file for enVision/Unison
      • root access is password:ltxroot
    2. If ".cshrc" file does not exist in maint account home directory, create it
      • make sure to login as  user: maint, password: maint
      • run /ltx/apps_support/com/cde_account_config
        • the above command will generate ".cshrc" file in maint's home directory
    3. log out and log back in again with "maint" account. 
    4. launch enVision

    Tuesday, July 19, 2016

    Create New EIM from Scratch Using MethodTool

    1. Create a new program or load an existing program. 
      • MethodTool can only be invoked when a program is loaded in enVision.
    2. Launch MethodTool from OpTool>Tools>Development>Method
    3. In MethodTool's menu, set MethodTool>Edit>Tool Mode>External Interface
    4. Set the working directory for EIM. 
      • Click the "Method Directory:" button in MethodTool
      • In the file selection dialog box, select the directory where the EIM files are to be stored
      • Optional: If a directory name is specified in "Enter Directory:" field in the file selection dialog box, this new directory will be created (if it does not exist yet) and the EIM files will be stored in it
    5. Specify EIM name using the "ExternalInterface:" button in MethodTool
      • clicking this button will invoke popup listing existing EIM already created previously. If you already created one before and wish to modify it, select it from the list
      • To create a new EIM, type the EIM name in the textbox beside "ExternalInterface:" button and press <return>
      • Once EIM is specified, you will notice that the "Linked Filename:" will now be filled with <path>/<external interface name>.evso and buttons in MethodTool for creating/modifying/building EIM source codes will be enabled
      • The .evso file will be the output binary file of a successful EIM source code compile
    6. Specify the entry point functions to be included in your EIM class
      • Entry point functions are methods that will be included in your EIM class. these methods are event handlers that you can modify to perform action when an event occur in enVision e.g. StartTest(), a function that is executed by EIM when testing starts in enVision. You can modify StartTest() function to perform actions you need when a start of test occurs
      • In MethodTool, click Edit>Entry Points... and "Select Entry Points" popup will appear. Select which entry point function you wish to add in your EIM class and press OK
    7. Create source codes 
      • In MethodTool, click "Create Sources" button and the following files will be created in the working directory:
        • <eim name>.mid
        • <eim name>.cxx
        • <eim_name>.hxx
      • Check the .cxx files if the entry point functions you selected are defined in the code
    8. Create Makefile
      • In MethodTool, click Options>Create Method Makefile... and "Create Method Makefile popup will appear
        • The evso Name will be the name of the binary file to be created when compiling is successful
        • The Path is where the source codes to be compiled are located
      • Right click on each lines listing the required source code files and choose "Dynamic Linked"
      • Press "Create Makefile" button
      • In the working directory, you will now see new files:
        • Makefile
        • <eim name>.tmk
    9. Define member parameters for your custom EIM class
      • MethodTool will only include 2 member methods init_local_member_data() and free_local_member_data() only if at least one custom parameter is declared
      • choose one of the rows (preferably the top most available) and write the name of the variable in "Name" column.
      • to specify the type of variable (e.g. TestheadConnection*)...
        • right-click on the member variable's "Data Type" field and popup will appear. choose "Local Data...".
        • In the dialog box that appear, enter the type name in the text box below "Standard Data Type" and press OK
      • Adding new member parameters or changing/updating existing ones will require you to update your source code in MethodTool so that changes will reflect.
        • In the MethodTool, click the "Update Sources" button
    10. Modify your source code and save changes
    11. Build the EIM
      • In MethodTool, click "Build" button.
      • You will be prompted couple of times. Just keep clicking Yes/OK
      • A terminal will open showing compile in progress. it will automatically close if successful. otherwise it will remain open for you to see the errors
      • The following files will be created in working directory upon successful build:
        • <DNT of FX1>/<eim name>.evso
        • Note that the folder can either be DNT or FX1 depending on which tester you used to compile it with
    12. Test the EIM
      • Create or load an existing test program of your choice in OpTool
      • Load your EIM in MethodTool
      • For debug purposes, make sure to add the ExtIntfInit() entry point function in your EIM if you haven't done so
        • Modify the source code by adding the following line inside ExtIntfInit() function in <eim>.cxx
          • program->writeln(STDOUT, "Hello EIM world!\n");
      • Compile the EIM and if successful, load it into enVision by clicking "Reload" button in MethodTool
      • In Optool menu, go to OpTool>Setup>EIM... and "Setup External Interface Method" popup will appear
        • If your test program already have an existing external interface object defined, you can just insert your EIM method in it by pressing "Insert Methods" button and selecting your EIM in the popup list. 
        • Note that if you can't find your EIM in the list, try pressing "Reload" button again in the MethodTool
        • Press OK
      • Once your EIM is loaded, a message "Hello EIM World!" will be printed in the Dataviewer
      • Note: In simulation, enVision does not automatically start EIM process so start it manually by restarting tester via command line as shown:
        • >restart_tester <tester> -seim


    Wednesday, July 6, 2016

    How to Install and Test CURI

    • Download CURI package from Expedite (Software Support)
      • Make sure to choose the right version 
        • enVision 
          • isg_enVision_curi-<version.<arch>.rpm
          • e.g. isg_enVision_curi-1.12-1.117.cnt4.6.i386.rpm 
        • Unison
          • isg_unison_curi-<version>.<arch>.rpm
          • e.g. isg_unison_curi-1.12-2.117.cnt4.6.i386.rpm
      • Note: The above filename convention is supposed to be for versions older than 112. However, newer versions such as the example above (version 117) are still observed to be following the old naming convention. refer to curi deployment presentation for this issue
    • Install CURI package
      • login as root
      • >rpm -ivh <curi>.rpm
      • make sure not to use -uvh as option
    • Check for install locations
      • Windows: c:\opt\ateTools\curi\CURI_<release>
      • Linux: /opt/ateTools/curi/CURI_<version>
        • e.g. installing isg_enVision_curi-1.12-1.117.cnt4.6.i386.rpm
          • Install location: /opt/ateTools/curi/CURI_CURI_1.12_1.117
        • e.g. installing isg_unison_curi-1.12-2.117.cnt4.6.i386.rpm
          • Install location: /opt/ateTools/curi/CURI_CURI_1.12_2.117
      • Symbolic links: /opt/ateTools/curi/
        • Legacy - ITE and enVision
          • CURI=> <curi directory>
        • Unison
          • unison => <curi directory>
      • CURI config file locations
        • Unison: /opt/ateTools/curi/unison/config/curi_conf.xml
        • enVision: /opt/ateTools/curi/CURI/config/curi_conf.xml
    • Optional: Change write permissions of curi_conf.xml
      • curi_conf.xml can be found here:
        • Unison: /opt/ateTools/curi/unison/config/curi_conf.xml
        • enVision: /opt/ateTools/curi/CURI/config/curi_conf.xml
    • Verify if CURI is installed correctly
      • Linux
        • /opt/ateTools/curi/CURI_<release>/bin/test_curi 
        • /opt/ateTools/curi/CURI_<release>/bin/test_curi -noTestLoop
          • option to not enter into loop mode
        • Ignore the "FAILED: onEquipment not supported..." in the output log
      • Windows
        • C;\opt\ateTools\curi\CURI_<release>bin/test_curi.exe
      • Above commands will list all equipment this CURI release knows. if no list comes out, something is wrong


    How to uninstall CURI from CentOS
    • login as root
    • to find the installed curi package, execute this command
      • >rpm -qa | grep curi 
    • rpm -e <curi>

    Install locations:
    • Windows: c:\opt\ateTools\curi\CURI_<release>
    • Linux: /opt/ateTools/curi
      • Pre v112
        • /opt/ateTools/curi/CURI_<release>
      • v112 and higher
        • /opt/ateTools/curi/diamond-curi-<release>
        • /opt/ateTools/curi/enVision-curi-<release>
        • /opt/ateTools/curi/unison-curi-<release>
        • note that the diamond is for ITE
    • Symbolic links
      • Legacy - ITE and enVision
        • CURI=> <curi directory>
      • Unison
        • unison => <curi directory>
    • CURI config file locations
      • Unison
        • /opt/ateTools/curi/unison/config/curi_conf.xml
      • enVision
        • /opt/ateTools/curi/CURI/config/curi_conf.xml

    How to verify if CURI is installed correctly
    • Linux
      • /opt/ateTools/curi/CURI_<release>/bin/test_curi 
      • /opt/ateTools/curi/CURI_<release>/bin/test_curi -noTestLoop
        • option to not enter into loop mode
    • Windows
      • C;\opt\ateTools\curi\CURI_<release>bin/test_curi.exe
    • Above commands will list all equipment this CURI release knows. if no list comes out, something is wrong


      Sunday, May 15, 2016

      How to Install R15.8.4 with Customized GEM option for ST


      INSTALLATION
      • Login as root
      • Unpack R15.8.4 tar.gz package
        • gunzip R15.8.4.i686_linux_2.6.9.gnutar.gz
        • tar -xvf R15.8.4.i686_linux_2.6.9.gnutar
        • cd R15.8.4
      • Install the enVision software
        • go to R15.8.4 folder where the tar.gz package is decompressed
        • go to the appropriate directory ~/R15.8.4/i686*/Disk2/DNT/pkgs
        • run >./install_evx
        • you will be prompted to choose install location. recommended to install on default location
        • you will be prompted to make R15.8.4 as default tester release. 
        • you will be prompted to set R15.8.4 as default tester release for /opt/ltx/bin links. recommended as it should always point to the latest (highest numbered) installed enVision release.
      • Install enVision common files
        • go to R15.8.4 folder where the tar.gz package is decompressed
        • go to the appropriate directory ~/R15.8.4/i686*/Disk1/DNT/pkgs
        • run ./install_common
      • Install enVision On-line Documentation
        • go to R15.8.4 folder where the tar.gz package is decompressed
        • go to the appropriate directory ~/R15.8.4/i686*/Disk1/DNT/pkgs
        • run >./Acrobat7/INSTALL
        • you will be prompted to accept or deny installation.
        • you will be prompted to specify installation directory and offer default path. recommended to accept default path
      • Install flexnet license manager
        • This maybe optional. but won't hurt to install again
        • go to R15.8.4 folder where the tar.gz package is decompressed
        • go to the appropriate directory ~/R15.8.4/i686*/Disk1/DNT/pkgs
        • run >rpm -Uvh LTXflexnet*.rpm
      • Install CURI
        • go to R15.8.4 folder where the tar.gz package is decompressed
        • go to the appropriate directory ~/R15.8.4/i686*/Disk1/DNT/pkgs
        • run >rpm -Uvh isg_enVision_curi*.rpm 


      RECIPE HANDLER CONFIGURATION
      • It is recommended to do this on xterm terminal launched through enVision.
      • Go to directory where recipeHandler is located 
      • Compile to source code 
        • ~/recipeHandler/make -f /opt/ateTools/curi/CURI/dev/makeTemplates/makefile.curi CFG=Release
      • run recipeHandler 
        • ~/recipeHandler/Release/recipeHandler <tester> -c
      • or you can run with debug log ON
        • ~/recipeHandler/Release/recipeHandler <tester> -c -d

      CGEM CONFIGURATION