Commit 9a213de8 authored by Tiago Jorge's avatar Tiago Jorge
Browse files

Small updates to Demo_CoRAMBAD_Brave_GR740_GNC: cyclic period 1s, mode change,...

Small updates to Demo_CoRAMBAD_Brave_GR740_GNC: cyclic period 1s, mode change, init gnc global var with fpga status.
parent b09bb90a
...@@ -52,7 +52,7 @@ FEATURES ...@@ -52,7 +52,7 @@ FEATURES
PI_pulse : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Calling::PI_pulse.others { PI_pulse : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Calling::PI_pulse.others {
Taste::coordinates => "100509 56233"; Taste::coordinates => "100509 56233";
Taste::RCMoperationKind => cyclic; Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 300 ms; Taste::RCMperiod => 1000 ms;
Taste::Deadline => 0 ms; Taste::Deadline => 0 ms;
Taste::InterfaceName => "pulse"; Taste::InterfaceName => "pulse";
}; };
...@@ -147,7 +147,7 @@ SUBCOMPONENTS ...@@ -147,7 +147,7 @@ SUBCOMPONENTS
}; };
Gnc : SYSTEM interfaceview::IV::Gnc::Gnc.others { Gnc : SYSTEM interfaceview::IV::Gnc::Gnc.others {
Taste::coordinates => "185019 63827 246584 104386"; Taste::coordinates => "185019 63827 246584 104386";
TASTE_IV_Properties::FPGA_Configurations => "modeA, modeB"; TASTE_IV_Properties::FPGA_Configurations => "modeA,modeB";
}; };
CONNECTIONS CONNECTIONS
Gnc_PI_do_something_Calling_RI_do_something : SUBPROGRAM ACCESS Gnc.PI_do_something -> Calling.RI_do_something { Gnc_PI_do_something_Calling_RI_do_something : SUBPROGRAM ACCESS Gnc.PI_do_something -> Calling.RI_do_something {
......
...@@ -11,7 +11,7 @@ char p_szGlobalState[] = "modeX"; ...@@ -11,7 +11,7 @@ char p_szGlobalState[] = "modeX";
#define FPGA_ERROR "error" #define FPGA_ERROR "error"
#define FPGA_DISABLED "disabled" #define FPGA_DISABLED "disabled"
char globalFpgaStatus_gnc[] = FPGA_READY; char globalFpgaStatus_gnc[] = FPGA_DISABLED;
void calling_startup() void calling_startup()
...@@ -19,7 +19,6 @@ void calling_startup() ...@@ -19,7 +19,6 @@ void calling_startup()
/* Write your initialization code here, /* Write your initialization code here,
but do not make any call to a required interface. */ but do not make any call to a required interface. */
printf("\n[calling_startup] Starting up ...\n"); printf("\n[calling_startup] Starting up ...\n");
} }
void calling_PI_pulse() void calling_PI_pulse()
...@@ -50,4 +49,16 @@ void calling_PI_pulse() ...@@ -50,4 +49,16 @@ void calling_PI_pulse()
in2.arr[0]++; in2.arr[1]++; in2.arr[2]++; in2.arr[0]++; in2.arr[1]++; in2.arr[2]++;
in3.arr[0]++; in3.arr[1]++; in3.arr[2]++; in3.arr[3]++; 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]++; 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]++;
static int ite = 0;
ite++;
if((ite % 3) == 0) { // each 3 sec
puts("\n[calling_PI_pulse] ************** Switching Configuration (SW <> HW) **************");
if (!strcmp(p_szGlobalState, "modeA")) {
strcpy(p_szGlobalState, "modeX");
} else {
strcpy(p_szGlobalState, "modeA");
}
};
} }
T_Boolean = Simulink.AliasType;
T_Boolean.BaseType = 'boolean';
T_Boolean.Description = 'A simple BOOLEAN';
T_Int8 = Simulink.AliasType;
T_Int8.BaseType = 'int8';
T_Int8.Description = 'range is (-128, 127)';
T_Int32 = Simulink.AliasType; T_Int32 = Simulink.AliasType;
T_Int32.BaseType = 'int32'; T_Int32.BaseType = 'int32';
T_Int32.Description = 'range is (-2147483648, 2147483647)'; T_Int32.Description = 'range is (-2147483648, 2147483647)';
In_Nested_inest_a_member_data=Simulink.BusElement;
In_Nested_inest_a_member_data.name='element_data';
In_Nested_inest_a_member_data.DataType='int32';
In_Nested_inest_a_member_data.dimensions=4;
In_Nested_inest_a=Simulink.Bus;
In_Nested_inest_a.Elements = [In_Nested_inest_a_member_data ];
Out_Nested_onest_a_member_data=Simulink.BusElement; Out_Nested_onest_a_member_data=Simulink.BusElement;
Out_Nested_onest_a_member_data.name='element_data'; Out_Nested_onest_a_member_data.name='element_data';
Out_Nested_onest_a_member_data.DataType='int32'; Out_Nested_onest_a_member_data.DataType='int32';
...@@ -26,17 +10,21 @@ Out_Nested_onest_a_member_data.dimensions=7; ...@@ -26,17 +10,21 @@ Out_Nested_onest_a_member_data.dimensions=7;
Out_Nested_onest_a=Simulink.Bus; Out_Nested_onest_a=Simulink.Bus;
Out_Nested_onest_a.Elements = [Out_Nested_onest_a_member_data ]; Out_Nested_onest_a.Elements = [Out_Nested_onest_a_member_data ];
MyInteger = Simulink.AliasType; Out_Nested_elem01=Simulink.BusElement;
MyInteger.BaseType = 'int32'; Out_Nested_elem01.name='onest_a';
MyInteger.Description = 'range is (-411673351, 763937697)'; Out_Nested_elem01.DataType='Out_Nested_onest_a';
Out_Nested_elem01.dimensions=1;
Seq3_member_data=Simulink.BusElement; Out_Nested = Simulink.Bus;
Seq3_member_data.name='element_data'; Out_Nested.Elements = Out_Nested_elem01 ;
Seq3_member_data.DataType='int32';
Seq3_member_data.dimensions=3;
Seq3=Simulink.Bus; In_Nested_inest_a_member_data=Simulink.BusElement;
Seq3.Elements = [Seq3_member_data ]; In_Nested_inest_a_member_data.name='element_data';
In_Nested_inest_a_member_data.DataType='int32';
In_Nested_inest_a_member_data.dimensions=4;
In_Nested_inest_a=Simulink.Bus;
In_Nested_inest_a.Elements = [In_Nested_inest_a_member_data ];
In_Nested_inest_b_member_data=Simulink.BusElement; In_Nested_inest_b_member_data=Simulink.BusElement;
In_Nested_inest_b_member_data.name='element_data'; In_Nested_inest_b_member_data.name='element_data';
...@@ -59,25 +47,17 @@ In_Nested_elem02.dimensions=1; ...@@ -59,25 +47,17 @@ In_Nested_elem02.dimensions=1;
In_Nested = Simulink.Bus; In_Nested = Simulink.Bus;
In_Nested.Elements = [In_Nested_elem01 In_Nested_elem02 ]; In_Nested.Elements = [In_Nested_elem01 In_Nested_elem02 ];
Out_Nested_elem01=Simulink.BusElement; MyInteger = Simulink.AliasType;
Out_Nested_elem01.name='onest_a'; MyInteger.BaseType = 'int32';
Out_Nested_elem01.DataType='Out_Nested_onest_a'; MyInteger.Description = 'range is (-411673351, 763937697)';
Out_Nested_elem01.dimensions=1;
Out_Nested = Simulink.Bus;
Out_Nested.Elements = Out_Nested_elem01 ;
T_UInt8 = Simulink.AliasType;
T_UInt8.BaseType = 'uint8';
T_UInt8.Description = 'range is (0, 255)';
T_UInt32 = Simulink.AliasType; Seq3_member_data=Simulink.BusElement;
T_UInt32.BaseType = 'uint32'; Seq3_member_data.name='element_data';
T_UInt32.Description = 'range is (0, 4294967295)'; Seq3_member_data.DataType='int32';
Seq3_member_data.dimensions=3;
TASTE_Boolean = Simulink.AliasType; Seq3=Simulink.Bus;
TASTE_Boolean.BaseType = 'boolean'; Seq3.Elements = [Seq3_member_data ];
TASTE_Boolean.Description = 'A simple BOOLEAN';
Seqout_member_data=Simulink.BusElement; Seqout_member_data=Simulink.BusElement;
Seqout_member_data.name='element_data'; Seqout_member_data.name='element_data';
...@@ -87,6 +67,26 @@ Seqout_member_data.dimensions=8; ...@@ -87,6 +67,26 @@ Seqout_member_data.dimensions=8;
Seqout=Simulink.Bus; Seqout=Simulink.Bus;
Seqout.Elements = [Seqout_member_data ]; Seqout.Elements = [Seqout_member_data ];
T_UInt32 = Simulink.AliasType;
T_UInt32.BaseType = 'uint32';
T_UInt32.Description = 'range is (0, 4294967295)';
T_Boolean = Simulink.AliasType;
T_Boolean.BaseType = 'boolean';
T_Boolean.Description = 'A simple BOOLEAN';
T_UInt8 = Simulink.AliasType;
T_UInt8.BaseType = 'uint8';
T_UInt8.Description = 'range is (0, 255)';
T_Int8 = Simulink.AliasType;
T_Int8.BaseType = 'int8';
T_Int8.Description = 'range is (-128, 127)';
TASTE_Boolean = Simulink.AliasType;
TASTE_Boolean.BaseType = 'boolean';
TASTE_Boolean.Description = 'A simple BOOLEAN';
Seq4_member_data=Simulink.BusElement; Seq4_member_data=Simulink.BusElement;
Seq4_member_data.name='element_data'; Seq4_member_data.name='element_data';
Seq4_member_data.DataType='int32'; Seq4_member_data.DataType='int32';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment