Commit d37b4bb1 authored by Tiago Jorge's avatar Tiago Jorge
Browse files

Add stress test to Simulink block.

parent adc1a42e
......@@ -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::Function1;
WITH interfaceview::IV::FunctionC;
WITH interfaceview::IV::FunctionSimulink;
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_Function1 : SYSTEM interfaceview::IV::Function1::Function1.others {
Taste::FunctionName => "Function1";
IV_FunctionSimulink : SYSTEM interfaceview::IV::FunctionSimulink::FunctionSimulink.others {
Taste::FunctionName => "FunctionSimulink";
};
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 131634 73163";
Taste::coordinates => "86155 49574 161267 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_Function1;
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_FunctionC;
Taste::APLC_Binding => (reference (gr740_partition)) APPLIES TO IV_FunctionSimulink;
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 137319 76533";
Taste::coordinates => "80470 42834 185905 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;
......@@ -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::Function1;
WITH interfaceview::IV::FunctionC;
WITH interfaceview::IV::FunctionSimulink;
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;
};
outnested : OUT PARAMETER DataView::Out_Nested {
outp : OUT PARAMETER DataView::TypeNested {
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_stressTiagoMore
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_stressTiagoMore;
SUBPROGRAM IMPLEMENTATION RI_stressTiago.others
END RI_stressTiago.others;
SUBPROGRAM IMPLEMENTATION RI_stressTiagoMore.others
END RI_stressTiagoMore.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 75133";
RI_stressTiago : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::FunctionC::PI_stressTiago.others {
Taste::coordinates => "134118 74034";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "do_something2";
Taste::InterfaceName => "stressTiago";
Taste::labelInheritance => "true";
};
RI_stressTiago : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Function1::PI_stressTiago.others {
Taste::coordinates => "134118 79858";
RI_stressTiagoMore : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::FunctionSimulink::PI_stressTiagoMore.others {
Taste::coordinates => "134118 81769";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "stressTiago";
Taste::InterfaceName => "stressTiagoMore";
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;
};
outnested : OUT PARAMETER DataView::Out_Nested {
outp : OUT PARAMETER DataView::TypeNested {
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 .. 1000 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 => "172121 115903";
Taste::RCMoperationKind => protected;
PI_stressTiago : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::FunctionC::PI_stressTiago.others {
Taste::coordinates => "164555 64396";
Taste::RCMoperationKind => unprotected;
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::Function1
PACKAGE interfaceview::IV::FunctionSimulink
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_stressTiago
SUBPROGRAM PI_stressTiagoMore
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_stressTiagoMore.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 1000 ms;
END PI_stressTiago.others;
END PI_stressTiagoMore.others;
SYSTEM Function1
SYSTEM FunctionSimulink
FEATURES
PI_stressTiago : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function1::PI_stressTiago.others {
Taste::coordinates => "152126 143461";
PI_stressTiagoMore : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::FunctionSimulink::PI_stressTiagoMore.others {
Taste::coordinates => "165075 87800";
Taste::RCMoperationKind => unprotected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "stressTiago";
Taste::InterfaceName => "stressTiagoMore";
};
PROPERTIES
Source_Language => (C);
Source_Language => (Simulink);
Taste::Active_Interfaces => any;
END Function1;
END FunctionSimulink;
SYSTEM IMPLEMENTATION Function1.others
END Function1.others;
SYSTEM IMPLEMENTATION FunctionSimulink.others
END FunctionSimulink.others;
END interfaceview::IV::Function1;
END interfaceview::IV::FunctionSimulink;
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::Function1;
WITH interfaceview::IV::FunctionC;
WITH interfaceview::IV::FunctionSimulink;
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 {
Taste::coordinates => "134118 68838 156256 68838 156256 81134 174484 81134";
FunctionSimulink : SYSTEM interfaceview::IV::FunctionSimulink::FunctionSimulink.others {
Taste::coordinates => "165075 80857 242572 94072";
TASTE_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 75133 153119 75133 153119 115903 172121 115903";
FunctionC_PI_stressTiago_Calling_RI_stressTiago : SUBPROGRAM ACCESS FunctionC.PI_stressTiago -> Calling.RI_stressTiago {
Taste::coordinates => "134118 74034 161936 74034 161936 64396 164555 64396";
};
Function1_PI_stressTiago_Calling_RI_stressTiago : SUBPROGRAM ACCESS Function1.PI_stressTiago -> Calling.RI_stressTiago {
Taste::coordinates => "134118 79858 152126 79858 152126 143461";
FunctionSimulink_PI_stressTiagoMore_Calling_RI_stressTiagoMore : SUBPROGRAM ACCESS FunctionSimulink.PI_stressTiagoMore -> Calling.RI_stressTiagoMore {
Taste::coordinates => "134118 81769 149596 81769 149596 87800 165075 87800";
};
END interfaceview.others;
......
......@@ -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 gnc2.zip && zip -r gnc2 gnc2/* && cd $OLDPWD || exit -1
cd "$SKELS" && rm -f functionc.zip && zip -r functionc functionc/* && cd $OLDPWD || exit -1
cd "$SKELS" && rm -f function1.zip && zip -r function1 function1/* && cd $OLDPWD || exit -1
cd "$SKELS" && rm -f functionsimulink.zip && zip -r functionsimulink functionsimulink/* && 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 \
--subSIMULINK gnc2:"$SKELS"/gnc2.zip \
--subC function1:"$SKELS"/function1.zip \
--subC functionc:"$SKELS"/functionc.zip \
--subSIMULINK functionsimulink:"$SKELS"/functionsimulink.zip \
$ORCHESTRATOR_OPTIONS
if [ -f user_init_last.sh ]
......
......@@ -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, "modeA");
strcpy(new_config, "modeC");
}else{
if (strcmp(p_szGlobalState, "modeA") == 0) {
strcpy(new_config, "modeC");
if (strcmp(p_szGlobalState, "modeC") == 0) {
strcpy(new_config, "modeD");
}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_gnc, FPGA_DISABLED);
strcpy(globalFpgaStatus_gnc2, FPGA_DISABLED);
strcpy(globalFpgaStatus_functionc, 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_gnc now is - %s\n", globalFpgaStatus_gnc);
printf("[calling_PI_changeMode] cross check: globalFpgaStatus_gnc2 now is - %s\n", globalFpgaStatus_gnc2);
printf("[calling_PI_changeMode] cross check: globalFpgaStatus_functionc now is - %s\n", globalFpgaStatus_functionc);
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, &outn);
printf("[calling_PI_pulse] Calling 'calling_RI_stressTiagoMore'\n");
calling_RI_stressTiagoMore(&inp, &outp);
}
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?
}
......@@ -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();