Showing posts with label Unison. Show all posts
Showing posts with label Unison. Show all posts

Wednesday, April 10, 2019

How to Enable WIR, WCR, WRR records on STDF in Unison



Unison doesn't automatically add WIR, WCR, and WRR records into STDF file. To enable it, you need to add Wafer Descriptor object in the test program. To do this, follow the instructions below:


  1. In Optool menu, go to Tools > Wafer Map, the WaferMapTool will open.
  2. In the WaferMapTool, create Wafer Descriptor object. In my example below, I named the object “PutWaferDescriptorObjectNameHere”



  1. In the WaferMapTool menu, go to Edit > Edit Wafer Description…, the Edit Wafer Description Tool will open
  2. Put all the necessary values in the fields as shown below. Click OK


  1. Now that you have the Wafer Descriptor object. Let’s make it active.  In OpTool menu, go to Setup > Active Object > Wafer…, select the Wafer Descriptor you created. In my case it’s the “PutWaferDescriptorObjectNameHere”.
  2. Don’t forget to SAVE your program!!!
  3. Now from here on, as long as you use CURI driver that is for prober/wafer testing, you should generate WIR, WCR, and WRR in your STDF file.


Thursday, October 25, 2018

Compiling C++ Codes into shared Library and Linking Them


Compiling C++ Codes into shared library and linking them

Let's say you have files print.h and print.cpp, shown below that contains C++ codes you wish to compile as .so (shared object) file and they are stored in ~/demo/lib folder.

#ifndef __PRINT__
#define __PRINT__

#include <iostream>
#include <stdio.h>
void print(const char* p, bool endl = true);

#endif
#include <print.h>

void print(const char* p, bool endl)
{
std::cout << "print: " << p;
if (endl) std::cout << std::endl;
}

You can compile the above code into .o (static library) file with the command

~/demo/g++ -o lib.o -c ./lib/print.cpp

But we want to compile it as .so (shared library) file so we use the command instead

~/demo/g++ -o ./lib/liblib.so -shared -fpic ./lib/print.cpp

Note that with the above commands, liblib.so and lib.o is created in ~/demo/lib folder upon successful compilation.

Now let's say you have another set of C++ files loop.cpp and loop.h, shown below and you wish to compile them together with another C++ file into an .so file...

#ifndef __LOOP__
#define __LOOP__

#include <iostream>
#include <unistd.h>

class loop
{
public:
loop()
{
std::cout << "loop constructor"<< std::endl;
}
virtual ~loop()
{
std::cout << "loop destructor"<< std::endl;
}

void run(int i, int r);
};

#endif

#include <loop.h>

void loop::run(int i, int r)
{
while(r)
{
sleep(i);
std::cout << "loop..." << std::endl;
r--;
}
}

To compile print.cpp and loop.cpp files into a single .so file, do the command as shown below

~/demo/g++ -o ./lib/liblib.so -shared -fpic ./lib/print.cpp ./lib/loop.cpp

Now that we have .so file already, let's create a C++ program that will use this shared library and use the function and class it contains.
The C++ file below will be our C++ program. It is stored as main.cpp in ~/demo folder.
It uses print() from print.cpp to print "hello world" and uses loop class to perform a loop of 5 intervals.

#include <iostream>
#include <print.h>
#include <loop.h>

int main()
{
print("hello world");
loop p;
p.run(1,5);
return 0;
}

Let's compile this code and link the shared library with it. The command below shows how to compile it into "run".

g++ -o run main.cpp -L/lib -llib -I./lib -I./

If compile is successful, and executable named 'run' should appear in ~/demo folder. If you execute it, you might encounter an error as shown below. This is because when executing a program that has dependency on a shared library, it needs to know where the library is.

run: error while loading shared libraries: liblib.so: cannot open shared object file: No such file or directory

To fix this, you can do either of the two possible solutions

1. Copy the liblib.so into any folder listed in the system's LD_LIBRARY_PATH environment variable. This is a more consistent solution because you only do this once.

2. add ~/demo/lib folder into LD_LIBRARY_PATH environment variable. You have to keep setting this every time you try to execute your program in a new terminal. To do this, follow the command below:

~/setenv LD_LIBRARY_PATH ~/demo/lib:${LD_LIBRARY_PATH}

Now try to run the program again.

Using Makefile 

You can create a makefile to simplify this process. Copy the code below into ~/demo/makefile

all: so main

so : ./lib/print.cpp ./lib/loop.cpp
g++ -o ./lib/liblib.so -shared -fpic ./lib/print.cpp ./lib/loop.cpp -I./lib

main : ./lib/liblib.so
g++ -o run main.cpp -L./lib -llib -I./lib -I ./

Then just call 'make' and the whole compiling process will be done.


Linking the Shared Library (.so) in Unison

In this guide, we will link a share library (.so) in a Unison test program and use the functions and classes defined in the shared library.

1. Optional: copy the .so file as well as its .h header files into test program folder

