|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
    6  #ifndef EFTRACKING_FPGA_INTEGRATION_F600INTEGRATIONALG_H 
    7  #define EFTRACKING_FPGA_INTEGRATION_F600INTEGRATIONALG_H 
   19  #include "GaudiKernel/ServiceHandle.h" 
   20  #include "GaudiKernel/IChronoSvc.h" 
   23 #include "xrt/xrt_bo.h" 
   24 #include "xrt/xrt_device.h" 
   25 #include "xrt/xrt_kernel.h" 
   26 #include <experimental/xrt_xclbin.h> 
   27 #include <experimental/xrt_ip.h> 
   28 #include <experimental/xrt_queue.h> 
   31 #include "CL/cl2xrt.hpp" 
   36 #define IP_START 0x1  // USER_CTRL[0] 
   37 #define IP_DONE 0x2  // USER_CTRL[1] 
   38 #define IP_IDLE 0x4  // USER_CTRL[2] 
   39 #define EVENT_COUNT_RST 0x80000000  // USER_CTRL[31] 
   41 #define USER_CTRL_OFFSET 0x10 
   42 #define EVENT_RX_COUNT_OFFSET 0x14 
   43 #define EVENT_TX_COUNT_OFFSET 0x1C 
   50          using IntegrationBase::IntegrationBase;
 
   58              "ChronoStatSvc", 
name()}; 
 
   64              "Tool for creating xAOD cluster containers"}; 
 
   67              this, 
"TestVectorTool", 
"TestVectorTool", 
"Tool for preparing test vectors"}; 
 
   70              this, 
"FPGADataFormatTool", 
"FPGADataFormatTool", 
"Tool for formatting FPGA data"}; 
 
   73              this, 
"xclbin", 
"", 
"xclbin path and name"}; 
 
   78         ToolHandle<OutputConversionTool> 
m_outputConversionTool{
this, 
"OutputConversionTool", 
"OutputConversionTool", 
"tool for output conversion"};
 
   83             this, 
"PixelClusteringKernelName", 
"", 
"Name of the pixel clustering kernel (pxl cls)"};
 
   85             this, 
"ProcessHitsKernelName", 
"", 
"Name of the strip clustering kernel (strp cls)"};
 
   87             this, 
"PixelL2gKernelName", 
"", 
"Name of the pixel L2G transformation kernel"};
 
   89             this, 
"StripL2gKernelName", 
"", 
"Name of the strip L2G transformation kernel"};
 
   91             this, 
"PixelEdmPrepKernelName", 
"", 
"Name of the pixel EDM prep kernel"};
 
   93             this, 
"StripEdmPrepKernelName", 
"", 
"Name of the strip EDM prep kernel"};
 
   97             this, 
"PixelFirstStageSlicingIPName", 
"", 
"Name of the slicing engine IP"};
 
   99             this, 
"PixelFirstStageInputKernelName", 
"", 
"Name of the input stage kernel"};
 
  101             this, 
"PixelFirstStageOutputKernelName", 
"", 
"Name of the output stage kernel"};
 
  105             this, 
"MemReadKernelName", 
"", 
"Name of the memory read kernel"};
 
  107             this, 
"MemWriteKernelName", 
"", 
"Name of the memory write kernel"};
 
  111             this, 
"SpacepointKernelName", 
"", 
"Name of the spacepoint kernel"};
 
  115             this, 
"LoaderKernelName", 
"", 
"Name of the loader kernel"};
 
  117             this, 
"UnloaderKernelName", 
"", 
"Name of the unloader kernel"};
 
  121             this, 
"NnOverlapDecoratorKernelName", 
"", 
"Name of the NN overlap decorator kernel"};
 
  125             this, 
"RunnerKernelName", 
"", 
"Name of the duplicate remover runner kernel"};
 
  129           this, 
"PixelClusterInputPath", 
"", 
"Filepath for the pixel clustering input data"};
 
  131           this, 
"PixelStageOneSlicingInputPath", 
"", 
"Filepath for the slicing engine (pixel first stage) input data"};
 
  133           this, 
"InsideOutInputPath", 
"", 
"Filepath for the inside out input data"};
 
  178         std::string 
get_cu_name(
const std::string& kernel_name, 
int cu);
 
  189  #endif // EFTRACKING_FPGA_INTEGRATION_F600INTEGRATIONALG_H 
  
