Welcome to PyICe’s documentation!

Introduction

Through planning and automation, PyICe catapults verification productivity when evaluating integrated circuits or other complex systems with laboratory test equipment. Specifically, it contains a tool suite that abstracts all items of interest on a lab bench, including a target integrated circuit, into a single flat namespace. Once all bench items have been identified, and their read and write methods have been declared, interacting with these items becomes much more intuitive and productivity is advanced tremendously. Combined with a clear evaluation plan and a centralized version control system, PyICe greatly fosters the collaboration of multi-person teams.

Some of the services offered by PyICe are:

  • Flexible, human meaningful, object names for clear code intent

  • A simple scripting library for reading and writing to bench objects

  • Automatic parsing and re-assembly of bit-packed registers (i.e. bit-fields)

  • A Matplotlib wrapper for making consistent, publishable graphs in .svg or .pdf

  • A Code Free GUI for quick debug, experimentation and demonstration

  • A substantial library of equipment drivers for abstracting laboratory instruments

  • A SQLite datalogger object for storing, retrieving and filtering large volumes of data

  • No more Excel sheet, column manipulation .csv files, schema-less file formats…

  • A fast binary protocol for interacting with peripherals such as demonstration boards

  • Tools for registering, testing and reporting against product specifications

  • Tools for comparing production test data against laboratory bench results

  • Automated results notifications by text and email for long runs such as temperature sweeps

  • Powerful problem-solving tools for instrument manipulation such as binary search algorithms, slow rampers, fixed time delays, etc

  • Other tools for data analysis such as waveform analyzers, data filters, data scalers, interpolators, various device models, etc

  • A method of declaring, logging, and documenting the physical configuration of the lab bench (electronically and pictorially)

  • Automated bench evaluation report generation (coming soon)

The Channel Concept

PyICe introduces the notion of a channel. A channel is a Python object, typically addressed by a user-chosen character string, that accesses any bench function with which the user wishes to interact. A channel can belong to an integrated circuit such a serial port register or can represent a fragment of a register such as one bit-field of a bit-packed register. A channel can also represent a control signal to an integrated circuit such as an ENABLE input pin from a micro-controller or a PGOOD output pin from the IC. A channel can represent any facet of a lab instrument that is electronically accessible such as a power supply’s voltage or current limit or a signal generator’s frequency or amplitude. Each channel is given a user specific name at creation time, thereby making the latter interaction with the system much more human readable. The totality of all identified channels is aggregated by PyICe into a single Python object called a channel master.

Once all channels of interest have been identified by the user, and a path has been established for accessing each channel, the user may begin the important work of interacting with the integrated circuit or target system and lab bench system without the burden of parsing, converting or keeping track of the individual idiosyncrasies of each item on the bench. In fact, Python itself was initially designed by Guido van Rossum in 1991 and developed by Python Software Foundation mainly for emphasis on code readability. Its syntax allows programmers to express concepts in fewer lines of code.

Because the object abstraction layer of PyICe is as high as it can be, it is possible to re-map the objects to a system in the virtual world (AKA simulation) just as easily as the physical world. In concept, it is possible to reuse code written to be simulated pre-silicon on real silicon and bench instruments.

Getting Started

To get started using PyICe, there is a recommended folder structure shown below. PyICe has a project creator wizard to help with this. The wizard will conduct a simple interview and generate the directory structure needed to support the requested PyICe plugins. To get started, run ProjectCreatorWizard.py from the main PyICe directory.

An example of the recommended directory structure is shown below:

