paceval. 4.26
Documentation of the paceval. source-code, Copyright ©1994-2024. Version 1.x, 2.x, 3.x, 4.x ©1994-2025 Joerg Koenning & paceval UG [Registered Trade Mark] All rights reserved., Author(s) : Joerg Koenning
Loading...
Searching...
No Matches
Macros | Functions
paceval_fFPGAHandling.cpp File Reference

implementation of the main routines for handling paceval in hardware, in particular via an FPGA implementation (annotation: the source code of paceval_fFPGAHandling.cpp can be given to customers to perform specialized handling of the hardware) More...

#include <time.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "./inc/paceval_fFPGAHandling.h"
Include dependency graph for paceval_fFPGAHandling.cpp:

Macros

#define max(__a, __b)   (((__a) > (__b)) ? (__a) : (__b))
 

Functions

__int64 paceval_cComputation_getIDfromPACEVAL_HANDLE (const PACEVAL_HANDLE handle_pacevalComputation_in)
 
unsigned long paceval_cComputation_getNodeData (const PACEVAL_HANDLE handle_pacevalComputation_in, const unsigned long positionNode_in, long *maxValueFields_out, paceval_sFPGANodeData *handle_nodeDataStruct_out, paceval_sFPGANodeCacheStatusForStacks *handle_nodeDataCacheStatusStructs_out)
 
bool paceval_cComputation_setFPGAMemoryAllocation (const PACEVAL_HANDLE handle_pacevalComputation_in, void *pointerToFPGAMemory_in)
 
void * paceval_cComputation_getFPGAMemoryAllocation (const PACEVAL_HANDLE handle_pacevalComputation_in)
 
void paceval_activityStart_FPGA_CreateComputation (const PACEVAL_HANDLE handle_pacevalComputation_in, const unsigned long functionLengthString_in, const unsigned long numberOfVariables_in, const bool useInterval_in)
 
bool paceval_activityEnd_FPGA_CreateComputation (const PACEVAL_HANDLE handle_pacevalComputation_in, const unsigned long functionLengthString_in, const unsigned long numberOfVariables_in, const bool useInterval_in, const bool success_in, const unsigned long numberOfNodes_in, const unsigned long numberOfStacks_in)
 
bool paceval_activityStart_FPGA_GetComputationResult (const PACEVAL_HANDLE handle_pacevalComputation_in, const paceval_eCalculationPrecisionTypes useCalculationPrecision_in, const unsigned long stackNumber_in)
 
bool paceval_activityMain_FPGA_DoComputation (const PACEVAL_HANDLE handle_pacevalComputation_in, const unsigned char computationCircle_in, paceval_eCalculationPrecisionTypes useCalculationPrecision_in, const unsigned long stackNumber_in, const void *variablesValues_in, double *resultAsDouble_out, float *resultAsFloat_out, paceval_eErrorTypes *errorType_out, unsigned long *errorNodePosition_out)
 
void paceval_activityMain_FPGA_ResetCachedNodeData (const PACEVAL_HANDLE handle_pacevalComputation_in, const unsigned long stackNumber_in)
 
void paceval_activityEnd_FPGA_GetComputationResult (const PACEVAL_HANDLE handle_pacevalComputation_in, const paceval_eCalculationPrecisionTypes useCalculationPrecision_in, const unsigned long stackNumber_in, const bool validResultStandard_in, const void *resultStandard_in, const bool validResultFPGA_in, const void *resultFPGA_in)
 
void paceval_activityStart_FPGA_DeleteComputation (const PACEVAL_HANDLE handle_pacevalComputation_in)
 

Detailed Description

implementation of the main routines for handling paceval in hardware, in particular via an FPGA implementation (annotation: the source code of paceval_fFPGAHandling.cpp can be given to customers to perform specialized handling of the hardware)

Macro Definition Documentation

◆ max

#define max ( __a,
__b )   (((__a) > (__b)) ? (__a) : (__b))

Function Documentation

◆ paceval_activityEnd_FPGA_CreateComputation()

