CIRCT 22.0.0git
Loading...
Searching...
No Matches
ModelInstance.h
Go to the documentation of this file.
1//===- ModelInstance.h - Instance of a model in the ArcRuntime ------------===//
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// This declares the context for a model instance in the default implementation
10// of the ArcRuntime library.
11//
12// This file is implementation specific and not part of the ArcRuntime's API.
13//
14//===----------------------------------------------------------------------===//
15
16#ifndef CIRCT_DIALECT_ARC_RUNTIME_MODELINSTANCE_H
17#define CIRCT_DIALECT_ARC_RUNTIME_MODELINSTANCE_H
18
21
22namespace circt {
23namespace arc {
24namespace runtime {
25
27public:
28 ModelInstance() = delete;
29 ModelInstance(const ArcRuntimeModelInfo *modelInfo, const char *args,
32
33 const char *getModelName() const {
34 return !!modelInfo->modelName ? modelInfo->modelName : "<NULL>";
35 }
36
37 void onEval() { ++stepCounter; }
38
39private:
40 void parseArgs(const char *args);
41
42 const uint64_t instanceID;
45 bool verbose = false;
46
47 uint64_t stepCounter = 0;
48};
49
50} // namespace runtime
51} // namespace arc
52} // namespace circt
53
54#endif // CIRCT_DIALECT_ARC_RUNTIME_MODELINSTANCE_H
const char * getModelName() const
const ArcRuntimeModelInfo *const modelInfo
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:57
const char * modelName
Name of the compiled model.
Definition Common.h:63
Combined runtime and model state for a hardware model instance.
Definition Common.h:40