std::vector< cl::Kernel > m_pixelFirstStageSlicingOutputKernels ATLAS_THREAD_SAFE
Gaudi::Property< std::string > m_pixelFirstStageOutputKernelName
The base class for the EFTracking FPGA integration development.
char data[hepevt_bytes_allocation_ATLAS]
Gaudi::Property< std::string > m_stripL2gKernelName
virtual StatusCode finalize() override final
std::vector< cl::Buffer > m_pixelClusterL2GEDMOutputBufferList ATLAS_THREAD_SAFE
Gaudi::Property< std::string > m_pixelL2gKernelName
Gaudi::Property< std::string > m_stripEdmPrepKernelName
Gaudi::Property< std::string > m_loaderKernelName
Gaudi::Property< std::string > m_insideOutInputPath
std::vector< cl::Buffer > m_pixelFirstStageSlicingOutputBufferList ATLAS_THREAD_SAFE
std::atomic< cl_ulong > m_kernelTime
Time for kernel execution.
std::mutex m_fpgaHandleMtx ATLAS_THREAD_SAFE
std::vector< cl::Event > m_insideOutOutputEndEvents ATLAS_THREAD_SAFE
Gaudi::Property< std::string > m_pixelFirstStageSlicingIPName
Gaudi::Property< std::string > m_pixelClusterInputPath
Gaudi::Property< std::string > m_unloaderKernelName
ToolHandle< FPGADataFormatTool > m_FPGADataFormatTool
Tool for formatting FPGA data.
std::atomic< cl_ulong > m_sum_kernelTime
Sum for the average time of the kernel execution.
constexpr std::size_t n_words
virtual StatusCode initialize() override final
Detect the OpenCL devices and prepare OpenCL context.
SG::ReadHandleKey< FPGATrackSimTrackCollection > m_FPGATrackKey
virtual StatusCode execute(const EventContext &ctx) const override final
Should be overriden by derived classes to perform meaningful work.
Gaudi::Property< std::string > m_pixelClusteringKernelName
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< cl::Event > m_pixelFirstStageSlicingOutputEndEvents ATLAS_THREAD_SAFE
std::string get_cu_name(const std::string &kernel_name, int cu)
ToolHandle< xAODClusterMaker > m_xaodClusterMaker
Tool for creating xAOD containers.
std::vector< cl::Buffer > m_insideOutInputBufferList ATLAS_THREAD_SAFE
Gaudi::Property< std::string > m_memReadKernelName
ToolHandle< TestVectorTool > m_testVectorTool
Tool for preparing test vectors.
Gaudi::Property< std::string > m_xclbin
Path and name of the xclbin file.
std::vector< cl::Buffer > m_insideOutOutputBufferList ATLAS_THREAD_SAFE
The class for enconding RDO to FPGA format.
Gaudi::Property< std::string > m_pixelEdmPrepKernelName
Gaudi::Property< std::string > m_processHitsKernelName
Gaudi::Property< std::string > m_memWriteKernelName
std::atomic< ulonglong > m_num_Events
Number of events for the average time of the kernel execution.
Gaudi::Property< std::string > m_runnerKernelName
std::vector< cl::Buffer > m_pixelClusterL2GInputBufferList ATLAS_THREAD_SAFE
ToolHandle< OutputConversionTool > m_outputConversionTool
void outputHexData(size_t dataLen, uint64_t *data, const std::string &dataDescriptor) const
std::vector< cl::Kernel > m_pixelFirstStageSlicingInputKernels ATLAS_THREAD_SAFE
std::vector< cl::Buffer > m_pixelFirstStageSlicingInputBufferList ATLAS_THREAD_SAFE
std::vector< xrt::ip > m_pixelFirstStageSlicingIPs ATLAS_THREAD_SAFE
std::vector< cl::Buffer > m_pixelClusterL2GOutputBufferList ATLAS_THREAD_SAFE
xrt::device m_xrt_accelerator
int readTVLength(std::string filepath) const
ServiceHandle< IChronoSvc > m_chronoSvc
Service for timing the algorithm.
Gaudi::Property< std::string > m_pixelStageOneSlicingInputPath
Gaudi::Property< std::string > m_spacepointKernelName
std::vector< cl::Kernel > m_insideOutOutputKernels ATLAS_THREAD_SAFE
std::vector< cl::Kernel > m_insideOutInputKernels ATLAS_THREAD_SAFE
std::vector< cl::Event > m_insideOutInputEndEvents ATLAS_THREAD_SAFE
std::vector< cl::Kernel > m_pixelClusterL2GKernels ATLAS_THREAD_SAFE
void readTV(const std::string &filepath, int n_words, uint64_t *data) const
Gaudi::Property< std::string > m_nnOverlapDecoratorKernelName
Gaudi::Property< std::string > m_pixelFirstStageInputKernelName
std::vector< cl::Event > m_pixelFirstStageSlicingInputEndEvents ATLAS_THREAD_SAFE