bool paceval_activityEnd_FPGA_CreateComputation ( const PACEVAL_HANDLE handle_pacevalComputation_in,
const unsigned long functionLengthString_in,
const unsigned long numberOfVariables_in,
const bool useInterval_in,
const bool success_in,
const unsigned long numberOfNodes_in,
const unsigned long numberOfStacks_in )

this C function is called when a paceval computation object has been created via the paceval library

Parameters
handle_pacevalComputation_inthe pointer to the paceval computation object managed in the paceval library
functionLengthString_inthe length of the function that is processed via the paceval library
numberOfVariables_inthe number of variables of the function
useInterval_inshould interval arithmetic be used (true) or not (false)
success_inthe creation of the paceval computation object via the paceval library was successful (true) or not (false)
numberOfNodes_inthe number of nodes of the paceval computation object
numberOfStacks_inthe maximum number of stacks required for the calculations
Here is the call graph for this function:
Here is the caller graph for this function:

◆ paceval_activityEnd_FPGA_GetComputationResult()

void paceval_activityEnd_FPGA_GetComputationResult ( const PACEVAL_HANDLE handle_pacevalComputation_in,
const paceval_eCalculationPrecisionTypes useCalculationPrecision_in,
const unsigned long stackNumber_in,
const bool validResultStandard_in,
const void * resultStandard_in,
const bool validResultFPGA_in,
const void * resultFPGA_in )

this C function is called when a calculation has been performed on a paceval computation object via the paceval library

Parameters
handle_pacevalComputation_inthe pointer to the paceval computation object managed in the paceval library
useCalculationPrecision_inthe precision (float or double) with which the calculation should be performed
stackNumber_inthe stack on which the calculation is to be performed
validResultStandard_inindicates whether the result of the standard calculation is valid
resultStandard_inthe result of the standard calculation (float or double depending on useCalculationPrecision_in)
validResultFPGA_inindicates whether the result of the calculation via the FPGA is valid (see especially paceval_activityMain_FPGA_DoComputation())
resultFPGA_inthe result of the calculation via the FPGA (float or double depending on useCalculationPrecision_in)
Here is the caller graph for this function:

◆ paceval_activityMain_FPGA_DoComputation()

bool paceval_activityMain_FPGA_DoComputation ( const PACEVAL_HANDLE handle_pacevalComputation_in,
const unsigned char computationCircle_in,
paceval_eCalculationPrecisionTypes useCalculationPrecision_in,
const unsigned long stackNumber_in,
const void * variablesValues_in,
double * resultAsDouble_out,
float * resultAsFloat_out,
paceval_eErrorTypes * errorType_out,
unsigned long * errorNodePosition_out )

This C function is responsible for processing the mathematical calculation on the FPGA

Parameters
handle_pacevalComputation_inthe pointer to the paceval computation object managed in the paceval library
useCalculationPrecision_inthe precision (float or double) with which the calculation should be performed
stackNumber_inthe stack on which the calculation is to be performed
variablesValues_inthe pointer to the values for the variables (float or double depending on useCalculationPrecision_in)
resultAsDouble_outthe placeholder for the result of the calculation as a double if everything worked
resultAsFloat_outthe placeholder for the result of the calculation as a float if everything worked
errorType_outin case of error, the type of error that occurred (see paceval_eErrorTypes in paceval_main.h)
errorNodePosition_outin case of an error, the position of the error that occurred (can be used to report to the user by the paceval library)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ paceval_activityMain_FPGA_ResetCachedNodeData()

void paceval_activityMain_FPGA_ResetCachedNodeData ( const PACEVAL_HANDLE handle_pacevalComputation_in,
const unsigned long stackNumber_in )

this C function is responsible for resetting the invalid cache in case of an abort or error in paceval_activityMain_FPGA_DoComputation() (annotation: this does not affect the cache for constant values)

Parameters
handle_pacevalComputation_inthe pointer to the paceval computation object managed in the paceval library
stackNumber_inthe stack on which the calculation is to be performed
Here is the call graph for this function:
Here is the caller graph for this function:

◆ paceval_activityStart_FPGA_CreateComputation()

