Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete rework of the test framework #5

Draft
wants to merge 60 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
a7285f0
modified the build.py script to use both mpc5777m and p2020 targets
Mar 8, 2021
10c3b6d
modified the run.sh script to be able to use the p2020 target
Mar 8, 2021
a91f8ed
cleaned unnecessary diffs
Mar 8, 2021
f9bc1d3
applied Jean's comments
Mar 8, 2021
2633c63
moved to power-qoriq-p2020-ds-p for p2020
Mar 11, 2021
9bd8445
modified scripts/run.sh to support both p2020 and mpc5777m (still wor…
Mar 11, 2021
300c4d5
modified the main of the t32 hook to remove the reset (because of pro…
Mar 11, 2021
037cccf
removed unused variables and case error in scripts/run.sh
Mar 11, 2021
e2e05f4
continued changing scripts to run for both p2020 and mpc5777
Mar 16, 2021
c96f477
updated traces
Mar 16, 2021
febd6bf
corrected mistakes on data formatting script
Mar 18, 2021
1eff290
added new corunner
Mar 19, 2021
14e3557
traces update
Mar 19, 2021
ceffb83
added the possibility to choose whether the data parser script consid…
Mar 19, 2021
a7b84cb
added program pointer address in messages to have something to rely o…
Mar 19, 2021
2eab0d3
wip: a slightly more stressing corunner
jeanguyomarch Mar 22, 2021
7b2d12e
added kmem generation script (wip)
Apr 6, 2021
4781626
updated traces
Apr 7, 2021
a8f46cb
changed corunners generation to stress sram more
Apr 7, 2021
fae34b5
added script to generate a custom memory placement
Apr 7, 2021
dd18ed9
changed scripts to run with new corunners and memory placement
Apr 7, 2021
817f95e
updated traces and examples
Apr 16, 2021
7805d6b
changed write buffer size to 1
Apr 16, 2021
d87cad3
added the possibility to change timer depending on the card and chang…
Apr 16, 2021
ade1851
added program execution time logging
Apr 16, 2021
979742d
added a new test using the memory placement and changed R script gene…
Apr 16, 2021
1a80a25
corrected kmemory generation script, modified placement template and …
Apr 16, 2021
68480cb
updated traces
Apr 23, 2021
bab5615
added L1 caches control and new test types
Apr 23, 2021
e84782c
added a task with only one ea
Apr 23, 2021
43d496f
modified psyko function to make it wait for license in case of LMAPI …
Apr 23, 2021
1f502aa
added the possibility to change the result array length
Apr 23, 2021
38e36db
added the possibility to set the start address for the array read by …
Apr 23, 2021
6a33ca8
updated traces
May 4, 2021
ebfcdfd
added config fot p2020rdb
May 4, 2021
64faa89
changes the placement test to control the task used and added test ge…
May 4, 2021
735a175
added option to generate plots without running tests
May 4, 2021
8b01901
changed plots generation to be more readable
May 4, 2021
a7c603a
updated traces
May 19, 2021
a7a9da7
changed places names to avoid earsing traces of different placement t…
May 19, 2021
cecb1ab
added L2SRAM tests
May 19, 2021
1f3ec50
correted bug on dictionary indexes
May 19, 2021
551a94d
updated traces
May 20, 2021
27c0226
added l1 cache tests and tweaked graph generation
May 20, 2021
66acf7d
updated traces
May 20, 2021
d5eb13d
corrected bugs run scripts
May 20, 2021
b1aa6e8
updated traces and traces doc
May 21, 2021
edbb369
changed Hsram tests and r script generation
May 21, 2021
5d7b1ba
corrected mistake about reference
May 21, 2021
cbaa970
updated traces
May 27, 2021
81dbd9f
added nex tests for l2sram and modified places graph x axis legend
May 27, 2021
e29e42a
applied Jean's remarks
May 28, 2021
3e69ed1
Applied Jean's remarks
May 31, 2021
4ccba4f
removed app (for the moment) and created the structure of the sources…
Jun 18, 2021
a451e36
started implementation of classes
Jun 18, 2021
6cb262a
finished build system and P2020 product class
Jul 26, 2021
1a688f3
added temporary files to have an exemple
Jul 26, 2021
1528204
added exemple app files
Jul 26, 2021
92d966f
corrected mistakes to make the test protocol fully working
Jul 27, 2021
10d11d1
added expected results after the test protocol
Jul 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/build/
/outdir/
*.sw?
*.o
__pycache__/
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ This results in artifacts produced by default in the `build/` directory.
Unless specified otherwise, the final executable, ready to be flashed on
a hardware target will reside at path `build/program.elf`.

### Environment variables
Some environment variables drive the compilation:
- P2020 and MPC5777M are the specific product used for these cards;
- NVAL is the number of measures that will be performed;

## Flashing an application

Use the [Trace32][6] scripts provided by the ASTERIOS RTK to flash the
Expand Down Expand Up @@ -82,7 +87,7 @@ Run:
-T <type>
```

with:
With:

- `<path/to/psyko>`, `<path/to/RTK>` and `<path/to/kdbv>` being paths to
ASTERIOS-specific software.
Expand Down Expand Up @@ -133,6 +138,11 @@ generate the `trunner` executable. It takes two arguments:
1. the path to the CMM script;
2. the path to the output file in which the measures will be dumped.

## Additional environment variables

These are not used for the base tasks tests (flash, flash2, G, H and U), and only drive the generation of the results
- NO_SEP will make all the plots be printed on the same graph
- IGN is a semi-column separated list allowing to ignore some tests on the graphs (This variable should no be set by the user (as there are always overridden by the run script).).


## License
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions app/config/task_U.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"app": {
"agents": [
{
"name": "task_U",
"eas": [
{
"from": "start",
"to": "c1",
"name": "US"
},
{
"from": "c1",
"to": "c1",
"name": "U0"
}

]
}
]
}
}
File renamed without changes.
File renamed without changes.
48 changes: 48 additions & 0 deletions app/kbuildgen_H.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"app_config": "config/task_H.hjson",

"partitions": [
{
"modules": [
{ "input_file": "psy/task_H.psy" },

{ "input_file": "psy/stubs/for_task_H.psy" }
],
"c_sources": [
{ "input_file": "src/crc.c" },
{ "input_file": "src/filter.c" },
{ "input_file": "src/filter2.c" },

{ "input_file": "psy/stubs/suite_task_H.c" }
]
}
],

"global_compile_config": {
"cflags": [
"-g2",
"-Xdebug-dwarf2",
"-Xdebug-local-cie",
"-Xdialect-c99",
"-X230=1",
"-X43=0",
"-I", "include"
]
},

"global_psymodule_config": {
"psy_pp_flags": [
"-I", "include"
],
"cflags": [
"-g2",
"-Xdebug-dwarf2",
"-Xdebug-local-cie",
"-Xdialect-c99",
"-X230=1",
"-X43=0",
"-I", "include"
]
}
}

44 changes: 44 additions & 0 deletions app/kbuildgen_U.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"app_config": "config/task_U.hjson",

"partitions": [
{
"modules": [
{ "input_file": "psy/task_U.psy" }
],
"c_sources": [
{ "input_file": "src/crc.c" },
{ "input_file": "src/filter.c" },
{ "input_file": "src/filter2.c" }
]
}
],

"global_compile_config": {
"cflags": [
"-g2",
"-Xdebug-dwarf2",
"-Xdebug-local-cie",
"-Xdialect-c99",
"-X230=1",
"-X43=0",
"-I", "include"
]
},

"global_psymodule_config": {
"psy_pp_flags": [
"-I", "include"
],
"cflags": [
"-g2",
"-Xdebug-dwarf2",
"-Xdebug-local-cie",
"-Xdialect-c99",
"-X230=1",
"-X43=0",
"-I", "include"
]
}
}

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 36 additions & 0 deletions app/psy/task_U.psy
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/************ Copyright Krono-Safe S.A. 2020, All rights reserved ************/

#include <app.psyh>

agent task_U (uses realtime, defaultclock clk_s)
{
global {
float noise_mat[IMG_H][IMG_W];
unsigned char image[IMG_H][IMG_W];

/* Take a look at app.h. The counter is incremented by one each
* "GEN_WORK", but we want to keep it constant between iterations
* (hence the counter-- after these calls)
* It is initialized to 39 because the following computations are
* performed:
* int max = (IMG_H + Counter + 60) % IMG_H + 1
* we want a max value to be IMG_H, so counter must be 39.
*
* That's a bit convoluted, but enables code factorization.
*/
unsigned int counter = 39u;
}

body start {
/* C0 -- not interesting, do nothing */
jump body_at_c1;
}

body body_at_c1 {
@c1 advance 1; /* <--- closes */

/* C1 */
GEN_WORK("U0", filter2, noise_mat, image, 12, counter);
counter--;
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading