Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMCT Python Software | ||||||||
Line: 113 to 113 | ||||||||
Testing AMC13 Cards Using Interactive Mode | ||||||||
Changed: | ||||||||
< < | In this method you will run the code inside python (better you install python 2.7 and use ipython), you will exacute all the commands from AMC13Tool2 and use them | |||||||
> > | In this method you will run the code inside python (better you install python 2.7 and use ipython), you will exacute all the commands from AMC13Tool2 and use them. | |||||||
If you use ipyhon do:
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMCT Python Software | ||||||||
Line: 14 to 14 | ||||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMCT Python Software | ||||||||
Changed: | ||||||||
< < | General Explanations | |||||||
> > | AMCT Purpose | |||||||
Changed: | ||||||||
< < | AMCT(AMCThirteen): The goal is to develop a set of routines to automatically (i.e. without human intervention) test AMC13 hardware using python language. Tests will exercise the functionality of the AMC13 card(s) and report errors/failures. | |||||||
> > | The goal is to develop a set of routines to automatically (i.e. without human intervention) test AMC13 hardware using python language. Tests will exercise the functionality of the AMC13 card(s) and report errors/failures. | |||||||
The tool allows for a detailed testing of the AMC hardware in both supervised and non-supervised fashion and it is meant to be used as a part of the production and quality testing of the AMC13 hardware. | ||||||||
Added: | ||||||||
> > | Installation | |||||||
For python tool, typically you need to use `virtualenv` to create a separate python environment and install all dependencies. It creates a folder which contains all the necessary executables to use the packages that a Python project would need. Before starting, make sure you have 'pip' and 'virtualenv'. Use your favorite package manager to install them. | ||||||||
Deleted: | ||||||||
< < | Installation | |||||||
Virtualenv Installation | ||||||||
Line: 29 to 29 | ||||||||
| ||||||||
Changed: | ||||||||
< < | Python 2.7.12 Installation to Virtualenv | |||||||
> > | Python 2.7.12 Installation | |||||||
Changed: | ||||||||
< < | Inside the virtualenv you can also install python 2.7.12 version (it is better than 2.6.X version) and ipython (python 2.6 version does not support ipython). Here is the installation of python-2.7.12 version. | |||||||
> > | If you dont have python 2.7.12 version (it is better than 2.6.X version) you can install it as following: | |||||||
| ||||||||
Line: 42 to 42 | ||||||||
| ||||||||
Deleted: | ||||||||
< < |
| |||||||
Changed: | ||||||||
< < | Now you have python 2.7.12 and ipython in virtualenv. | |||||||
> > | Now you have python 2.7.12. If you also want to install ipython:
| |||||||
Running the AMCT ToolBefore running the AMCT tool you can look at the help options: |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMCT Python SoftwareGeneral Explanations | ||||||||
Changed: | ||||||||
< < | The goal is to develop a set of routines to automatically (i.e. without human intervention) test AMC13 hardware using python language. Tests will exercise the functionality of the AMC13 card(s) and report errors/failures. | |||||||
> > | AMCT(AMCThirteen): The goal is to develop a set of routines to automatically (i.e. without human intervention) test AMC13 hardware using python language. Tests will exercise the functionality of the AMC13 card(s) and report errors/failures. | |||||||
The tool allows for a detailed testing of the AMC hardware in both supervised and non-supervised fashion and it is meant to be used as a part of the production and quality testing of the AMC13 hardware. For python tool, typically you need to use `virtualenv` to create a separate python environment and install all dependencies. It creates a folder which contains all the necessary executables to use the packages that a Python project would need. Before starting, make sure you have 'pip' and 'virtualenv'. Use your favorite package manager to install them. | ||||||||
Line: 14 to 14 | ||||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
| ||||||||
Deleted: | ||||||||
< < |
| |||||||
| ||||||||
Line: 29 to 29 | ||||||||
| ||||||||
Changed: | ||||||||
< < | Python 2.7 Installation to Virtualenv | |||||||
> > | Python 2.7.12 Installation to Virtualenv | |||||||
Changed: | ||||||||
< < | Inside the virtualenv you can also install python 2.7 version (it is better than 2.6) and use ipython (python 2.6 version does not support ipython). Here is the installation of python-2.7.12 version. | |||||||
> > | Inside the virtualenv you can also install python 2.7.12 version (it is better than 2.6.X version) and ipython (python 2.6 version does not support ipython). Here is the installation of python-2.7.12 version. | |||||||
| ||||||||
Line: 41 to 41 | ||||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
Running the AMCT Tool | ||||||||
Added: | ||||||||
> > | Before running the AMCT tool you can look at the help options:
> dev_tools]$ amct --help Usage: amct [OPTIONS] COMMAND [ARGS]... Options: -v, --verbose -d, --debug -l, --log-level [INFO|DEBUG|WARNING|ERROR|CRITICAL] -c, --config PATH Global configuration --version Show the version and exit. -h, --help Show this message and exit. Commands: amctool Utilities for testing AMC13 interactively. firmware Operations for testing AMC13 firmware. testsuite Run predefined test-suites against AMC13... | |||||||
AMCT tool executes all the AMC13Tool2 commands and run them using new scripting language, such as:
| ||||||||
Added: | ||||||||
> > | For example: | |||||||
>amc.do('en 1-12 f t') >amc.do('localL1A o 1') | ||||||||
Line: 58 to 78 | ||||||||
>amc.do('re') #etc... or | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
>amc.run('en 1-12 f t') >amc.run('localL1A o 1') | ||||||||
Line: 119 to 140 | ||||||||
>rdiff['STATUS.AMC01.COUNTERS.AMC13_AMC_EVENTS_LO'] : check diff of registers with/without trig. | ||||||||
Added: | ||||||||
> > | Testing AMC13 Cards Using Scripted Mode | |||||||
Added: | ||||||||
> > | In this method you can run your commands inside the script that you prepared and can test the AMC13 cards. I have prepared an example which will test the event and time counter registers. This script will check the expected and observed values of the register(s) and compare the expected value with observed value. If the expected/observed values are equal test result will be OK. Here is the example of the script: | |||||||
Added: | ||||||||
> > | test1.pyamc : script to check some registers. | |||||||
Added: | ||||||||
> > | Tests are organized into testsuite. You can execute them against every AMC13 board like so: | |||||||
Added: | ||||||||
> > |
| |||||||
Added: | ||||||||
> > | amct --verbose testsuite run --name c01 -i 161/c(SN =161 and c01: a folder that contain the test1.pyamc script) | |||||||
Added: | ||||||||
> > | --> If expected and observed values are the same then you will see below message:
INFO 13772 [08/17/2016 14:02:51]: Testsuite c01 finished OK | |||||||
Added: | ||||||||
> > | --> If expected and observed values are different then you will see the message of the problematic register and its expected and observed values!
STATUS.SFP.SFP0.EVENTS_BUILT error, expected: 6, observed: 5 | |||||||
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMCT Python Software | ||||||||
Line: 10 to 10 | ||||||||
For python tool, typically you need to use `virtualenv` to create a separate python environment and install all dependencies. It creates a folder which contains all the necessary executables to use the packages that a Python project would need. Before starting, make sure you have 'pip' and 'virtualenv'. Use your favorite package manager to install them.
Installation | ||||||||
Deleted: | ||||||||
< < | ||||||||
Virtualenv Installation | ||||||||
Added: | ||||||||
> > | ||||||||
| ||||||||
Line: 29 to 30 | ||||||||
Python 2.7 Installation to Virtualenv | ||||||||
Deleted: | ||||||||
< < | Inside the virtualenv you can also install python 2.7 version (it is better than 2.6) and use ipython (python 2.6 version does not support ipython). I have already put the Python-2.7.12.tgz file in the folder, you just need to run it as below: | |||||||
Added: | ||||||||
> > | Inside the virtualenv you can also install python 2.7 version (it is better than 2.6) and use ipython (python 2.6 version does not support ipython). Here is the installation of python-2.7.12 version.
| |||||||
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMCT Python Software | ||||||||
Line: 7 to 7 | ||||||||
The goal is to develop a set of routines to automatically (i.e. without human intervention) test AMC13 hardware using python language. Tests will exercise the functionality of the AMC13 card(s) and report errors/failures. The tool allows for a detailed testing of the AMC hardware in both supervised and non-supervised fashion and it is meant to be used as a part of the production and quality testing of the AMC13 hardware. | ||||||||
Changed: | ||||||||
< < | For python tool, typically you need to use `virtualenv` to create a separate python environment and install all dependencies. It creates a folder which contains all the necessary executables to use the packages that a Python project would need. Before starting, make sure you have `pip` and `virtualenv`. Use your favorite package manager to install them. | |||||||
> > | For python tool, typically you need to use `virtualenv` to create a separate python environment and install all dependencies. It creates a folder which contains all the necessary executables to use the packages that a Python project would need. Before starting, make sure you have 'pip' and 'virtualenv'. Use your favorite package manager to install them. | |||||||
Installation | ||||||||
Added: | ||||||||
> > | Virtualenv Installation | |||||||
| ||||||||
Line: 27 to 28 | ||||||||
| ||||||||
Added: | ||||||||
> > | Python 2.7 Installation to VirtualenvInside the virtualenv you can also install python 2.7 version (it is better than 2.6) and use ipython (python 2.6 version does not support ipython). I have already put the Python-2.7.12.tgz file in the folder, you just need to run it as below:
| |||||||
Running the AMCT ToolAMCT tool executes all the AMC13Tool2 commands and run them using new scripting language, such as: |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMCT Python Software | ||||||||
Line: 14 to 14 | ||||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMCT Python Software | ||||||||
Line: 11 to 11 | ||||||||
Installation | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Line: 68 to 68 | ||||||||
8: STATUS.TTC.SGL_BIT_ERRORS_LO (addr=00000040 mask=ffffffff) r | ||||||||
Changed: | ||||||||
< < | Code is working as Command-line tool as: | |||||||
> > | Code is working as Command-line tool for: | |||||||
| ||||||||
Changed: | ||||||||
< < | Testing AMC13 Cards in Interactive Mode | |||||||
> > | Testing AMC13 Cards Using Interactive Mode | |||||||
In this method you will run the code inside python (better you install python 2.7 and use ipython), you will exacute all the commands from AMC13Tool2 and use them If you use ipyhon do: |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMCT Python Software | ||||||||
Line: 68 to 68 | ||||||||
8: STATUS.TTC.SGL_BIT_ERRORS_LO (addr=00000040 mask=ffffffff) r | ||||||||
Changed: | ||||||||
< < | Code is working as Command-line tool for: | |||||||
> > | Code is working as Command-line tool as: | |||||||
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMCT Python Software | ||||||||
Line: 42 to 42 | ||||||||
or
| ||||||||
Changed: | ||||||||
< < | >amc.do('en 1-12 f t') >amc.do('localL1A o 1') >amc.do('lt 5') >amc.do('rv STATUS*') >amc.do('re') #etc... | |||||||
> > | >amc.run('en 1-12 f t') >amc.run('localL1A o 1') >amc.run('lt 5') >amc.run('rv STATUS*') >amc.run('re') #etc... | |||||||
Info : If you want to print the test result as a table just say: | ||||||||
Added: | ||||||||
> > | ||||||||
>print amc.do('any AMC13Tool2_command') | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
For example:
> print amc.do('nodes t1 *ttc*error*') |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
AMCT Python Software | ||||||||
Line: 31 to 32 | ||||||||
AMCT tool executes all the AMC13Tool2 commands and run them using new scripting language, such as:
| ||||||||
Changed: | ||||||||
< < |
amc.do('en 1-12 f t ') amc.do('localL1A o 1 ') amc.do('lt 5') amc.do('rv STATUS*') amc.do('re') #etc... | |||||||
> > | >amc.do('en 1-12 f t') >amc.do('localL1A o 1') >amc.do('lt 5') >amc.do('rv STATUS*') >amc.do('re') #etc... | |||||||
or
| ||||||||
Changed: | ||||||||
< < | amc.run('en 1-12 f t ') amc.run('localL1A o 1 ') amc.run('lt 5') amc.run('rv STATUS*') amc.run('re') #etc... | |||||||
> > | >amc.do('en 1-12 f t') >amc.do('localL1A o 1') >amc.do('lt 5') >amc.do('rv STATUS*') >amc.do('re') #etc... | |||||||
Info : If you want to print the test result as a table just say: | ||||||||
Added: | ||||||||
> > | >print amc.do('any AMC13Tool2_command') | |||||||
Changed: | ||||||||
< < | print amc.do('any AMC13Tool2_command') | |||||||
> > | For example:
> print amc.do('nodes t1 *ttc*error*') 9 nodes matched 0: STATUS.TTC.BCNT_ERROR (addr=00000000 mask=00000040) r 1: STATUS.TTC.BCNT_ERRORS_HI (addr=00000045 mask=0000ffff) r 2: STATUS.TTC.BCNT_ERRORS_LO (addr=00000044 mask=ffffffff) r 3: STATUS.TTC.MULT_BIT_ERROR (addr=00000000 mask=00000100) r 4: STATUS.TTC.MULT_BIT_ERRORS_HI (addr=00000043 mask=0000ffff) r 5: STATUS.TTC.MULT_BIT_ERRORS_LO (addr=00000042 mask=ffffffff) r 6: STATUS.TTC.SGL_BIT_ERROR (addr=00000000 mask=00000080) r 7: STATUS.TTC.SGL_BIT_ERRORS_HI (addr=00000041 mask=0000ffff) r 8: STATUS.TTC.SGL_BIT_ERRORS_LO (addr=00000040 mask=ffffffff) r | |||||||
Code is working as Command-line tool for:
| ||||||||
Line: 66 to 72 | ||||||||
Testing AMC13 Cards in Interactive Mode | ||||||||
Deleted: | ||||||||
< < | ||||||||
In this method you will run the code inside python (better you install python 2.7 and use ipython), you will exacute all the commands from AMC13Tool2 and use them If you use ipyhon do: | ||||||||
Changed: | ||||||||
< < | amctool ipython -i 322 ## SerialNumber=322 | |||||||
> > | >amct amctool ipython -i 322 ## SerialNumber=322 | |||||||
If you use pyhon do: | ||||||||
Changed: | ||||||||
< < | amctool python -i 322 | |||||||
> > | >amct amctool python -i 322 | |||||||
Then start to do test!!! Here is an example to check registers and looking at differences of registers with and without trigger using interactive mode. | ||||||||
Changed: | ||||||||
< < | r1 = amc.get_registers() # get registers r1['STATUS.AMC01.COUNTERS.AMC13_AMC_EVENTS_LO'] #check specific register amc.do('en 1-12 f t') # create fake events amc.do('localL1A o 1 1') #localL1A amc.do('lt 5') #send 5 triggers r2 = amc.get_registers() # get registers r2['STATUS.AMC01.COUNTERS.AMC13_AMC_EVENTS_LO'] #check specific register after send 5 trig. rdiff = amc.diff_registers(r1, r2) # define diff function to check the differences with/without trig. rdiff['STATUS.AMC01.COUNTERS.AMC13_AMC_EVENTS_LO'] #check diff of registers with/without trig. | |||||||
> > | >r1 = amc.get_registers() : get registers >r1['STATUS.AMC01.COUNTERS.AMC13_AMC_EVENTS_LO']check specific register >amc.do('en 1-12 f t') : create fake events >amc.do('localL1A o 1 1') : configure localL1A) >amc.do('lt 5') : send 5 triggers >r2 = amc.get_registers() : get registers >r2['STATUS.AMC01.COUNTERS.AMC13_AMC_EVENTS_LO'] : check specific register after send 5 trig. >rdiff = amc.diff_registers(r1, r2) : define diff function to check the differences with/without trig. >rdiff['STATUS.AMC01.COUNTERS.AMC13_AMC_EVENTS_LO'] : check diff of registers with/without trig. | |||||||
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Added: | ||||||||
> > | AMCT Python SoftwareGeneral ExplanationsThe goal is to develop a set of routines to automatically (i.e. without human intervention) test AMC13 hardware using python language. Tests will exercise the functionality of the AMC13 card(s) and report errors/failures. The tool allows for a detailed testing of the AMC hardware in both supervised and non-supervised fashion and it is meant to be used as a part of the production and quality testing of the AMC13 hardware. For python tool, typically you need to use `virtualenv` to create a separate python environment and install all dependencies. It creates a folder which contains all the necessary executables to use the packages that a Python project would need. Before starting, make sure you have `pip` and `virtualenv`. Use your favorite package manager to install them.Installation | |||||||
Deleted: | ||||||||
< < | AMCT | |||||||
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
|