CIRCT 24.0.0git
Loading...
Searching...
No Matches
test_codegen.cpp File Reference
#include "test_codegen/CallServiceCallback.h"
#include "test_codegen/CallbackWindowedList.h"
#include "test_codegen/ChannelMultiBurstListRead.h"
#include "test_codegen/ChannelMultiBurstListWrite.h"
#include "test_codegen/ChannelNarrowCountListWrite.h"
#include "test_codegen/ChannelWindowedListRead.h"
#include "test_codegen/ChannelWindowedListWrite.h"
#include "test_codegen/CustomServiceDeclChannel.h"
#include "test_codegen/IndexedFuncGroup.h"
#include "test_codegen/MmioReadWrite.h"
#include "test_codegen/TelemetryMetric.h"
#include "test_codegen/TypedFuncArrayResult.h"
#include "test_codegen/TypedFuncMultiArg.h"
#include "test_codegen/TypedFuncNestedStruct.h"
#include "test_codegen/TypedFuncStruct.h"
#include "test_codegen/TypedFuncSubByteSigned.h"
#include "test_codegen/TypedFuncVoidArg.h"
#include "test_codegen/TypedFuncVoidResult.h"
#include "test_codegen/TypedFuncWindowedList.h"
#include "test_codegen/TypedReadChannelStruct.h"
#include "test_codegen/TypedWriteChannelByte.h"
#include "probe_runner.h"
#include "esi/Accelerator.h"
#include "esi/Manifest.h"
#include "esi/Services.h"
#include "esi/TypedPorts.h"
#include <atomic>
#include <chrono>
#include <cstdint>
#include <iostream>
#include <map>
#include <mutex>
#include <stdexcept>
#include <string>
#include <thread>
#include <vector>
Include dependency graph for test_codegen.cpp:

Go to the source code of this file.

Functions

static esi::HWModule * findInst (Accelerator *accel, const char *appidName)
static int runTypedFuncMultiArg (Accelerator *accel)
static int runTypedFuncVoidArg (Accelerator *accel)
static int runTypedFuncVoidResult (Accelerator *accel)
static int runCallServiceCallback (Accelerator *accel)
static int runTypedReadChannelStruct (Accelerator *accel)
static int runTypedWriteChannelByte (Accelerator *accel)
static int runMmioReadWrite (Accelerator *accel)
static int runTelemetryMetric (Accelerator *accel)
static int runIndexedFuncGroup (Accelerator *accel)
static int runCustomServiceDeclChannel (Accelerator *accel, uint32_t idx)
static int runCustomServiceDeclChannel0 (Accelerator *accel)
static int runCustomServiceDeclChannel1 (Accelerator *accel)
static int runTypedFuncStruct (Accelerator *accel)
static int runTypedFuncNestedStruct (Accelerator *accel)
static int runTypedFuncSubByteSigned (Accelerator *accel)
static int runTypedFuncArrayResult (Accelerator *accel)
static int runTypedFuncWindowedList (Accelerator *accel)
static int runChannelWindowedListRead (Accelerator *accel)
static int runChannelMultiBurstListRead (Accelerator *accel)
static int runChannelWindowedListWrite (Accelerator *accel)
static int runChannelMultiBurstListWrite (Accelerator *accel)
static int runChannelNarrowCountListWrite (Accelerator *accel)
static int runCallbackWindowedList (Accelerator *accel)
 ESI_PROBE_REGISTRY ("test-codegen", "Per-port-kind coverage tests for ESI runtime + facade codegen. " "Run a single probe with --probe NAME or run all probes (in registry " "order) by omitting the flag.", {"typed_func_multi_arg", &runTypedFuncMultiArg}, {"typed_func_void_arg", &runTypedFuncVoidArg}, {"typed_func_void_result", &runTypedFuncVoidResult}, {"call_service_callback", &runCallServiceCallback}, {"typed_read_channel_struct", &runTypedReadChannelStruct}, {"typed_write_channel_byte", &runTypedWriteChannelByte}, {"mmio_read_write", &runMmioReadWrite}, {"telemetry_metric", &runTelemetryMetric}, {"indexed_func_group", &runIndexedFuncGroup}, {"custom_service_decl_channel_0", &runCustomServiceDeclChannel0}, {"custom_service_decl_channel_1", &runCustomServiceDeclChannel1}, {"typed_func_struct", &runTypedFuncStruct}, {"typed_func_nested_struct", &runTypedFuncNestedStruct}, {"typed_func_subbyte_signed", &runTypedFuncSubByteSigned}, {"typed_func_array_result", &runTypedFuncArrayResult}, {"typed_func_windowed_list", &runTypedFuncWindowedList}, {"channel_windowed_list_read", &runChannelWindowedListRead}, {"channel_multiburst_list_read", &runChannelMultiBurstListRead}, {"channel_windowed_list_write", &runChannelWindowedListWrite}, {"channel_multiburst_list_write", &runChannelMultiBurstListWrite}, {"channel_narrow_count_list_write", &runChannelNarrowCountListWrite}, {"callback_windowed_list", &runCallbackWindowedList},)

Function Documentation

◆ ESI_PROBE_REGISTRY()

