Repository navigation
4.0 Software Overview
The Code directory is structured as below. Directories or files marked with ** indicate that they are created after running the setup script (see section 2.2.2) and are not tracked by Git.
Code
├── __VendorAPIs
├── env **
├── ExampleScripts
├── GitTestingRepos **
├── ResultBackups **
├── UserScripts **
├── Utilities
│ ├── PicoControl
│ ├── NO_EDIT_Config_Template.py
│ ├── report_generation.py
│ └── scum_program.py
├── Validation
│ ├── C-Source
│ ├── Tests
│ ├── config.py **
│ ├── nightly_validation.py
│ └── scum_validation.py
├── requirements.txt
└── setup_env.bat
Contains third-party vendor libraries/APIs that are used within the project.
This is the directory for the Python virtual environment.
Contains stand alone script that test were used during development to verify functionality of the test devices. Left in the repoposity in case a user once to validate a device on its own.
Intended for holding Git repositories used by the nightly validation test.
Where results and reports are stored.
A place for user-defined scripts or custom extensions.
Contains reusable utilities and support modules.
Code for interfacing with the Pico board on the the PCB.
A template config file that is copied by the setup script. Not to be edited by the user.
Holds methods for formatting and creation of test reports, as well as emailing said reports (see section 5.0).
Holds method for loading SCuM with binaries.
Contains the two the proof of concept validation scripts and their tests.
Includes the C source and binary loaded on SCuM for the verification test.
Contains all the tests used by the two validation scripts (see section 5.0).
User editable configuration file specifying test parameters, paths, or runtime options.
(see section 5.0).
(see section 5.0).
Lists Python dependencies required for the project. Used by setup script.
Batch script for setting up the development environment (see section 2.2.2).
Our tests are structured in the following way
Unit Test
├── Test 1
│ ├── Sub Test 1A
│ └── Sub Test 1B
├── Test 2
│ ├── Sub Test 2A
│ ├── Sub Test 2B
│ └── Sub Test 2C
└── Test 3
├── Sub Test 3A
├── Sub Test 3B
└── Sub Test 3C
Refer to section 4.3 for how each section handles results.
Each unit test is an independent, self-contained test. For instance, the SCuM Validation script qualifies as one unit test since its sole purpose is to validate SCuM. Similarly, Nightly Validation is designed to run tests on multiple binaries; each binary is treated as a separate unit test since its results are independent of the others.
Within each unit test, there can be multiple main tests that tests a specific categories. An example is the Analog test, as it is responsible for testing all analog related systems.
Each main test includes multiple sub-tests that are related to its parent test.
The results from preformed tests are organized into a JSON structure. The full structure can be seen below.
# Main Structure
{
'unit_test': {
'tests': {
'test_name': { 'results': [] },
'test_name2': { 'results': [] },
}
},
# Add more unit tests as needed
}
#results list is formatted as:
[
{ 'sub-test': 'pin 1', 'pass': False, 'values': [] },
{ 'sub-test': 'pin 2', 'pass': False, 'values': [] },
# Add more sub tests as needed
]
#value list is formatted as:
[
{'name': 'value_name1', 'value': 0},
{'name': 'value_name2', 'value': 1},
# Add more values as needed
]Here is a filled out structure
{
'Chip Verification': {
'tests': {
'Analog Test': {
'results': [
{
'sub-test': 'Master Clock',
'pass': True,
'values': [
{'name': 'Plot', 'value': [0, 1, 2, 3, 4] },
{'name': 'Value (Hz)', 'value': 50001.2},
]
},
{
'sub-test': 'LF Clock',
'pass': True,
'values': [
{'name': 'Plot', 'value': [ [1,50], [2,51.23], [3,52.1] ] },
{'name': 'axis_labels', 'value': { 'x-label': 'time (s)', 'y-label': 'Freq (Hz)' }
{'name': 'Avg Freq (Hz)', 'value': 51.2},
]
},
{
'sub-test': 'Reference Voltage',
'pass': False,
'values': [
{'name': 'Voltage', 'value': 3},
]
}
]
},
'Digital Test': {
'results': [
{
'sub-test': 'Pin 1',
'pass': True,
'values': []
},
{
'sub-test': 'Pin 2',
'pass': True,
'values': []
},
]
}
}
}As can be seen, the structure follows the tiered approach mentioned in 4.2
This is the top-level user defined key that contains all results related to a particular unit test instance. There may be multiple unit test objects collected across different runs.
An object containing each named test (e.g., 'Analog', 'Digital', 'RF'). Each test contains its own results list, independently grouped under its test name.
A list of sub-test results. Each entry in the list corresponds to a single sub-test execution instance. These are executed as part of the main test and contain their own evaluation state.
Each entry in the list should be a dictionary containing three key value pairs like so
{ 'sub-test': 'pin 1', 'pass': False, 'values': [] }
| Key | Value |
|---|---|
| 'sub-tests' | Name of the sub tests these values belong to |
| 'pass' | Boolean True/False of whether sub test passed |
| 'values' | List of objects that contain the values associated with the sub test (see section 4.3.1.4) |
Note: 'values' can be an empty list if there are no values to return
A list of dictionaries, where each dictionary represents a measurement, computed value, or plot from the sub-test.
Each entry in the list should be a dictionary containing two key value pairs like so
{'name': 'value_name1', 'value': 0}
| Key | Value |
|---|---|
| 'name' | Name of the value |
| 'value' | Can be int, float, list or string |
There are three ways to return values for a plot, or a plot itself.
Option #1:
Path to a generated image. Supports .png, .jpg, .jpeg, & .gif
[
{ 'name': 'value_name', 'value': "path/to/graph.png" }, # value_name can be whatever
]Option #2: List of y values
Note: axis labels are not possible here and the x value is just the index value
[
{ 'name': 'value_name', 'value': [1.2, 2.3, 3.4] }, # value_name can be whatever
]Option #3: List of x,y pairs combined with axis labels
Note: if you plan to send multiple graphs like this, the data and label objects need to be placed one after the other in the order shown
[
{ 'name': 'value_name', 'value': [ [1,3], [1,2] ] }, # format [x,y] | value_name can be whatever
{ 'name': 'axis_labels', 'value': { 'x-label': 'x axis name', 'y-label': 'y axis name' } } # 'name' needs to be "axis_labels" here
]Each sub-test can support multiple graphs. However, for [x, y] pair plots, the plot data must be immediately followed by a corresponding axis label object.
The format should follow this repeating pattern:
{graph data 1}, {axis labels 1}, {graph data 2}, {axis labels 2}, ...
In other words, graph data must always come before its axis labels, and the two must remain paired in that order.
A HTML report can be generated from the results using the generate_html_report() function provided in report_generation.py
Details about its arguments and usage can be found in the source file.