CIRCT 23.0.0git
Loading...
Searching...
No Matches
JITBind.h
Go to the documentation of this file.
1//===- JITBind.h - ArcRuntime JIT symbol binding helper -------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Declares the helper struct used to bind the IR interface to the MLIR
10// Execution Engine without relying on the linker.
11//
12// This file is specific to the runtime implementation statically linked into
13// the arcilator tool and not part of the runtime's API.
14//
15//===----------------------------------------------------------------------===//
16
17#ifndef CIRCT_DIALECT_ARC_RUNTIME_JITBIND_H
18#define CIRCT_DIALECT_ARC_RUNTIME_JITBIND_H
19
21
22namespace circt {
23namespace arc {
24namespace runtime {
25
26// Forward-declare.
27struct FmtDescriptor;
28
30 uint8_t *(*fnAllocInstance)(const ArcRuntimeModelInfo *model,
31 const char *args);
32 void (*fnDeleteInstance)(uint8_t *simState);
33 void (*fnOnEval)(uint8_t *simState);
34 void (*fnOnInitialized)(uint8_t *simState);
35 void (*fnFormat)(const FmtDescriptor *fmt, ...);
36 uint64_t *(*fnSwapTraceBuffer)(const uint8_t *simState);
37
38 static constexpr char symNameAllocInstance[] = "arcRuntimeIR_allocInstance";
39 static constexpr char symNameDeleteInstance[] = "arcRuntimeIR_deleteInstance";
40 static constexpr char symNameOnEval[] = "arcRuntimeIR_onEval";
41 static constexpr char symNameOnInitialized[] = "arcRuntimeIR_onInitialized";
42 static constexpr char symNameFormat[] = "arcRuntimeIR_format";
43 static constexpr char symNameSwapTraceBuffer[] =
44 "arcRuntimeIR_swapTraceBuffer";
45};
46
47#ifdef ARC_RUNTIME_JITBIND_FNDECL
48const APICallbacks &getArcRuntimeAPICallbacks();
49#endif // ARC_RUNTIME_JITBIND_FNDECL
50
51} // namespace runtime
52} // namespace arc
53} // namespace circt
54
55#endif // CIRCT_DIALECT_ARC_RUNTIME_JITBIND_H
Definition arc.py:1
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Static information for a compiled hardware model, generated by the MLIR lowering.
Definition Common.h:70
void(* fnOnInitialized)(uint8_t *simState)
Definition JITBind.h:34
static constexpr char symNameOnEval[]
Definition JITBind.h:40
static constexpr char symNameAllocInstance[]
Definition JITBind.h:38
static constexpr char symNameDeleteInstance[]
Definition JITBind.h:39
static constexpr char symNameFormat[]
Definition JITBind.h:42
static constexpr char symNameOnInitialized[]
Definition JITBind.h:41
static constexpr char symNameSwapTraceBuffer[]
Definition JITBind.h:43
void(* fnOnEval)(uint8_t *simState)
Definition JITBind.h:33
void(* fnFormat)(const FmtDescriptor *fmt,...)
Definition JITBind.h:35
void(* fnDeleteInstance)(uint8_t *simState)
Definition JITBind.h:32
A format descriptor, to be given to arcRuntimeFormat.