void paceval_activityStart_FPGA_CreateComputation ( const PACEVAL_HANDLE handle_pacevalComputation_in,
const unsigned long functionLengthString_in,
const unsigned long numberOfVariables_in,
const bool useInterval_in )

this C function is called when a paceval computation object is created via the paceval library

Parameters
handle_pacevalComputation_inthe pointer to the paceval computation object managed in the paceval library
functionLengthString_inthe length of the function that is processed via the paceval library
numberOfVariables_inthe number of variables of the function
useInterval_inshould interval arithmetic be used (true) or not (false)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ paceval_activityStart_FPGA_DeleteComputation()

void paceval_activityStart_FPGA_DeleteComputation ( const PACEVAL_HANDLE handle_pacevalComputation_in)

this C function is called when a paceval computation object is deleted via the paceval library (annotation: in particular all allocated memory must be released)

Parameters
handle_pacevalComputation_inthe pointer to the paceval computation object managed in the paceval library
Here is the call graph for this function:
Here is the caller graph for this function:

◆ paceval_activityStart_FPGA_GetComputationResult()

bool paceval_activityStart_FPGA_GetComputationResult ( const PACEVAL_HANDLE handle_pacevalComputation_in,
const paceval_eCalculationPrecisionTypes useCalculationPrecision_in,
const unsigned long stackNumber_in )

this C function is called when a calculation is to be performed on a paceval computation object via the paceval library

Parameters
handle_pacevalComputation_inthe pointer to the paceval computation object managed in the paceval library
useCalculationPrecision_inthe precision (float or double) with which the calculation should be performed
stackNumber_inthe stack on which the calculation is to be performed
Here is the caller graph for this function:

◆ paceval_cComputation_getFPGAMemoryAllocation()

void * paceval_cComputation_getFPGAMemoryAllocation ( const PACEVAL_HANDLE handle_pacevalComputation_in)

fetches an address noted in a paceval computation object to a memory location and the return value is the pointer to the saved memory location or NULL if no memory location has been saved yet

Parameters
handle_pacevalComputation_inthe pointer to the paceval computation object managed in the paceval library
Here is the caller graph for this function:

◆ paceval_cComputation_getIDfromPACEVAL_HANDLE()

__int64 paceval_cComputation_getIDfromPACEVAL_HANDLE ( const PACEVAL_HANDLE handle_pacevalComputation_in)

converts the pointer to a paceval computation object into a 64-bit number that can be used as a reference and the return value is a 64-bit number

Parameters
handle_pacevalComputation_inthe pointer to the paceval computation object managed in the paceval library
Here is the caller graph for this function:

◆ paceval_cComputation_getNodeData()

unsigned long paceval_cComputation_getNodeData ( const PACEVAL_HANDLE handle_pacevalComputation_in,
const unsigned long positionNode_in,
long * maxValueFields_out,
paceval_sFPGANodeData * handle_nodeDataStruct_out,
paceval_sFPGANodeCacheStatusForStacks * handle_nodeDataCacheStatusStructs_out )

gets a node of the linked list of a paceval computation object and the return value is the total number of nodes in the list

Parameters
handle_pacevalComputation_inthe pointer to the paceval computation object managed in the paceval library
positionNode_inthe position in the linked list of nodes to be read
maxValueFields_outthe maximum field number used in the node
handle_nodeDataStruct_outthe data structure used to fetch and hold the node contents (see paceval_cCommonData.h)
handle_nodeDataCacheStatusStructs_outthe data structure used to fetch and hold the cache contents (see paceval_cCommonData.h)
Here is the caller graph for this function:

◆ paceval_cComputation_setFPGAMemoryAllocation()

bool paceval_cComputation_setFPGAMemoryAllocation ( const PACEVAL_HANDLE handle_pacevalComputation_in,
void * pointerToFPGAMemory_in )

remembers the address of a memory location in a temporary calculation object and the return value is true if the function was successful, otherwise the return value is false

Parameters
handle_pacevalComputation_inthe pointer to the paceval computation object managed in the paceval library
pointerToFPGAMemory_inthe address of the memory location to be remembered on the paceval computation object managed in the paceval library
Here is the caller graph for this function:

https://paceval.com