2. After loading test program, open TestTool



3. In the TestTool, select the application library you want to link the .so file. double-click it to open its settings. Below shows that I selected ST_DLOG application library from my test program.



4.  Click on "Compiler and Linker" tab. Click the "Add Path.." button and select the path where the .so file is located.



5. Once done, you will see the path in the "Linker Paths" list box.



6. In the "Linker Flags" list box, click an empty row. then type -L<.so path> -l<.so name w/o lib prefix>. The -l flag lets me specify the filename of the .so file I want to use, but I without the 'lib' prefix and .so extension. My .so file's filename is liblib.so so removing the prefix and extension, it becomes -llib.



7. Click "Include Paths" tab.



8. Click the "Add Path.." button and select the path where the .h file is selected. Once done, you will see the path in the "Include Paths" list box.



9. Add the include file in the application library's source code. Below shows I declared the include on ST_Datalog.cpp. I included the 2 header files from my shared library - loop.h and print.h



10. Somewhere in ST_Datalog.cpp, i called mydemo::print() function which is defined in the shared library.


11. Finally, compile your application library.










Tuesday, March 20, 2018

How to Fix Unison 6.2 VM's issue where lmhostid returns "" and not mac address

edit /etc/udev/rules.d/70-persistent-net.rules

it contains:

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:aa:6d:77", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

just change NAME= to NAME="eth0", keep the rest as is.



edit /etc/sysconfig/network-scripts/ifcfg-eth0

it contains:
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="00:0C:29:AA:6D:77"
DOMAIN="ltx.com ltx-credence.com ltxc.com"
IPV6INIT="no"
IPV6_AUTOCONF="yes"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"

make sure the HWADDR is set to correct mac address. you can get mac address from call to ifconfig


restart the system

Sunday, March 18, 2018

How To Install Unison In CentOS

Instructions for extracting Evx releases and patches.

1.  If you do not have gnu tar and gzip, retrieve the files
    gnutar and gzip. By clicking the download link.
    

2. Retrieve the appropriate release. By clicking the download link. 

   

   NOTE: You will need approximately 500 Meg free on your machine
   to hold the file, and approximately 2 Gig to extract it.
   

3. Once the transfer is complete, you can extract the file.  You
   must use gnu tar to extract the file.  The directory nesting
   of an Evx release is too deep for most unix tars.
   Again, make sure you have at least 2 Gig free in the directory
   where you will be extracting the tar file.
   Assuming that gnutar, gzip and the downloaded archive are all
   in the same directory, run the following commands to extract the
   archive:

   Make gnutar and gzip executable
   # chmod 755 gnutar gzip

   Uncompress the archive
   # ./gzip -dc R12.2.0.gnutar.gz | ./gnutar xf -
   
   Uncompress command for R12.4.0 and above:
   # ./gzip -dc R12.4.0.gnutar.gz | ./gtar xf - 

   Uncompress command for Linux Example:
   # /bin/gzip -dc R15.4.0.i686_linux_2.6.9.gnutar.gz | /bin/gtar xf -

4. Once the archive has been extracted, you will find installation
   instructions in the doc directory








~Uxx/x86*/pkgs/install_evx

[root@centos62 pkgs]# ./install_evx
QT v5.2.1 can be installed to a local directory or to a network directory.
You can also link to an existing directory that is network accessible.
Would you like to link to an existing installation?: (Y/[N]): ^C
You have new mail in /var/spool/mail/localuser
[root@centos62 pkgs]# pwd
/home/localuser/Desktop/U5.2.2.1/x86_64_linux_2.6.32/pkgs
[root@centos62 pkgs]# ./install_evx
QT v5.2.1 can be installed to a local directory or to a network directory.
You can also link to an existing directory that is network accessible.
Would you like to link to an existing installation?: (Y/[N]): N

The default location for v5.2.1 is /opt/ltx/Qt
Hit enter to use /opt/ltx/Qt or enter an alternate directory:
Continue installation using /opt/ltx/Qt? ([Y]/N): Y
Installing QT ...
QT install complete
Preparing...                ########################################### [100%]
package LTXC3pdi_installer-1.2-1.x86_64 (which is newer than LTXC3pdi_installer-1.1-1.x86_64) is already installed
The default location for U5.2.2.1 is /opt/ltx/releases
Use the default location?
1. Yes
2. No
USE DEFAULT LOCATION [1]: Y
Use the default location?
1. Yes
2. No
USE DEFAULT LOCATION [1]: 1
Installing LTXevx .....
Preparing...                ########################################### [100%]
   1:LTXevx-U5.2.2.1        ########################################### [100%]
Updating doc indexes for add-ons

Make this the default tester release?

1.   Yes
2.   No

SELECT DEFAULT RELEASE [1]: 1

The links in /opt/ltx/bin contain release independent
executables (i.e. launcher) and should always point to
the latest (highest numbered) installed release.
Currently these files are linked to nothing.
Should these links be changed to point to this release?

