Metadata-Version: 2.1
Name: semi-ate-master-app
Version: 1.0.8
Summary: Master application used for steering the control applications in an ATE test environment.
Author: The Semi-ATE Project Contributors
Author-email: ate.organization@gmail.com
License: GPL-2.0-only
Keywords: Semiconductor ATE Automatic Test Equipment Spyder Plugin
Platform: Windows
Platform: Linux
Platform: Mac OS-X
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
Classifier: Topic :: Scientific/Engineering :: Human Machine Interfaces
Classifier: Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Description-Content-Type: text/markdown

# Semi-ATE

**Semi**conductor **A**utomated **T**est **E**quipment

[![GitHub](https://img.shields.io/github/license/Semi-ATE/Semi-ATE?color=black)](https://github.com/Semi-ATE/Semi-ATE/blob/master/LICENSE.txt)
[![Conda](https://img.shields.io/conda/pn/conda-forge/starz?color=black)](https://www.lifewire.com/what-is-noarch-package-2193808)
[![Supported Python versions](https://img.shields.io/badge/python-%3E%3D3.8-black)](https://www.python.org/downloads/)
[![CI-CD](https://github.com/Semi-ATE/Semi-ATE/workflows/CI-CD/badge.svg)](https://github.com/Semi-ATE/Semi-ATE/actions/workflows/CICD.yml?query=workflow%3ACD)

[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/Semi-ATE/Semi-ATE?color=blue&label=GitHub&sort=semver)](https://github.com/Semi-ATE/Semi-ATE/releases/latest)
[![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/Semi-ATE/Semi-ATE/latest)](https://github.com/Semi-ATE/Semi-ATE)
[![GitHub issues](https://img.shields.io/github/issues/Semi-ATE/Semi-ATE)](https://github.com/Semi-ATE/Semi-ATE/issues)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/Semi-ATE/Semi-ATE)](https://github.com/Semi-ATE/Semi-ATE/pulls)

`Semi-ATE` is a tester- and instruments **AGNOSTIC** framework for **Semi**conductor **ATE** ASIC testing projects.

This means that the system is **not** build around a specific instrument (let's consider an ATE tester for a moment as a super instrument), it rather focuses on
organizing semiconductor testing in such a way that **all** use- (and special) corner cases have their well known place. This enables the users (read: DE's, TCE's, TE's & PE's) to focus on the **REAL** work, being the writing of good, fast and stable tests. Organizing tests into test-programs and test-programs in to flows is handled by wizards, so the only code that needs writing is the actual test! (motto: [Code is our enemy](http://www.skrenta.com/2007/05/code_is_our_enemy.html))

The `Semi-ATE` package is written purely in Python (noarch) and provides besides libraries also a plugin to the [Spyder](https://www.spyder-ide.org/) IDE.

## Packages

The Semi-ATE project is maintained in this single repository, however it is released as a set of packages (all with the same version number) to accomodate the different use-cases.

| Package Name              | PyPI Version | conda Version | feedstock |
|:------------------------- |:----:|:-----------:|:---------:|
| [Semi-ATE-common](https://github.com/conda-forge/staged-recipes/pull/18605) | [![PyPI](https://img.shields.io/pypi/v/Semi-ATE-Common?color=blue&label=PyPI)](https://pypi.org/project/Semi-ATE/) | [![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/Semi-ATE-Common?color=blue&label=conda-forge)](https://anaconda.org/conda-forge/semi-ate-common) | [![conda-forge feedstock](https://img.shields.io/github/issues-pr/conda-forge/Semi-ATE-Common-feedstock?label=feedstock)](https://github.com/conda-forge/Semi-ATE-Common-feedstock) | 
| [Semi-ATE-project-database](https://github.com/conda-forge/staged-recipes/pull/18801) |[![PyPI](https://img.shields.io/pypi/v/Semi-ATE-project-database?color=blue&label=PyPI)](https://pypi.org/project/Semi-ATE-project-database/) | [![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/Semi-ATE-project-database?color=blue&label=conda-forge)](https://anaconda.org/conda-forge/semi-ate-project-database) | [![conda-forge feedstock](https://img.shields.io/github/issues-pr/conda-forge/Semi-ATE-project-database-feedstock?label=feedstock)](https://github.com/conda-forge/Semi-ATE-project-database-feedstock) |
| [Semi-ATE-sammy](https://github.com/conda-forge/staged-recipes/pull/18814) | [![PyPI](https://img.shields.io/pypi/v/Semi-ATE-sammy?color=blue&label=PyPI)](https://pypi.org/project/Semi-ATE-sammy/) | [![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/Semi-ATE-sammy?color=blue&label=conda-forge)](https://anaconda.org/conda-forge/semi-ate-sammy) | [![conda-forge feedstock](https://img.shields.io/github/issues-pr/conda-forge/Semi-ATE-sammy-feedstock?label=feedstock)](https://github.com/conda-forge/Semi-ATE-sammy-feedstock) |
| [Semi-ATE-plugins](https://github.com/conda-forge/staged-recipes/pull/18815) | [![PyPI](https://img.shields.io/pypi/v/Semi-ATE-plugins?color=blue&label=PyPI)](https://pypi.org/project/Semi-ATE-plugins/) | [![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/Semi-ATE-plugins?color=blue&label=conda-forge)](https://anaconda.org/conda-forge/semi-ate-plugins) | [![conda-forge feedstock](https://img.shields.io/github/issues-pr/conda-forge/Semi-ATE-plugins?label=feedstock)](https://github.com/conda-forge/Semi-ATE-project-plugins-feedstock) |
| Semi-ATE-testers          | [![PyPI](https://img.shields.io/pypi/v/Semi-ATE-testers?color=blue&label=PyPI)](https://pypi.org/project/Semi-ATE-testers/) | [![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/Semi-ATE-testers?color=blue&label=conda-forge)](https://anaconda.org/conda-forge/semi-ate-testers) | [![conda-forge feedstock](https://img.shields.io/github/issues-pr/conda-forge/Semi-ATE-testers?label=feedstock)](https://github.com/conda-forge/Semi-ATE-testers-feedstock) |
| Semi-ATE-spyder           | [![PyPI](https://img.shields.io/pypi/v/Semi-ATE-spyder?color=blue&label=PyPI)](https://pypi.org/project/Semi-ATE-spyder/) | [![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/Semi-ATE-spyder?color=blue&label=conda-forge)](https://anaconda.org/conda-forge/semi-ate-spyder) | [![conda-forge feedstock](https://img.shields.io/github/issues-pr/conda-forge/Semi-ATE-spyder?label=feedstock)](https://github.com/conda-forge/Semi-ATE-spyder-feedstock) |
| [Semi-ATE-apps-common](https://github.com/conda-forge/staged-recipes/pull/18816) | [![PyPI](https://img.shields.io/pypi/v/Semi-ATE-apps-common?color=blue&label=PyPI)](https://pypi.org/project/Semi-ATE-apps-common/) | [![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/Semi-ATE-apps-common?color=blue&label=conda-forge)](https://anaconda.org/conda-forge/semi-ate-apps-common) | [![conda-forge feedstock](https://img.shields.io/github/issues-pr/conda-forge/Semi-ATE-apps-common?label=feedstock)](https://github.com/conda-forge/Semi-ATE-apps-common-feedstock) |
| Semi-ATE-control-app      | [![PyPI](https://img.shields.io/pypi/v/Semi-ATE-control-app?color=blue&label=PyPI)](https://pypi.org/project/Semi-ATE-control-app/) | [![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/Semi-ATE-control-app?color=blue&label=conda-forge)](https://anaconda.org/conda-forge/semi-ate-control-app) | [![conda-forge feedstock](https://img.shields.io/github/issues-pr/conda-forge/Semi-ATE-control-app?label=feedstock)](https://github.com/conda-forge/Semi-ATE-control-app-feedstock) |
| Semi-ATE-master-app       | [![PyPI](https://img.shields.io/pypi/v/Semi-ATE-master-app?color=blue&label=PyPI)](https://pypi.org/project/Semi-ATE-master-app/) | [![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/Semi-ATE-master-app?color=blue&label=conda-forge)](https://anaconda.org/conda-forge/semi-ate-master-app) | [![conda-forge feedstock](https://img.shields.io/github/issues-pr/conda-forge/Semi-ATE-master-app?label=feedstock)](https://github.com/conda-forge/Semi-ATE-master-app-feedstock) |
| Semi-ATE-test-app         | [![PyPI](https://img.shields.io/pypi/v/Semi-ATE-test-app?color=blue&label=PyPI)](https://pypi.org/project/Semi-ATE-test-app/) | [![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/Semi-ATE-test-app?color=blue&label=conda-forge)](https://anaconda.org/conda-forge/semi-ate-test-app) | [![conda-forge feedstock](https://img.shields.io/github/issues-pr/conda-forge/Semi-ATE-test-app?label=feedstock)](https://github.com/conda-forge/Semi-ATE-test-app-feedstock) |

## Installation

Installation of the packages can be achieved via `conda` or [pip](https://packaging.python.org/en/latest/tutorials/installing-packages/#use-pip-for-installing).

### Installation using pip

Each package can be installed using `python -m pip install <package-name>`:

```Console
python -m pip install semi-ate-common
python -m pip install semi-ate-project-database
python -m pip install semi-ate-sammy
python -m pip install semi-ate-plugins
python -m pip install semi-ate-testers
python -m pip install semi-ate-spyder
python -m pip install semi-ate-apps-common
python -m pip install semi-ate-control-app
python -m pip install semi-ate-master-app
python -m pip install semi-ate-test-app
```

Or all at once:

```Console
python -m pip install semi-ate-common semi-ate-project-database semi-ate-sammy semi-ate-plugins semi-ate-testers semi-ate-spyder semi-ate-apps-common semi-ate-control-app semi-ate-master-app semi-ate-test-app
```

### Installation via Conda

To be defined
## The semi-ate-master-app package

This package provides a command line tool (`launch_master`). In order to use this application you have to configure it first. This tool should be run on host that either runs the control application from the `semi-ate-control-app` package or that is connected via ethernet to further hosts running the control application.
The master application controls the so-called control applications, i.e. test nodes. To do so the master sends commands to the different test nodes using MQTT messages. Among others these commands
include commands for loading and unloading test programs and starting the test execution.

The muster application can be controlled using a web interface or it is controlled by some handler application.

### Configuration

Configuration of the master application is done by writing a JSON file called **master_config_file.json**. The following key-value-pairs have to be defined:

```JSON
{
    "broker_host": "127.0.0.1",
    "broker_port": 1883,
    "device_id": "SCT-82-1F",
    "sites": [
        "0"
    ],
    "Handler": "HTO92-20F",
    "environment": "F1",
    "webui_host": "127.0.0.1",
    "webui_port": "8081",
    "jobsource": "filesystem",
    "jobformat": "xml.semi-ate",
    "skip_jobdata_verification": false,
    "filesystemdatasource.path": ".",
    "filesystemdatasource.jobpattern": "le#jobname#.xml",
    "enable_timeouts": true,
    "user_settings_filepath": "master_user_settings.json",
    "site_layout": { "0": [0, 0]},
    "tester_type": "Semi-ATE Master Single Tester",
    "loglevel": 10,
    "web_root_folder": "./"
}
```

* `broker_host` defines the ip address of the mqtt broker.
* `broker_port` defines the prot of the mqtt broker.
* `site_layout` defines the site layout of the different test sites.
* `device_id` defines the name of the test site
* `sites` defines an array containing the test node ids running the control application
* `Handler` defines the name of some device handler or wafer handler, i.e. prober
* `environment` defines the test environment (F1, F2, F3, P1, P2, P3)
* `webui_host` defines the ip of the web interface for controlling he master application manually
* `webui_port` defines the port number of the web interface
* `webui_root_path` defines the URI of the web-resources, i.e. the folder containing the index.html of some web application.
* `jobsource` defines the location where to find test job definitions
* `jobformat` defines the format of the job definitions
* `skip_jobdata_verification` defines whether the job definition has to be verified
* `filesystemdatasource.path` defines the path where to find job definitions
* `filesystemdatasource.jobpattern` defines the pattern for the name of the test job file. This is done by replacing _#jobname#_ by the job id, i.e. the lot id.
* `enable_timeouts` defines whether or not timeouts are enabled. If enabled the system will produce some error message if certain things like becomming ready, loading or undloading a test program etc. take to much time.
* `user_settings_filepath` defines where the user specific settings are stored. These settings are set via the web interface.
* `site_layout` defines for each site the layout. The layout is the start coordinate of some site
* `tester_type` defines the type of he tester. This provided by the tester plugin.
* `loglevel` defines the log-level of the control application

### Starting the Master Application

We assume that the semi-ate-master-app package has been installed in the current python environment. Further the configuration file **master_config_file.json** is located in the current folder.

**IMPORTANT**: The configuration file has to be named **master_config_file.json**

```Console
(environment)> launch_master
======== Running on http://127.0.0.1:8081 ========
(Press CTRL+C to quit)
master   |22/03/2022 04:45:37 PM |INFO    |mqtt connected
master   |22/03/2022 04:45:37 PM |INFO    |Master state is connecting
```