projname
├── eval_plan (highly recommended)
│ └ evalplan.xls
├── traceability_info
│ ├ board_serialization
│ │ ├ target_board_1.jsonc
│ │ ├ target_board_2.jsonc
│ │ ├ aux_board_1.jsonc
│ │ └ aux_board_1.jsonc
│ └ component_purpose
│ ├ targetboard_component_purpose.jsonc
│ └ auxboard_component_purpose.jsonc
├── quickstart_gui
│ └ EZ_projname_GUI.py
├── tests
│ ├ ipmodule_1
│ │ └ ip_1_test1
│ │ ├ ip_1_test1.py
│ │ ├ ip_1_test1_results
│ │ └ data …
│ └ ipmodule_2
│ └ ip_2_test1
│ ├ ip_2_test1.py
│ └ ip_2_test1_results
│ └ data …
├── projname_base
│ ├ benches
│ │ ├ member1_bench.py
│ │ ├ member2_bench.py
│ │ └ …
│ ├ hardware_drivers
│ │ ├ mini_driver1.py
│ │ ├ mini_driver2.py
│ │ └ …
│ └ modules
│ ├ bench_base.py
│ ├ test_module.py
│ └ projname_plugins
│ ├ pyice_plugin1.py
│ ├ pyice_plugin2.py
│ └ …

The evaluation project work product (scripts and resultant data) as well as infrastructure live under a single folder projname. By using centralize data management and version control, this folder structure will be the same on all team member’s computers. PyICe should not be in this folder.

The eval_plan folder is highly recommended. There may be better plan tracking options, but in lieu of a more centralized system, it is strongly recommended to capture the intent and scope of the verification goals somewhere.

The traceability_info folder can be used to track any static traceability information. Typically it is envisioned that this will include PC board information such as serial numbers, board configuration jumper settings, component values, etc. These files can be as detailed or sparse as needed to capture the relevant information about how the measurement was configured at the time data was taken. The state of these files will be captured and logged with each test run. The supported file format is .json which is both human and machine readable. There can be files to track other system states, PyICe is agnostic to the data stored in these files.

PyICe also has the capability to log other, more dynamic, tracking data by supplying a dictionary like data structure. One example is the serial number of the target device which may not be known until the system and device are powered up. The same would be true of test equipment serial numbers which can only be read out when the equipment is powered (Although PyICe is already configured to log this automatically).

The quickstart_gui folder contains a low-overhead script to get the bench equipment configured and the target device powered up. While not a recommended way to perform a detailed evaluation, the Code-free GUI can be invaluable for experimenting with the system or target device or debugging/demonstrating some simple feature or capability. Once debugging and experimenting is complete, serious data collection should be captured by collection scripts in the tests section.

The tests folder is recommended for storing the scripts that perform the detailed test sweeps. It is also a suitable location for collecting and archiving the results of each run of each test in an organized manner.

By scripting each test individually, the system configuration and what was done to the d.u.t. to collect the data becomes a matter of record. One of the desirable features of Python is its readability. Therefore Python scripts make an excellent record of the test procedure undertaken. This can be invaluable after the data collection is complete and is being reviewed with peers for accuracy and validity.

The projname_base folder contains project specific infrastructure code that is needed by all project members. (DO WE REALLY NEED THIS FOLDER LAYER?)

The benches section represents an abstraction layer containing the minimum information necessary for PyICe to physically locate all of the equipment and resources on the bench. PyICe was originally developed to be used with an ad-hoc collection of general-purpose benchtop test equipment vs a single unified test equipment platform (although that is not precluded). Since no two benches will have their equipment located on the same addresses, say COM ports, USB IDs or GPIB channels, each team member will have their own bench file for storing this information. The benches area of the workspace should comprise the totality of unique project code per team member.

The hardware_drivers section is a place where project leaders can make project-specific customizations and assign project-specific channel names to instruments and their respective channels. By creating a mini_driver for each instrument and its channels, the entire team will have a single common namespace. This will greatly facilitate test review, reuse and sharing.

PyICe contains a sizeable collection of test bench equipment drivers. If a new piece of equipment is needed, and there is no driver for it, there is usually a similar driver that can serve as an example for developing the new driver. Driver development generally takes from 1 to 8 hours per instrument depending on complexity.

The modules section contains project-specific infrastructure files that PyICe needs to facilitate high level goals such as environmental testing (e.g. temperature forcing on the outer loop of test suites), test results gathering and reporting, automated production to bench correlation, automated report generation, etc.

Indices and tables