Make this the default tester release
for /opt/ltx/bin links?

1.   Yes
2.   No
DEFAULT RELEASE FOR BIN LINKS [1]: 1
Adding support for rsh to /etc/pam.d/rsh
Adding support for rlogin to /etc/pam.d/rlogin
Setting U5.2.2.1 as the default release
Setting U5.2.2.1 as the default release for bin objects

This release supports permission controls that
can restrict one user from stopping another user's
tester processes.

Refer to the documentation for instructions on
setting up permission controls with the
/opt/ltx/site/RestartTester.Users file.

Installing common files ..... passed
Preparing...                ########################################### [100%]
   1:LTXCglobalrules        ########################################### [100%]
Created /etc/udev/rules.d/98-LTXCglobal.rules
Preparing...                ########################################### [100%]
package LTXCpython-2.6.4-1.i686 is already installed

The default location for LTXCfmitool-43.0-1.i686 is /opt/ltx
Press Enter to use /opt/ltx or input an alternate directory:
Continue installation using /opt/ltx? ([Y]/N): Y
Installing LTXCfmitool-43.0-1.i686.rpm
package LTXCfmitool-44.0-1.i686 (which is newer than LTXCfmitool-43.0-1.i686) is already installed
Error installing LTXCfmitool-43.0-1.i686.rpm
/opt/ltx/releases/U5.2.2.1/x86_64_linux_2.6.32/bin/fmiTool: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

To complete the installation, set the LM_LICENSE_FILE variable, then run:

/opt/ltx/releases/U5.2.2.1/x86_64_linux_2.6.32/bin/fmiTool -c U5.2.2.1
Preparing...                ########################################### [100%]
   1:hedgehog-U5.2.2-Rev1   ########################################### [100%]
Updating doc indexes for add-ons
Preparing...                ########################################### [100%]
   1:pixel-U5.2.2-Rev1      ########################################### [100%]
Updating doc indexes for add-ons
Install Acrobat for access to help documentation? ([Y]/N): N
Install of Unison and related packages complete.
You have new mail in /var/spool/mail/localuser

Sunday, January 21, 2018

GEM FAQ's


How to enable GEM in Unison/CentOS
  • SECS/Gem is initially disabled in Unison. To enable SECS/Gem in Unison, you will need to run the config_gem command from xterm. This command is found in the /ltx/com directory. 
  • config_gem <tester_name> [-enable|-disable] [-verbose] [-reset]
  • The execution of config_gem tool will create the gem_config file for CGem in the tester pwrup directory
    • /ltx/testers/<tester_name>/pwrup/gem_config

SECS-GEM on CentOS 7.2, U1709

  • make sure to yum install the latest version. the first U1709 version release has issue on GEM component and may require update so...


Wednesday, November 22, 2017

How To Compile EVXA (cxx_examples) Code In Any Terminal In Unison

Copy the LD_LIBRARY_PATH env parameter on Unison's xterm (Optool>Tools>Xterm) and add it as first line in makefile. Below is example

LD_LIBRARY_PATH=/lib:/usr/lib:/usr/X11R6/lib:/usr/local/lib:/opt/ltx/releases/U4.2.B4/x86_64_linux_2.6.32/customer/lib:/opt/ltx/releases/U4.2.B4/x86_64_linux_2.6.32/customer/lib:/opt/ltx/releases/U4.2.B4/x86_64_linux_2.6.32/lib/VX6/FX1:/opt/ltx/releases/U4.2.B4/x86_64_linux_2.6.32/lib/VX6

CC=/usr/bin/g++

CFLAGS=-m32 -fpermissive -g -Wall -Wno-return-type -Wno-unknown-pragmas -DLINUX_TARGET
LFLAGS=-m32 -lcrypt -lnsl -lm -lrt

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()











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, February 22, 2015

    How to Setup VNC server on Diamond 10 Tester


    This applies only to diamond 10 testers on linux/unison software
    1. login to tester computer
    2. go to user home directory >lcd
    3. cd to .vnc >~/.vnc
    4. open ./xstartup using a text editor or vi
    5. in the ./xtartup file
      • comment out #twm &
    6. add a new line
      • add this on new line >exec startkde
    7. save the file and exit
    8. run command to start vnc server
      • on lc-rf12 lab tester
        • >vncserver -geometry <w>x<h>:z
        • w - preferred pixel width of the screen
        • h - preferred pixel height of the screen
        • x - display port
        • when you connect from remote computer, you will be prompted to enter password. use the login password of the account the tester has logged into
      • on other testers
        • >vncserver -display <w>x<h>:z 
        • w - preferred pixel width of the screen
        • h - preferred pixel height of the screen
        • x - display port
    9. login to your remote computer and run any vncviewer software. 
    10. connect to the right IP address referring to tester computer you wish to vnc into, make sure to reference to the appropriate display port. when asked to enter password, try using the password of the account the tester has been logged into when vncserver run