ESI_PROBE_REGISTRY ( "test-codegen" ,
"Per-port-kind coverage tests for ESI runtime + facade codegen. " "Run a single probe with --probe NAME or run all probes (in registry " "order) by omitting the flag." ,
{"typed_func_multi_arg", &runTypedFuncMultiArg} ,
{"typed_func_void_arg", &runTypedFuncVoidArg} ,
{"typed_func_void_result", &runTypedFuncVoidResult} ,
{"call_service_callback", &runCallServiceCallback} ,
{"typed_read_channel_struct", &runTypedReadChannelStruct} ,
{"typed_write_channel_byte", &runTypedWriteChannelByte} ,
{"mmio_read_write", &runMmioReadWrite} ,
{"telemetry_metric", &runTelemetryMetric} ,
{"indexed_func_group", &runIndexedFuncGroup} ,
{"custom_service_decl_channel_0", &runCustomServiceDeclChannel0} ,
{"custom_service_decl_channel_1", &runCustomServiceDeclChannel1} ,
{"typed_func_struct", &runTypedFuncStruct} ,
{"typed_func_nested_struct", &runTypedFuncNestedStruct} ,
{"typed_func_subbyte_signed", &runTypedFuncSubByteSigned} ,
{"typed_func_array_result", &runTypedFuncArrayResult} ,
{"typed_func_windowed_list", &runTypedFuncWindowedList} ,
{"channel_windowed_list_read", &runChannelWindowedListRead} ,
{"channel_multiburst_list_read", &runChannelMultiBurstListRead} ,
{"channel_windowed_list_write", &runChannelWindowedListWrite} ,
{"channel_multiburst_list_write", &runChannelMultiBurstListWrite} ,
{"channel_narrow_count_list_write", &runChannelNarrowCountListWrite} ,
{"callback_windowed_list", &runCallbackWindowedList}  )

◆ findInst()

◆ runCallbackWindowedList()

int runCallbackWindowedList ( Accelerator * accel)
static

Definition at line 701 of file test_codegen.cpp.

References findInst(), and esi::toHex().

◆ runCallServiceCallback()

int runCallServiceCallback ( Accelerator * accel)
static

Definition at line 114 of file test_codegen.cpp.

References findInst(), and esi::toHex().

◆ runChannelMultiBurstListRead()

int runChannelMultiBurstListRead ( Accelerator * accel)
static

Definition at line 528 of file test_codegen.cpp.

References findInst(), and esi::toHex().

◆ runChannelMultiBurstListWrite()

int runChannelMultiBurstListWrite ( Accelerator * accel)
static

Definition at line 615 of file test_codegen.cpp.

References findInst(), and esi::toHex().

◆ runChannelNarrowCountListWrite()

int runChannelNarrowCountListWrite ( Accelerator * accel)
static

Definition at line 661 of file test_codegen.cpp.

References findInst(), and esi::toHex().

◆ runChannelWindowedListRead()

int runChannelWindowedListRead ( Accelerator * accel)
static

Definition at line 482 of file test_codegen.cpp.

References findInst(), and esi::toHex().

◆ runChannelWindowedListWrite()

int runChannelWindowedListWrite ( Accelerator * accel)
static

Definition at line 576 of file test_codegen.cpp.

References findInst(), and esi::toHex().

◆ runCustomServiceDeclChannel()

◆ runCustomServiceDeclChannel0()

int runCustomServiceDeclChannel0 ( Accelerator * accel)
static

Definition at line 331 of file test_codegen.cpp.

References runCustomServiceDeclChannel().

◆ runCustomServiceDeclChannel1()

int runCustomServiceDeclChannel1 ( Accelerator * accel)
static

Definition at line 335 of file test_codegen.cpp.

References runCustomServiceDeclChannel().

◆ runIndexedFuncGroup()

int runIndexedFuncGroup ( Accelerator * accel)
static

Definition at line 270 of file test_codegen.cpp.

References findInst().

◆ runMmioReadWrite()

int runMmioReadWrite ( Accelerator * accel)
static

Definition at line 230 of file test_codegen.cpp.

References findInst(), and esi::toHex().

◆ runTelemetryMetric()

int runTelemetryMetric ( Accelerator * accel)
static

Definition at line 249 of file test_codegen.cpp.

References findInst().

◆ runTypedFuncArrayResult()

int runTypedFuncArrayResult ( Accelerator * accel)
static

Definition at line 420 of file test_codegen.cpp.

References findInst().

◆ runTypedFuncMultiArg()

int runTypedFuncMultiArg ( Accelerator * accel)
static

Definition at line 65 of file test_codegen.cpp.

References findInst().

Referenced by ESI_PROBE_REGISTRY().

◆ runTypedFuncNestedStruct()

int runTypedFuncNestedStruct ( Accelerator * accel)
static

Definition at line 363 of file test_codegen.cpp.

References findInst().

◆ runTypedFuncStruct()

int runTypedFuncStruct ( Accelerator * accel)
static

Definition at line 343 of file test_codegen.cpp.

References findInst().

◆ runTypedFuncSubByteSigned()

int runTypedFuncSubByteSigned ( Accelerator * accel)
static

Definition at line 400 of file test_codegen.cpp.

References findInst().

◆ runTypedFuncVoidArg()

int runTypedFuncVoidArg ( Accelerator * accel)
static

Definition at line 83 of file test_codegen.cpp.

References findInst(), and esi::toHex().

◆ runTypedFuncVoidResult()

int runTypedFuncVoidResult ( Accelerator * accel)
static

Definition at line 98 of file test_codegen.cpp.

References findInst().

◆ runTypedFuncWindowedList()

int runTypedFuncWindowedList ( Accelerator * accel)
static

Definition at line 445 of file test_codegen.cpp.

References findInst().

◆ runTypedReadChannelStruct()

int runTypedReadChannelStruct ( Accelerator * accel)
static

Definition at line 160 of file test_codegen.cpp.

References findInst().

◆ runTypedWriteChannelByte()

int runTypedWriteChannelByte ( Accelerator * accel)
static

Definition at line 190 of file test_codegen.cpp.

References findInst(), and esi::toHex().