Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
regression-suites
Commits
d37b4bb1
Commit
d37b4bb1
authored
Oct 02, 2019
by
Tiago Jorge
Browse files
Add stress test to Simulink block.
parent
adc1a42e
Changes
23
Hide whitespace changes
Inline
Side-by-side
Demo_Stress_HW_Mappers/DeploymentView.aadl
View file @
d37b4bb1
...
...
@@ -23,10 +23,9 @@ PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::Calling;
WITH interfaceview::IV::Gnc;
WITH interfaceview::IV::fpga_reconfiguration_engine;
WITH interfaceview::IV::
Gnc2
;
WITH interfaceview::IV::Function
1
;
WITH interfaceview::IV::
FunctionC
;
WITH interfaceview::IV::Function
Simulink
;
WITH ocarina_processors_leon;
WITH deploymentview::DV::Node1;
WITH Taste;
...
...
@@ -41,31 +40,27 @@ SUBCOMPONENTS
IV_Calling : SYSTEM interfaceview::IV::Calling::Calling.others {
Taste::FunctionName => "Calling";
};
IV_Gnc : SYSTEM interfaceview::IV::Gnc::Gnc.others {
Taste::FunctionName => "Gnc";
};
IV_fpga_reconfiguration_engine : SYSTEM interfaceview::IV::fpga_reconfiguration_engine::fpga_reconfiguration_engine.others {
Taste::FunctionName => "fpga_reconfiguration_engine";
};
IV_
Gnc2
: SYSTEM interfaceview::IV::
Gnc2::Gnc2
.others {
Taste::FunctionName => "
Gnc2
";
IV_
FunctionC
: SYSTEM interfaceview::IV::
FunctionC::FunctionC
.others {
Taste::FunctionName => "
FunctionC
";
};
IV_Function
1
: SYSTEM interfaceview::IV::Function
1
::Function
1
.others {
Taste::FunctionName => "Function
1
";
IV_Function
Simulink
: SYSTEM interfaceview::IV::Function
Simulink
::Function
Simulink
.others {
Taste::FunctionName => "Function
Simulink
";
};
gr740_partition : PROCESS deploymentview::DV::Node1::gr740_partition.others {
Taste::coordinates => "90703
54292 127086 70804
";
Taste::coordinates => "90703
61011 139093 97208
";
Deployment::Port_Number => 0;
};
gr740_rcc13rc5_posix : PROCESSOR ocarina_processors_leon::gr740.rcc13rc5_posix {
Taste::coordinates => "86155 49574 1
31634 73163
";
Taste::coordinates => "86155 49574 1
61267 113559
";
};
PROPERTIES
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_Calling;
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_Gnc;
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_fpga_reconfiguration_engine;
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_
Gnc2
;
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_Function
1
;
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_
FunctionC
;
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_Function
Simulink
;
Actual_Processor_Binding => (reference (gr740_rcc13rc5_posix)) APPLIES TO gr740_partition;
END Node1.others;
...
...
@@ -75,7 +70,7 @@ END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "80470 42834 1
37319 76533
";
Taste::coordinates => "80470 42834 1
85905 117814
";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
...
...
@@ -84,6 +79,6 @@ PROPERTIES
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.2";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("
/home/taste
/tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
Taste::HWLibraries => ("
../../..
/tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
Demo_Stress_HW_Mappers/InterfaceView.aadl
View file @
d37b4bb1
...
...
@@ -8,10 +8,9 @@
PACKAGE interfaceview::IV::Calling
PUBLIC
WITH interfaceview::IV::Gnc;
WITH interfaceview::IV::fpga_reconfiguration_engine;
WITH interfaceview::IV::
Gnc2
;
WITH interfaceview::IV::Function
1
;
WITH interfaceview::IV::
FunctionC
;
WITH interfaceview::IV::Function
Simulink
;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
...
...
@@ -35,31 +34,6 @@ PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_changeMode.others;
SUBPROGRAM RI_do_something
FEATURES
inp1 : IN PARAMETER DataView::Seq3 {
Taste::encoding => NATIVE;
};
inp2 : IN PARAMETER DataView::Seq3 {
Taste::encoding => NATIVE;
};
inp3 : IN PARAMETER DataView::Seq4 {
Taste::encoding => NATIVE;
};
outpu : OUT PARAMETER DataView::Seqout {
Taste::encoding => NATIVE;
};
innested : IN PARAMETER DataView::In_Nested {
Taste::encoding => NATIVE;
};
outnested : OUT PARAMETER DataView::Out_Nested {
Taste::encoding => NATIVE;
};
END RI_do_something;
SUBPROGRAM IMPLEMENTATION RI_do_something.others
END RI_do_something.others;
SUBPROGRAM RI_init
END RI_init;
...
...
@@ -89,32 +63,20 @@ END RI_status;
SUBPROGRAM IMPLEMENTATION RI_status.others
END RI_status.others;
SUBPROGRAM RI_
do_something2
SUBPROGRAM RI_
stressTiago
FEATURES
inp1 : IN PARAMETER DataView::Seq3 {
Taste::encoding => NATIVE;
};
inp2 : IN PARAMETER DataView::Seq3 {
Taste::encoding => NATIVE;
};
inp3 : IN PARAMETER DataView::Seq4 {
Taste::encoding => NATIVE;
};
outpu : OUT PARAMETER DataView::Seqout {
Taste::encoding => NATIVE;
};
innested : IN PARAMETER DataView::In_Nested {
inp : IN PARAMETER DataView::TypeNested {
Taste::encoding => NATIVE;
};
out
nested
: OUT PARAMETER DataView::
Out_
Nested {
out
p
: OUT PARAMETER DataView::
Type
Nested {
Taste::encoding => NATIVE;
};
END RI_
do_something2
;
END RI_
stressTiago
;
SUBPROGRAM IMPLEMENTATION RI_
do_something2
.others
END RI_
do_something2
.others;
SUBPROGRAM IMPLEMENTATION RI_
stressTiago
.others
END RI_
stressTiago
.others;
SUBPROGRAM RI_stressTiago
SUBPROGRAM RI_stressTiago
More
FEATURES
inp : IN PARAMETER DataView::TypeNested {
Taste::encoding => NATIVE;
...
...
@@ -122,10 +84,10 @@ FEATURES
outp : OUT PARAMETER DataView::TypeNested {
Taste::encoding => NATIVE;
};
END RI_stressTiago;
END RI_stressTiago
More
;
SUBPROGRAM IMPLEMENTATION RI_stressTiago.others
END RI_stressTiago.others;
SUBPROGRAM IMPLEMENTATION RI_stressTiago
More
.others
END RI_stressTiago
More
.others;
SYSTEM Calling
FEATURES
...
...
@@ -143,12 +105,6 @@ FEATURES
Taste::Deadline => 0 ms;
Taste::InterfaceName => "changeMode";
};
RI_do_something : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Gnc::PI_do_something.others {
Taste::coordinates => "134118 68838";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "do_something";
Taste::labelInheritance => "true";
};
RI_init : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::fpga_reconfiguration_engine::PI_init.others {
Taste::coordinates => "108721 94530";
Taste::RCMoperationKind => any;
...
...
@@ -167,16 +123,16 @@ FEATURES
Taste::InterfaceName => "status";
Taste::labelInheritance => "true";
};
RI_
do_something2
: REQUIRES SUBPROGRAM ACCESS interfaceview::IV::
Gnc2::PI_do_something2
.others {
Taste::coordinates => "134118 7
5133
";
RI_
stressTiago
: REQUIRES SUBPROGRAM ACCESS interfaceview::IV::
FunctionC::PI_stressTiago
.others {
Taste::coordinates => "134118 7
4034
";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "
do_something2
";
Taste::InterfaceName => "
stressTiago
";
Taste::labelInheritance => "true";
};
RI_stressTiago : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Function
1
::PI_stressTiago.others {
Taste::coordinates => "134118
79858
";
RI_stressTiago
More
: REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Function
Simulink
::PI_stressTiago
More
.others {
Taste::coordinates => "134118
81769
";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "stressTiago";
Taste::InterfaceName => "stressTiago
More
";
Taste::labelInheritance => "true";
};
PROPERTIES
...
...
@@ -189,60 +145,6 @@ END Calling.others;
END interfaceview::IV::Calling;
PACKAGE interfaceview::IV::Gnc
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_do_something
FEATURES
inp1 : IN PARAMETER DataView::Seq3 {
Taste::encoding => NATIVE;
};
inp2 : IN PARAMETER DataView::Seq3 {
Taste::encoding => NATIVE;
};
inp3 : IN PARAMETER DataView::Seq4 {
Taste::encoding => NATIVE;
};
outpu : OUT PARAMETER DataView::Seqout {
Taste::encoding => NATIVE;
};
innested : IN PARAMETER DataView::In_Nested {
Taste::encoding => NATIVE;
};
outnested : OUT PARAMETER DataView::Out_Nested {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_do_something;
SUBPROGRAM IMPLEMENTATION PI_do_something.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_do_something.others;
SYSTEM Gnc
FEATURES
PI_do_something : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Gnc::PI_do_something.others {
Taste::coordinates => "174484 81134";
Taste::RCMoperationKind => protected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "do_something";
};
PROPERTIES
Source_Language => (Simulink);
Taste::Active_Interfaces => any;
END Gnc;
SYSTEM IMPLEMENTATION Gnc.others
END Gnc.others;
END interfaceview::IV::Gnc;
PACKAGE interfaceview::IV::fpga_reconfiguration_engine
PUBLIC
...
...
@@ -330,67 +232,55 @@ END fpga_reconfiguration_engine.others;
END interfaceview::IV::fpga_reconfiguration_engine;
PACKAGE interfaceview::IV::
Gnc2
PACKAGE interfaceview::IV::
FunctionC
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_
do_something2
SUBPROGRAM PI_
stressTiago
FEATURES
inp1 : IN PARAMETER DataView::Seq3 {
Taste::encoding => NATIVE;
};
inp2 : IN PARAMETER DataView::Seq3 {
Taste::encoding => NATIVE;
};
inp3 : IN PARAMETER DataView::Seq4 {
Taste::encoding => NATIVE;
};
outpu : OUT PARAMETER DataView::Seqout {
Taste::encoding => NATIVE;
};
innested : IN PARAMETER DataView::In_Nested {
inp : IN PARAMETER DataView::TypeNested {
Taste::encoding => NATIVE;
};
out
nested
: OUT PARAMETER DataView::
Out_
Nested {
out
p
: OUT PARAMETER DataView::
Type
Nested {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_
do_something2
;
END PI_
stressTiago
;
SUBPROGRAM IMPLEMENTATION PI_
do_something2
.others
SUBPROGRAM IMPLEMENTATION PI_
stressTiago
.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_
do_something2
.others;
Compute_Execution_Time => 0 ms ..
100
0 ms;
END PI_
stressTiago
.others;
SYSTEM
Gnc2
SYSTEM
FunctionC
FEATURES
PI_
do_something2
: PROVIDES SUBPROGRAM ACCESS interfaceview::IV::
Gnc2::PI_do_something2
.others {
Taste::coordinates => "1
72121 115903
";
Taste::RCMoperationKind => protected;
PI_
stressTiago
: PROVIDES SUBPROGRAM ACCESS interfaceview::IV::
FunctionC::PI_stressTiago
.others {
Taste::coordinates => "1
64555 64396
";
Taste::RCMoperationKind =>
un
protected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "
do_something2
";
Taste::InterfaceName => "
stressTiago
";
};
PROPERTIES
Source_Language => (
Simulink
);
Source_Language => (
C
);
Taste::Active_Interfaces => any;
END
Gnc2
;
END
FunctionC
;
SYSTEM IMPLEMENTATION
Gnc2
.others
END
Gnc2
.others;
SYSTEM IMPLEMENTATION
FunctionC
.others
END
FunctionC
.others;
END interfaceview::IV::
Gnc2
;
END interfaceview::IV::
FunctionC
;
PACKAGE interfaceview::IV::Function
1
PACKAGE interfaceview::IV::Function
Simulink
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_stressTiago
SUBPROGRAM PI_stressTiago
More
FEATURES
inp : IN PARAMETER DataView::TypeNested {
Taste::encoding => NATIVE;
...
...
@@ -398,42 +288,38 @@ FEATURES
outp : OUT PARAMETER DataView::TypeNested {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_stressTiago;
END PI_stressTiagoMore;
SUBPROGRAM IMPLEMENTATION PI_stressTiago.others
SUBPROGRAM IMPLEMENTATION PI_stressTiago
More
.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 1000 ms;
END PI_stressTiago.others;
END PI_stressTiago
More
.others;
SYSTEM Function
1
SYSTEM Function
Simulink
FEATURES
PI_stressTiago : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function
1
::PI_stressTiago.others {
Taste::coordinates => "1
52126 143461
";
PI_stressTiago
More
: PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function
Simulink
::PI_stressTiago
More
.others {
Taste::coordinates => "1
65075 87800
";
Taste::RCMoperationKind => unprotected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "stressTiago";
Taste::InterfaceName => "stressTiago
More
";
};
PROPERTIES
Source_Language => (
C
);
Source_Language => (
Simulink
);
Taste::Active_Interfaces => any;
END Function
1
;
END Function
Simulink
;
SYSTEM IMPLEMENTATION Function
1
.others
END Function
1
.others;
SYSTEM IMPLEMENTATION Function
Simulink
.others
END Function
Simulink
.others;
END interfaceview::IV::Function
1
;
END interfaceview::IV::Function
Simulink
;
PACKAGE interfaceview::IV
PUBLIC
WITH interfaceview::IV::Calling;
WITH interfaceview::IV::Gnc;
WITH interfaceview::IV::fpga_reconfiguration_engine;
WITH interfaceview::IV::
Gnc2
;
WITH interfaceview::IV::Function
1
;
WITH interfaceview::IV::
FunctionC
;
WITH interfaceview::IV::Function
Simulink
;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
...
...
@@ -448,23 +334,18 @@ SUBCOMPONENTS
Calling : SYSTEM interfaceview::IV::Calling::Calling.others {
Taste::coordinates => "84026 56233 134118 94530";
};
Gnc : SYSTEM interfaceview::IV::Gnc::Gnc.others {
Taste::coordinates => "174484 61582 236049 102141";
};
fpga_reconfiguration_engine : SYSTEM interfaceview::IV::fpga_reconfiguration_engine::fpga_reconfiguration_engine.others {
Taste::coordinates => "90205 113227 140857 136625";
};
Gnc2 : SYSTEM interfaceview::IV::Gnc2::Gnc2.others {
Taste::coordinates => "172121 106297 232592 141099";
};
Function1 : SYSTEM interfaceview::IV::Function1::Function1.others {
Taste::coordinates => "126926 143461 202672 155901";
FunctionC : SYSTEM interfaceview::IV::FunctionC::FunctionC.others {
Taste::coordinates => "164555 61036 240301 73476";
TASTE_IV_Properties::FPGA_Configurations => "ModeC";
};
CONNECTIONS
Gnc_PI_do_something_Calling_RI_do_something : SUBPROGRAM ACCESS Gnc.PI_do_something -> Calling.RI_do_something {
T
aste::coordinates => "134118 68838 156256 68838 156256 81134 174484 81134
";
FunctionSimulink : SYSTEM interfaceview::IV::FunctionSimulink::FunctionSimulink.others {
Taste::coordinates => "165075 80857 242572 94072";
T
ASTE_IV_Properties::FPGA_Configurations => "ModeD
";
};
CONNECTIONS
fpga_reconfiguration_engine_PI_init_Calling_RI_init : SUBPROGRAM ACCESS fpga_reconfiguration_engine.PI_init -> Calling.RI_init {
Taste::coordinates => "108721 94530 108721 103878 120167 103878 120167 113227";
};
...
...
@@ -474,11 +355,11 @@ CONNECTIONS
fpga_reconfiguration_engine_PI_status_Calling_RI_status : SUBPROGRAM ACCESS fpga_reconfiguration_engine.PI_status -> Calling.RI_status {
Taste::coordinates => "97597 94530 97597 103878 99407 103878 99407 113227";
};
Gnc2_PI_do_something2_Calling_RI_do_something2 : SUBPROGRAM ACCESS Gnc2.PI_do_something2
-> Calling.RI_
do_something2
{
Taste::coordinates => "134118 7
5133 153119 75133 153119 115903 172121 115903
";
FunctionC_PI_stressTiago_Calling_RI_stressTiago : SUBPROGRAM ACCESS FunctionC.PI_stressTiago
-> Calling.RI_
stressTiago
{
Taste::coordinates => "134118 7
4034 161936 74034 161936 64396 164555 64396
";
};
Function
1
_PI_stressTiago_Calling_RI_stressTiago : SUBPROGRAM ACCESS Function
1
.PI_stressTiago -> Calling.RI_stressTiago {
Taste::coordinates => "134118
79858 152126 79858 152126 143461
";
Function
Simulink
_PI_stressTiago
More
_Calling_RI_stressTiago
More
: SUBPROGRAM ACCESS Function
Simulink
.PI_stressTiago
More
-> Calling.RI_stressTiago
More
{
Taste::coordinates => "134118
81769 149596 81769 149596 87800 165075 87800
";
};
END interfaceview.others;
...
...
Demo_Stress_HW_Mappers/build-script.sh
View file @
d37b4bb1
...
...
@@ -67,13 +67,11 @@ mono $(which taste-extract-asn-from-design.exe) -i "$INTERFACEVIEW" -j /tmp/dv.a
cd
"
$SKELS
"
&&
rm
-f
calling.zip
&&
zip
-r
calling calling/
*
&&
cd
$OLDPWD
||
exit
-1
cd
"
$SKELS
"
&&
rm
-f
gnc.zip
&&
zip
-r
gnc gnc/
*
&&
cd
$OLDPWD
||
exit
-1
cd
"
$SKELS
"
&&
rm
-f
fpga_reconfiguration_engine.zip
&&
zip
-r
fpga_reconfiguration_engine fpga_reconfiguration_engine/
*
&&
cd
$OLDPWD
||
exit
-1
cd
"
$SKELS
"
&&
rm
-f
g
nc
2
.zip
&&
zip
-r
gnc2 g
nc
2
/
*
&&
cd
$OLDPWD
||
exit
-1
cd
"
$SKELS
"
&&
rm
-f
functio
nc.zip
&&
zip
-r
functionc functio
nc/
*
&&
cd
$OLDPWD
||
exit
-1
cd
"
$SKELS
"
&&
rm
-f
function
1
.zip
&&
zip
-r
function
1
function
1
/
*
&&
cd
$OLDPWD
||
exit
-1
cd
"
$SKELS
"
&&
rm
-f
function
simulink
.zip
&&
zip
-r
function
simulink
function
simulink
/
*
&&
cd
$OLDPWD
||
exit
-1
[
!
-z
"
$CLEANUP
"
]
&&
rm
-rf
binary
*
...
...
@@ -126,10 +124,9 @@ cd "$CWD" && assert-builder-ocarina.py \
--deploymentView
"
$DEPLOYMENTVIEW
"
\
-o
"
$OUTPUTDIR
"
\
--subC
calling:
"
$SKELS
"
/calling.zip
\
--subSIMULINK
gnc:
"
$SKELS
"
/gnc.zip
\
--subC
fpga_reconfiguration_engine:
"
$SKELS
"
/fpga_reconfiguration_engine.zip
\
--sub
SIMULINK
g
nc
2
:
"
$SKELS
"
/
g
nc
2
.zip
\
--sub
C
function
1
:
"
$SKELS
"
/function
1
.zip
\
--sub
C
functio
nc:
"
$SKELS
"
/
functio
nc.zip
\
--sub
SIMULINK
function
simulink
:
"
$SKELS
"
/function
simulink
.zip
\
$ORCHESTRATOR_OPTIONS
if
[
-f
user_init_last.sh
]
...
...
Demo_Stress_HW_Mappers/calling/calling.c
View file @
d37b4bb1
...
...
@@ -18,9 +18,8 @@ char p_szGlobalState[10] = "modeX";
// This status shall be updated by the HW reconfiguration manager commanding of the FPGA and FPGA status check,
// and can be one of: FPGA_READY, FPGA_RECONFIGURING, FPGA_ERROR, FPGA_DISABLED.
// Status is kept per Function Block and not for the full FPGA, to accommodate for future work on partial reconfiguration of the HW accelerator.
char
globalFpgaStatus_gnc
[
20
]
=
FPGA_DISABLED
;
char
globalFpgaStatus_gnc2
[
20
]
=
FPGA_DISABLED
;
char
globalFpgaStatus_function1
[
20
]
=
FPGA_DISABLED
;
char
globalFpgaStatus_functionc
[
20
]
=
FPGA_DISABLED
;
char
globalFpgaStatus_functionsimulink
[
20
]
=
FPGA_DISABLED
;
//uncomment the following define to print debug level info
//#define DEBUG_RECONF
...
...
@@ -59,6 +58,11 @@ void calling_startup()
calling_RI_init
();
}
void
printTypeNested
(
asn1SccTypeNested
*
data
)
{
printf
(
"[printTypeNested] to be implemented
\n
"
);
}
void
calling_PI_changeMode
()
{
/* Write your code here! */
...
...
@@ -70,17 +74,11 @@ void calling_PI_changeMode()
static
asn1SccMyInteger
size
=
-
1
;
char
new_config
[
10
]
=
""
;
static
asn1SccTypeNested
inp
,
outp
;
calling_RI_stressTiago
(
&
inp
,
&
outp
);
if
(
strcmp
(
p_szGlobalState
,
"modeX"
)
==
0
)
{
strcpy
(
new_config
,
"mode
A
"
);
strcpy
(
new_config
,
"mode
C
"
);
}
else
{
if
(
strcmp
(
p_szGlobalState
,
"mode
A
"
)
==
0
)
{
strcpy
(
new_config
,
"mode
C
"
);
if
(
strcmp
(
p_szGlobalState
,
"mode
C
"
)
==
0
)
{
strcpy
(
new_config
,
"mode
D
"
);
}
else
{
strcpy
(
new_config
,
"modeX"
);
}
...
...
@@ -89,11 +87,7 @@ void calling_PI_changeMode()
/* ! header file is under binary.c/auto-src
use it to map mode to bit stream offset and size that engine needs */
// update global variables to value FPGA_RECONFIGURING
// see calling.c where global variable is defined (and its values): here is globalFpgaStatus_gnc
// do not hardcode: rule here is the variables will always be named 'globalFpgaStatus_' + hw funcion block name (in this case 'gnc')
// the hw funcion block name (in this case 'gnc') which corresponds to the mode can also be retrieved from the header file
// this variable should be updated so that applications know if function is still operational in the FPGA
char
*
global_status_var
;
offset
=
-
1
;
size
=
-
1
;
...
...
@@ -102,14 +96,14 @@ void calling_PI_changeMode()
printf
(
"[calling_PI_changeMode] bitfile info is: global_status_var prev - %s, offset - %lld, size - %lld
\n
"
,
global_status_var
,
offset
,
size
);
#endif
// DISABLE ALL
strcpy
(
globalFpgaStatus_
g
nc
,
FPGA_DISABLED
);
strcpy
(
globalFpgaStatus_
gnc2
,
FPGA_DISABLED
);
strcpy
(
globalFpgaStatus_
functio
nc
,
FPGA_DISABLED
);
strcpy
(
globalFpgaStatus_
functionsimulink
,
FPGA_DISABLED
);
// SET NEXT AS RECONFIGURING
strcpy
(
global_status_var
,
FPGA_RECONFIGURING
);
#ifdef DEBUG_RECONF
printf
(
"[calling_PI_changeMode] global_status_var now is - %s
\n
"
,
global_status_var
);
printf
(
"[calling_PI_changeMode] cross check: globalFpgaStatus_
g
nc now is - %s
\n
"
,
globalFpgaStatus_
g
nc
);
printf
(
"[calling_PI_changeMode] cross check: globalFpgaStatus_
gnc2
now is - %s
\n
"
,
globalFpgaStatus_
gnc2
);
printf
(
"[calling_PI_changeMode] cross check: globalFpgaStatus_
functio
nc now is - %s
\n
"
,
globalFpgaStatus_
functio
nc
);
printf
(
"[calling_PI_changeMode] cross check: globalFpgaStatus_
functionsimulink
now is - %s
\n
"
,
globalFpgaStatus_
functionsimulink
);
#endif
// CALL engine
...
...
@@ -149,33 +143,23 @@ void calling_PI_pulse()
{
printf
(
"
\n
[calling_PI_pulse] Current mode is %s
\n
"
,
p_szGlobalState
);
static
asn1SccSeq3
in1
=
{
0
,
0
,
0
};
static
asn1SccSeq3
in2
=
{
1
,
1
,
1
};
static
asn1SccSeq4
in3
=
{
2
,
2
,
2
,
2
};
static
asn1SccIn_Nested
inn
=
{{
3
,
3
,
3
,
3
},
{
4
,
4
,
4
}};
asn1SccSeqout
out1
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
asn1SccOut_Nested
outn
=
{{
0
,
0
,
0
,
0
,
0
,
0
,
0
}};
//TODO init input data?
static
asn1SccTypeNested
inp
,
outp
;
if
(
strcmp
(
p_szGlobalState
,
"modeC"
)
==
0
)
{
printf
(
"[calling_PI_pulse] Calling '
do_something2
'
\n
"
);
calling_RI_
do_something2
(
&
in1
,
&
in2
,
&
in3
,
&
inn
,
&
out1
,
&
outn
);
printf
(
"[calling_PI_pulse] Calling '
calling_RI_stressTiago
'
\n
"
);
calling_RI_
stressTiago
(
&
inp
,
&
outp
);
}
else
{
printf
(
"[calling_PI_pulse] Calling '
do_something
'
\n
"
);
calling_RI_
do_something
(
&
in1
,
&
in2
,
&
in3
,
&
inn
,
&
out1
,
&
out
n
);
printf
(
"[calling_PI_pulse] Calling '
calling_RI_stressTiagoMore
'
\n
"
);
calling_RI_
stressTiagoMore
(
&
inp
,
&
out
p
);
}
printf
(
"[calling_PI_pulse] Sent: %lld %lld %lld
\n
"
,
in1
.
arr
[
0
],
in1
.
arr
[
1
],
in1
.
arr
[
2
]);
printf
(
"[calling_PI_pulse] Sent: %lld %lld %lld
\n
"
,
in2
.
arr
[
0
],
in2
.
arr
[
1
],
in2
.
arr
[
2
]);
printf
(
"[calling_PI_pulse] Sent: %lld %lld %lld %lld
\n
"
,
in3
.
arr
[
0
],
in3
.
arr
[
1
],
in3
.
arr
[
2
],
in3
.
arr
[
3
]);
printf
(
"[calling_PI_pulse] Sent: {%lld %lld %lld %lld - %lld %lld %lld}
\n\n
"
,
inn
.
inest_a
.
arr
[
0
],
inn
.
inest_a
.
arr
[
1
],
inn
.
inest_a
.
arr
[
2
],
inn
.
inest_a
.
arr
[
3
],
inn
.
inest_b
.
arr
[
0
],
inn
.
inest_b
.
arr
[
1
],
inn
.
inest_b
.
arr
[
2
]);
printf
(
"[calling_PI_pulse] Received: %lld %lld %lld %lld %lld %lld %lld %lld
\n
"
,
out1
.
arr
[
0
],
out1
.
arr
[
1
],
out1
.
arr
[
2
],
out1
.
arr
[
3
],
out1
.
arr
[
4
],
out1
.
arr
[
5
],
out1
.
arr
[
6
],
out1
.
arr
[
7
]);
printf
(
"[calling_PI_pulse] Received: {%lld %lld %lld %lld %lld %lld %lld}
\n
"
,
outn
.
onest_a
.
arr
[
0
],
outn
.
onest_a
.
arr
[
1
],
outn
.
onest_a
.
arr
[
2
],
outn
.
onest_a
.
arr
[
3
],
outn
.
onest_a
.
arr
[
4
],
outn
.
onest_a
.
arr
[
5
],
outn
.
onest_a
.
arr
[
6
]);
in1
.
arr
[
0
]
++
;
in1
.
arr
[
1
]
++
;
in1
.
arr
[
2
]
++
;
in2
.
arr
[
0
]
++
;
in2
.
arr
[
1
]
++
;
in2
.
arr
[
2
]
++
;
in3
.
arr
[
0
]
++
;
in3
.
arr
[
1
]
++
;
in3
.
arr
[
2
]
++
;
in3
.
arr
[
3
]
++
;
inn
.
inest_a
.
arr
[
0
]
++
;
inn
.
inest_a
.
arr
[
1
]
++
;
inn
.
inest_a
.
arr
[
2
]
++
;
inn
.
inest_a
.
arr
[
3
]
++
;
inn
.
inest_b
.
arr
[
0
]
++
;
inn
.
inest_b
.
arr
[
1
]
++
;
inn
.
inest_b
.
arr
[
2
]
++
;
printf
(
"[calling_PI_pulse] Sent:
\n
"
);
printTypeNested
(
&
inp
);
printf
(
"[calling_PI_pulse] Received:
\n
"
);
printTypeNested
(
&
outp
);
//TODO change input data?
}
Demo_Stress_HW_Mappers/calling/calling.h
View file @
d37b4bb1
...
...
@@ -17,13 +17,6 @@ void calling_PI_pulse();
void
calling_PI_changeMode
();
extern
void
calling_RI_do_something
(
const
asn1SccSeq3
*
,
const
asn1SccSeq3
*
,
const
asn1SccSeq4
*
,
const
asn1SccIn_Nested
*
,
asn1SccSeqout
*
,
asn1SccOut_Nested
*
);
extern
void
calling_RI_init
();