ConOpSys V2970
P004.07
ANVILEX control operating system
|
Anvilex vertual machine class. More...
#include <AVM2020.h>
Public Member Functions | |
AVM2020 () | |
Class constructor method. More... | |
~AVM2020 () | |
Application destructor method. More... | |
VOID | Init () |
Application initialisation method. More... | |
VOID | Execute () |
Vertual machine cyclic execution method. More... | |
VOID | Assign_Inputs (TConOpSys_Variant_Data *struct_Input_Memory, U32 u32_Size) |
Vertual machine cyclic assign input method. More... | |
VOID | Assign_Outputs (TConOpSys_Variant_Data *struct_Output_Memory, U32 u32_Size) |
Vertual machine cyclic assign output method. More... | |
VOID | Assign_Data_Memory (TConOpSys_Variant_Data *struct_Data_Memory, U32 u32_Size) |
Vertual machine cyclic assign data memory method. More... | |
VOID | Assign_Program_Memory (TConOpSys_Variant_Data *struct_Program_Memory, U32 u32_Size) |
Vertual machine cyclic assign program memory method. More... | |
VOID | Assign_Parameter (TConOpSys_Variant_Data *struct_Parameter_Memory, U32 u32_Size) |
Vertual machine cyclic assign parameters method. More... | |
VOID | Load_Operand_1 () |
VOID | Load_Operand_2 () |
VOID | Store_Result () |
VOID | Execute_MUL_F32 () |
VOID | Execute_DIV_F32 () |
VOID | Execute_ADD_F32 () |
VOID | Execute_SUB_F32 () |
VOID | Execute_JL_F32 () |
VOID | Execute_JG_F32 () |
VOID | Execute_JLE_F32 () |
VOID | Execute_JGE_F32 () |
VOID | Execute_EQUL_F32 () |
VOID | Execute_NOT_EQUL_F32 () |
VOID | Execute_COPY_F32 () |
VOID | Execute_GO_TO () |
VOID | Execute_IF_GO_TO () |
VOID | Execute_HALT () |
VOID | Execute_CALL () |
VOID | Execute_RET () |
VOID | Done () |
Application finalisation method. More... | |
Anvilex vertual machine class.
None
AVM2020::AVM2020 | ( | ) |
Class constructor method.
References Data_Memory, Input, NULL, Output, Parameter, Program_Memory, u32_Program_Counter, u32_Program_Counter_Offset, and u32_Stack_Pointer.
AVM2020::~AVM2020 | ( | ) |
Application destructor method.
VOID AVM2020::Assign_Data_Memory | ( | TConOpSys_Variant_Data * | struct_Data_Memory, |
U32 | u32_Size | ||
) |
Vertual machine cyclic assign data memory method.
[in] | *struct_Data_Memory | - Pointer to data memory array |
[in] | u32_Size | - Size of data memory array |
References Data_Memory, and u32_Data_Memory_Size.
VOID AVM2020::Assign_Inputs | ( | TConOpSys_Variant_Data * | struct_Input_Memory, |
U32 | u32_Size | ||
) |
Vertual machine cyclic assign input method.
[in] | *struct_Input_Memory | - Pointer to input memory array |
[in] | u32_Size | - Size of input memory array |
References Input, and u32_Input_Memory_Size.
VOID AVM2020::Assign_Outputs | ( | TConOpSys_Variant_Data * | struct_Output_Memory, |
U32 | u32_Size | ||
) |
Vertual machine cyclic assign output method.
[in] | *struct_Output_Memory | - Pointer to output memory array |
[in] | u32_Size | - Size of output memory array |
References Output, and u32_Output_Memory_Size.
VOID AVM2020::Assign_Parameter | ( | TConOpSys_Variant_Data * | struct_Parameter_Memory, |
U32 | u32_Size | ||
) |
Vertual machine cyclic assign parameters method.
[in] | *struct_Input_Memory | - Pointer to parameter memory array |
[in] | u32_Size | - Size of parameter memory array |
References Parameter, and u32_Parameter_Memory_Size.
VOID AVM2020::Assign_Program_Memory | ( | TConOpSys_Variant_Data * | struct_Program_Memory, |
U32 | u32_Size | ||
) |
Vertual machine cyclic assign program memory method.
[in] | *struct_Program_Memory | - Pointer to program memory array |
[in] | u32_Size | - Size of program memory array |
References Program_Memory, and u32_Program_Memory_Size.
VOID AVM2020::Done | ( | ) |
Application finalisation method.
VOID AVM2020::Execute | ( | ) |
Vertual machine cyclic execution method.
References TConOpSys_Variant_Data::bit10_Command, enum_ADD_F32, enum_CALL, enum_COPY_F32, enum_DIV_F32, enum_EQUL_F32, enum_GO_TO, enum_HALT, enum_IF_GO_TO, enum_JG_F32, enum_JGE_F32, enum_JL_F32, enum_JLE_F32, enum_MUL_F32, enum_NOT_EQUL_F32, enum_RET, enum_SUB_F32, Execute_ADD_F32(), Execute_CALL(), Execute_COPY_F32(), Execute_DIV_F32(), Execute_EQUL_F32(), Execute_GO_TO(), Execute_HALT(), Execute_IF_GO_TO(), Execute_JG_F32(), Execute_JGE_F32(), Execute_JL_F32(), Execute_JLE_F32(), Execute_MUL_F32(), Execute_NOT_EQUL_F32(), Execute_RET(), Execute_SUB_F32(), Program_Memory, u32_Program_Counter, and u32_Program_Counter_Offset.
VOID AVM2020::Execute_ADD_F32 | ( | ) |
References TConOpSys_Variant_Data::f32_Value, Load_Operand_1(), Load_Operand_2(), Store_Result(), struct_Operand_1_Value, struct_Operand_2_Value, and struct_Result_Value.
Referenced by Execute().
VOID AVM2020::Execute_CALL | ( | ) |
References Increment_Saturated(), Load_Operand_1(), struct_Operand_1_Value, struct_Stack, u32_Program_Counter, u32_Stack_Pointer, and TConOpSys_Variant_Data::u32_Value.
Referenced by Execute().
VOID AVM2020::Execute_COPY_F32 | ( | ) |
References TConOpSys_Variant_Data::f32_Value, Load_Operand_1(), Store_Result(), struct_Operand_1_Value, and struct_Result_Value.
Referenced by Execute().
VOID AVM2020::Execute_DIV_F32 | ( | ) |
References TConOpSys_Variant_Data::f32_Value, Load_Operand_1(), Load_Operand_2(), Store_Result(), struct_Operand_1_Value, struct_Operand_2_Value, and struct_Result_Value.
Referenced by Execute().
VOID AVM2020::Execute_EQUL_F32 | ( | ) |
References TConOpSys_Variant_Data::bool_Value, TConOpSys_Variant_Data::f32_Value, Load_Operand_1(), Load_Operand_2(), Store_Result(), struct_Operand_1_Value, struct_Operand_2_Value, and struct_Result_Value.
Referenced by Execute().
VOID AVM2020::Execute_GO_TO | ( | ) |
References Load_Operand_1(), struct_Operand_1_Value, u32_Program_Counter, and TConOpSys_Variant_Data::u32_Value.
Referenced by Execute().
VOID AVM2020::Execute_IF_GO_TO | ( | ) |
References TConOpSys_Variant_Data::bool_Value, Load_Operand_1(), Load_Operand_2(), struct_Operand_1_Value, struct_Operand_2_Value, u32_Program_Counter, and TConOpSys_Variant_Data::u32_Value.
Referenced by Execute().
VOID AVM2020::Execute_JG_F32 | ( | ) |
References TConOpSys_Variant_Data::bool_Value, TConOpSys_Variant_Data::f32_Value, Load_Operand_1(), Load_Operand_2(), Store_Result(), struct_Operand_1_Value, struct_Operand_2_Value, and struct_Result_Value.
Referenced by Execute().
VOID AVM2020::Execute_JGE_F32 | ( | ) |
References TConOpSys_Variant_Data::bool_Value, TConOpSys_Variant_Data::f32_Value, Load_Operand_1(), Load_Operand_2(), Store_Result(), struct_Operand_1_Value, struct_Operand_2_Value, and struct_Result_Value.
Referenced by Execute().
VOID AVM2020::Execute_JL_F32 | ( | ) |
References TConOpSys_Variant_Data::bool_Value, TConOpSys_Variant_Data::f32_Value, Load_Operand_1(), Load_Operand_2(), Store_Result(), struct_Operand_1_Value, struct_Operand_2_Value, and struct_Result_Value.
Referenced by Execute().
VOID AVM2020::Execute_JLE_F32 | ( | ) |
References TConOpSys_Variant_Data::bool_Value, TConOpSys_Variant_Data::f32_Value, Load_Operand_1(), Load_Operand_2(), Store_Result(), struct_Operand_1_Value, struct_Operand_2_Value, and struct_Result_Value.
Referenced by Execute().
VOID AVM2020::Execute_MUL_F32 | ( | ) |
References TConOpSys_Variant_Data::f32_Value, Load_Operand_1(), Load_Operand_2(), Store_Result(), struct_Operand_1_Value, struct_Operand_2_Value, and struct_Result_Value.
Referenced by Execute().
VOID AVM2020::Execute_NOT_EQUL_F32 | ( | ) |
References TConOpSys_Variant_Data::bool_Value, TConOpSys_Variant_Data::f32_Value, Load_Operand_1(), Load_Operand_2(), Store_Result(), struct_Operand_1_Value, struct_Operand_2_Value, and struct_Result_Value.
Referenced by Execute().
VOID AVM2020::Execute_RET | ( | ) |
References Decrement_Saturated(), struct_Stack, u32_Program_Counter, u32_Stack_Pointer, and TConOpSys_Variant_Data::u32_Value.
Referenced by Execute().
VOID AVM2020::Execute_SUB_F32 | ( | ) |
References TConOpSys_Variant_Data::f32_Value, Load_Operand_1(), Load_Operand_2(), Store_Result(), struct_Operand_1_Value, struct_Operand_2_Value, and struct_Result_Value.
Referenced by Execute().
VOID AVM2020::Init | ( | ) |
Application initialisation method.
References u32_Program_Counter, u32_Program_Counter_Offset, and u32_Stack_Pointer.
VOID AVM2020::Load_Operand_1 | ( | ) |
References TConOpSys_Variant_Data::bit2_Operand_1_Type, Data_Memory, enum_Immidiate_Data_Type, enum_Input_Data_Type, enum_Memory_Data_Type, enum_Parameter_Data_Type, Input, Parameter, Program_Memory, struct_Operand_1_Value, TConOpSys_Variant_Data::struct_VM_Command, TConOpSys_Variant_Data::u16_Operand_1_Index, u32_Program_Counter, and u32_Program_Counter_Offset.
Referenced by Execute_ADD_F32(), Execute_CALL(), Execute_COPY_F32(), Execute_DIV_F32(), Execute_EQUL_F32(), Execute_GO_TO(), Execute_IF_GO_TO(), Execute_JG_F32(), Execute_JGE_F32(), Execute_JL_F32(), Execute_JLE_F32(), Execute_MUL_F32(), Execute_NOT_EQUL_F32(), and Execute_SUB_F32().
VOID AVM2020::Load_Operand_2 | ( | ) |
References TConOpSys_Variant_Data::bit2_Operand_2_Type, Data_Memory, enum_Immidiate_Data_Type, enum_Input_Data_Type, enum_Memory_Data_Type, enum_Parameter_Data_Type, Input, Parameter, Program_Memory, struct_Operand_2_Value, TConOpSys_Variant_Data::struct_VM_Command, TConOpSys_Variant_Data::u16_Operand_2_Index, u32_Program_Counter, and u32_Program_Counter_Offset.
Referenced by Execute_ADD_F32(), Execute_DIV_F32(), Execute_EQUL_F32(), Execute_IF_GO_TO(), Execute_JG_F32(), Execute_JGE_F32(), Execute_JL_F32(), Execute_JLE_F32(), Execute_MUL_F32(), Execute_NOT_EQUL_F32(), and Execute_SUB_F32().
VOID AVM2020::Store_Result | ( | ) |
References TConOpSys_Variant_Data::bit2_Result_Type, Data_Memory, enum_Memory_Data_Type, enum_Output_Data_Type, enum_Parameter_Data_Type, Output, Parameter, Program_Memory, struct_Result_Value, TConOpSys_Variant_Data::struct_VM_Command, TConOpSys_Variant_Data::u16_Result_Index, and u32_Program_Counter.
Referenced by Execute_ADD_F32(), Execute_COPY_F32(), Execute_DIV_F32(), Execute_EQUL_F32(), Execute_JG_F32(), Execute_JGE_F32(), Execute_JL_F32(), Execute_JLE_F32(), Execute_MUL_F32(), Execute_NOT_EQUL_F32(), and Execute_SUB_F32().
|
private |
Pointer to the data memory.
Referenced by Assign_Data_Memory(), AVM2020(), Load_Operand_1(), Load_Operand_2(), and Store_Result().
|
private |
Pointer to the input memory.
Referenced by Assign_Inputs(), AVM2020(), Load_Operand_1(), and Load_Operand_2().
|
private |
Pointer to the output memory.
Referenced by Assign_Outputs(), AVM2020(), and Store_Result().
|
private |
Pointer to the parameter data memory.
Referenced by Assign_Parameter(), AVM2020(), Load_Operand_1(), Load_Operand_2(), and Store_Result().
|
private |
Pointer to the program code memory.
Referenced by Assign_Program_Memory(), AVM2020(), Execute(), Load_Operand_1(), Load_Operand_2(), and Store_Result().
|
private |
Operand 1 value.
Referenced by Execute_ADD_F32(), Execute_CALL(), Execute_COPY_F32(), Execute_DIV_F32(), Execute_EQUL_F32(), Execute_GO_TO(), Execute_IF_GO_TO(), Execute_JG_F32(), Execute_JGE_F32(), Execute_JL_F32(), Execute_JLE_F32(), Execute_MUL_F32(), Execute_NOT_EQUL_F32(), Execute_SUB_F32(), and Load_Operand_1().
|
private |
Operand 2 value.
Referenced by Execute_ADD_F32(), Execute_DIV_F32(), Execute_EQUL_F32(), Execute_IF_GO_TO(), Execute_JG_F32(), Execute_JGE_F32(), Execute_JL_F32(), Execute_JLE_F32(), Execute_MUL_F32(), Execute_NOT_EQUL_F32(), Execute_SUB_F32(), and Load_Operand_2().
|
private |
Result value.
Referenced by Execute_ADD_F32(), Execute_COPY_F32(), Execute_DIV_F32(), Execute_EQUL_F32(), Execute_JG_F32(), Execute_JGE_F32(), Execute_JL_F32(), Execute_JLE_F32(), Execute_MUL_F32(), Execute_NOT_EQUL_F32(), Execute_SUB_F32(), and Store_Result().
|
private |
Stack.
Referenced by Execute_CALL(), and Execute_RET().
|
private |
Data memory size.
Referenced by Assign_Data_Memory().
|
private |
Input memory size.
Referenced by Assign_Inputs().
|
private |
Output memory size.
Referenced by Assign_Outputs().
|
private |
Parameter data memory size.
Referenced by Assign_Parameter().
|
private |
Program counter.
Referenced by AVM2020(), Execute(), Execute_CALL(), Execute_GO_TO(), Execute_IF_GO_TO(), Execute_RET(), Init(), Load_Operand_1(), Load_Operand_2(), and Store_Result().
|
private |
Programm counter immediate data offset.
Referenced by AVM2020(), Execute(), Init(), Load_Operand_1(), and Load_Operand_2().
|
private |
Program code memory size.
Referenced by Assign_Program_Memory().
|
private |
Stack pointer.
Referenced by AVM2020(), Execute_CALL(), Execute_RET(), and Init().