Commit 80149aca authored by Patricia Lopez Cueva's avatar Patricia Lopez Cueva
Browse files

Latest version of fpga reconfiguration engine integrated

parent adc1a42e
......@@ -25,8 +25,6 @@ PROPERTIES
END PI_pulse.others;
SUBPROGRAM PI_changeMode
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_changeMode;
SUBPROGRAM IMPLEMENTATION PI_changeMode.others
......@@ -125,7 +123,7 @@ FEATURES
PI_changeMode : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Calling::PI_changeMode.others {
Taste::coordinates => "111658 56233";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 3000 ms;
Taste::RCMperiod => 20000 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "changeMode";
};
......@@ -336,6 +334,8 @@ FEATURES
outnested : OUT PARAMETER DataView::Out_Nested {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_do_something2;
SUBPROGRAM IMPLEMENTATION PI_do_something2.others
......@@ -348,6 +348,7 @@ FEATURES
PI_do_something2 : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Gnc2::PI_do_something2.others {
Taste::coordinates => "172121 115903";
Taste::RCMoperationKind => protected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "do_something2";
};
......
......@@ -80,8 +80,8 @@ void calling_PI_changeMode()
}
printf("[calling_PI_changeMode] Initiating mode change %s => %s ... \n", p_szGlobalState, new_config);
/* ! header file is under binary.c/auto-src
use it to map mode to bit stream offset and size that engine needs */
// ! 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')
......@@ -106,15 +106,15 @@ void calling_PI_changeMode()
#endif
// CALL engine
/* ## FPGA reconfiguration engine status */
// ## FPGA reconfiguration engine status
calling_RI_status(&fpga_status);
#ifdef DEBUG_RECONF
printf("[calling_PI_changeMode] FPGA STATUS before reconf = %lld\n", fpga_status);
#endif
/* ## FPGA reconfiguration engine configuration */
// ## FPGA reconfiguration engine configuration
calling_RI_run(&offset, &size);
/* ## FPGA reconfiguration engine status */
// ## FPGA reconfiguration engine status
calling_RI_status(&fpga_status);
#ifdef DEBUG_RECONF
printf("[calling_PI_changeMode] FPGA STATUS after reconf = %lld\n", fpga_status);
......
......@@ -50,15 +50,23 @@ void fpga_reconfiguration_engine_PI_status(asn1SccMyInteger *status)
void fpga_reconfiguration_engine_PI_run(const asn1SccMyInteger *IN_spi_address,
const asn1SccMyInteger *IN_size)
{
int RAM_address = 0x08000000;
/* Reset configuration engine */
fpga_cfg_reset();
/* Loading bitfile in RAM memory */
if (fpga_cfg_cpy_bitstream (*IN_spi_address, RAM_address, *IN_size))
{
printf ("fpga_reconfiguration_engine_PI_run: Failed to load bitfile in RAM memory\n");
}
/* Reconfigure FPGA */
fpga_cfg_config((int)*IN_spi_address, (int)*IN_size);
fpga_cfg_config(RAM_address, (int)*IN_size);
}
void fpga_reconfiguration_engine_PI_init()
{
fpga_cfg_init(0, 3);
fpga_cfg_init(0, 1);
}
MyInteger = Simulink.AliasType;
MyInteger.BaseType = 'int32';
MyInteger.Description = 'range is (-411673351, 763937697)';
T_Int32 = Simulink.AliasType;
T_Int32.BaseType = 'int32';
T_Int32.Description = 'range is (-2147483648, 2147483647)';
Out_Nested_onest_a_member_data=Simulink.BusElement;
Out_Nested_onest_a_member_data.name='element_data';
Out_Nested_onest_a_member_data.DataType='int32';
Out_Nested_onest_a_member_data.dimensions=7;
Out_Nested_onest_a=Simulink.Bus;
Out_Nested_onest_a.Elements = [Out_Nested_onest_a_member_data ];
Out_Nested_elem01=Simulink.BusElement;
Out_Nested_elem01.name='onest_a';
Out_Nested_elem01.DataType='Out_Nested_onest_a';
Out_Nested_elem01.dimensions=1;
Out_Nested = Simulink.Bus;
Out_Nested.Elements = Out_Nested_elem01 ;
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';
......@@ -26,6 +14,26 @@ 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 ];
Seq4_member_data=Simulink.BusElement;
Seq4_member_data.name='element_data';
Seq4_member_data.DataType='int32';
Seq4_member_data.dimensions=4;
Seq4=Simulink.Bus;
Seq4.Elements = [Seq4_member_data ];
Seq3_member_data=Simulink.BusElement;
Seq3_member_data.name='element_data';
Seq3_member_data.DataType='int32';
Seq3_member_data.dimensions=3;
Seq3=Simulink.Bus;
Seq3.Elements = [Seq3_member_data ];
T_Int8 = Simulink.AliasType;
T_Int8.BaseType = 'int8';
T_Int8.Description = 'range is (-128, 127)';
In_Nested_inest_b_member_data=Simulink.BusElement;
In_Nested_inest_b_member_data.name='element_data';
In_Nested_inest_b_member_data.DataType='int32';
......@@ -47,29 +55,17 @@ In_Nested_elem02.dimensions=1;
In_Nested = Simulink.Bus;
In_Nested.Elements = [In_Nested_elem01 In_Nested_elem02 ];
MyInteger = Simulink.AliasType;
MyInteger.BaseType = 'int32';
MyInteger.Description = 'range is (-411673351, 763937697)';
Seq3_member_data=Simulink.BusElement;
Seq3_member_data.name='element_data';
Seq3_member_data.DataType='int32';
Seq3_member_data.dimensions=3;
Seq3=Simulink.Bus;
Seq3.Elements = [Seq3_member_data ];
Seqout_member_data=Simulink.BusElement;
Seqout_member_data.name='element_data';
Seqout_member_data.DataType='int32';
Seqout_member_data.dimensions=8;
Out_Nested_onest_a_member_data=Simulink.BusElement;
Out_Nested_onest_a_member_data.name='element_data';
Out_Nested_onest_a_member_data.DataType='int32';
Out_Nested_onest_a_member_data.dimensions=7;
Seqout=Simulink.Bus;
Seqout.Elements = [Seqout_member_data ];
Out_Nested_onest_a=Simulink.Bus;
Out_Nested_onest_a.Elements = [Out_Nested_onest_a_member_data ];
T_UInt32 = Simulink.AliasType;
T_UInt32.BaseType = 'uint32';
T_UInt32.Description = 'range is (0, 4294967295)';
TASTE_Boolean = Simulink.AliasType;
TASTE_Boolean.BaseType = 'boolean';
TASTE_Boolean.Description = 'A simple BOOLEAN';
T_Boolean = Simulink.AliasType;
T_Boolean.BaseType = 'boolean';
......@@ -79,19 +75,23 @@ 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)';
T_UInt32 = Simulink.AliasType;
T_UInt32.BaseType = 'uint32';
T_UInt32.Description = 'range is (0, 4294967295)';
TASTE_Boolean = Simulink.AliasType;
TASTE_Boolean.BaseType = 'boolean';
TASTE_Boolean.Description = 'A simple BOOLEAN';
Out_Nested_elem01=Simulink.BusElement;
Out_Nested_elem01.name='onest_a';
Out_Nested_elem01.DataType='Out_Nested_onest_a';
Out_Nested_elem01.dimensions=1;
Seq4_member_data=Simulink.BusElement;
Seq4_member_data.name='element_data';
Seq4_member_data.DataType='int32';
Seq4_member_data.dimensions=4;
Out_Nested = Simulink.Bus;
Out_Nested.Elements = Out_Nested_elem01 ;
Seq4=Simulink.Bus;
Seq4.Elements = [Seq4_member_data ];
Seqout_member_data=Simulink.BusElement;
Seqout_member_data.name='element_data';
Seqout_member_data.DataType='int32';
Seqout_member_data.dimensions=8;
Seqout=Simulink.Bus;
Seqout.Elements = [Seqout_member_data ];
......@@ -2,34 +2,14 @@ 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_UInt32 = Simulink.AliasType;
T_UInt32.BaseType = 'uint32';
T_UInt32.Description = 'range is (0, 4294967295)';
T_Int32 = Simulink.AliasType;
T_Int32.BaseType = 'int32';
T_Int32.Description = 'range is (-2147483648, 2147483647)';
Out_Nested_onest_a_member_data=Simulink.BusElement;
Out_Nested_onest_a_member_data.name='element_data';
Out_Nested_onest_a_member_data.DataType='int32';
Out_Nested_onest_a_member_data.dimensions=7;
Out_Nested_onest_a=Simulink.Bus;
Out_Nested_onest_a.Elements = [Out_Nested_onest_a_member_data ];
MyInteger = Simulink.AliasType;
MyInteger.BaseType = 'int32';
MyInteger.Description = 'range is (-411673351, 763937697)';
Seqout_member_data=Simulink.BusElement;
Seqout_member_data.name='element_data';
Seqout_member_data.DataType='int32';
Seqout_member_data.dimensions=8;
Seqout=Simulink.Bus;
Seqout.Elements = [Seqout_member_data ];
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';
......@@ -63,10 +43,38 @@ TASTE_Boolean = Simulink.AliasType;
TASTE_Boolean.BaseType = 'boolean';
TASTE_Boolean.Description = 'A simple BOOLEAN';
MyInteger = Simulink.AliasType;
MyInteger.BaseType = 'int32';
MyInteger.Description = 'range is (-411673351, 763937697)';
Seqout_member_data=Simulink.BusElement;
Seqout_member_data.name='element_data';
Seqout_member_data.DataType='int32';
Seqout_member_data.dimensions=8;
Seqout=Simulink.Bus;
Seqout.Elements = [Seqout_member_data ];
T_Int8 = Simulink.AliasType;
T_Int8.BaseType = 'int8';
T_Int8.Description = 'range is (-128, 127)';
Out_Nested_onest_a_member_data=Simulink.BusElement;
Out_Nested_onest_a_member_data.name='element_data';
Out_Nested_onest_a_member_data.DataType='int32';
Out_Nested_onest_a_member_data.dimensions=7;
Out_Nested_onest_a=Simulink.Bus;
Out_Nested_onest_a.Elements = [Out_Nested_onest_a_member_data ];
Out_Nested_elem01=Simulink.BusElement;
Out_Nested_elem01.name='onest_a';
Out_Nested_elem01.DataType='Out_Nested_onest_a';
Out_Nested_elem01.dimensions=1;
Out_Nested = Simulink.Bus;
Out_Nested.Elements = Out_Nested_elem01 ;
Seq3_member_data=Simulink.BusElement;
Seq3_member_data.name='element_data';
Seq3_member_data.DataType='int32';
......@@ -75,6 +83,10 @@ Seq3_member_data.dimensions=3;
Seq3=Simulink.Bus;
Seq3.Elements = [Seq3_member_data ];
T_UInt8 = Simulink.AliasType;
T_UInt8.BaseType = 'uint8';
T_UInt8.Description = 'range is (0, 255)';
Seq4_member_data=Simulink.BusElement;
Seq4_member_data.name='element_data';
Seq4_member_data.DataType='int32';
......@@ -83,15 +95,3 @@ Seq4_member_data.dimensions=4;
Seq4=Simulink.Bus;
Seq4.Elements = [Seq4_member_data ];
Out_Nested_elem01=Simulink.BusElement;
Out_Nested_elem01.name='onest_a';
Out_Nested_elem01.DataType='Out_Nested_onest_a';
Out_Nested_elem01.dimensions=1;
Out_Nested = Simulink.Bus;
Out_Nested.Elements = Out_Nested_elem01 ;
T_UInt32 = Simulink.AliasType;
T_UInt32.BaseType = 'uint32';
T_UInt32.Description = 'range is (0, 4294967295)';
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