CIRCT 20.0.0git
Loading...
Searching...
No Matches
Manifest.h
Go to the documentation of this file.
1//===- Manifest.h - Metadata on the accelerator -----------------*- C++ -*-===//
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// Manifest parsing and API creation.
10//
11// DO NOT EDIT!
12// This file is distributed as part of an ESI package. The source for this file
13// should always be modified within CIRCT.
14//
15//===----------------------------------------------------------------------===//
16
17// NOLINTNEXTLINE(llvm-header-guard)
18#ifndef ESI_MANIFEST_H
19#define ESI_MANIFEST_H
20
21#include "esi/Common.h"
22#include "esi/Context.h"
23#include "esi/Types.h"
24
25#include <any>
26#include <memory>
27#include <optional>
28#include <string>
29#include <vector>
30
31namespace esi {
32
33// Forward declarations.
34class AcceleratorConnection;
35class Accelerator;
36
37/// Class to parse a manifest. It also constructs the dynamic API for the
38/// accelerator.
39class Manifest {
40public:
41 class Impl;
42
43 Manifest(const Manifest &) = delete;
44 Manifest(Context &ctxt, const std::string &jsonManifest);
46
47 uint32_t getApiVersion() const;
48 // Modules which have designer specified metadata.
49 std::vector<ModuleInfo> getModuleInfos() const;
50
51 // Build a dynamic design hierarchy from the manifest. The
52 // AcceleratorConnection owns the returned pointer so its lifetime is
53 // determined by the connection.
55
56 /// The Type Table is an ordered list of types. The offset can be used to
57 /// compactly and uniquely within a design. It does not include all of the
58 /// types in a design -- just the ones listed in the 'types' section of the
59 /// manifest.
60 const std::vector<const Type *> &getTypeTable() const;
61
62private:
64};
65
66} // namespace esi
67
68std::ostream &operator<<(std::ostream &os, const esi::AppID &id);
69std::ostream &operator<<(std::ostream &, const esi::AppIDPath &);
70std::ostream &operator<<(std::ostream &, const esi::ModuleInfo &);
71
72#endif // ESI_MANIFEST_H
std::ostream & operator<<(std::ostream &os, const esi::AppID &id)
Abstract class representing a connection to an accelerator.
Definition Accelerator.h:79
Top level accelerator class.
Definition Accelerator.h:60
AcceleratorConnections, Accelerators, and Manifests must all share a context.
Definition Context.h:31
Class to parse a manifest.
Definition Manifest.h:39
uint32_t getApiVersion() const
Accelerator * buildAccelerator(AcceleratorConnection &acc) const
const std::vector< const Type * > & getTypeTable() const
The Type Table is an ordered list of types.
Manifest(Context &ctxt, const std::string &jsonManifest)
std::vector< ModuleInfo > getModuleInfos() const
Manifest(const Manifest &)=delete
Impl * impl
Definition Manifest.h:63
Definition esi.py:1