|
CIRCT 23.0.0git
|
Namespaces | |
| namespace | backends |
| namespace | cosim |
| namespace | detail |
| namespace | registry |
| namespace | services |
| namespace | utils |
Classes | |
| class | Accelerator |
| Top level accelerator class. More... | |
| class | AcceleratorConnection |
| Abstract class representing a connection to an accelerator. More... | |
| class | AcceleratorMismatchError |
| class | AcceleratorServiceThread |
| Background thread which services various requests. More... | |
| class | AnyType |
| The "any" type is a special type which can be used to represent any type, as identified by the type id. More... | |
| struct | AppID |
| class | AppIDPath |
| class | ArrayType |
| Arrays have a compile time specified (static) size and an element type. More... | |
| class | BitsType |
| Bits are just an array of bits. More... | |
| class | BitVector |
| A lightweight, non-owning bit vector view backed by a byte array span. More... | |
| class | BitVectorType |
| Bit vectors include signed, unsigned, and signless integers. More... | |
| class | BundleEngineMap |
| Since engines can support multiple channels BUT not necessarily all of the channels in a bundle, a mapping from bundle channels to engines is needed. More... | |
| class | BundlePort |
| Services provide connections to 'bundles' – collections of named, unidirectional communication channels. More... | |
| class | BundleType |
| Bundles represent a collection of channels. More... | |
| struct | ChannelAssignment |
| Details about how to connect to a particular channel. More... | |
| class | ChannelPort |
| Unidirectional channels are the basic communication primitive between the host and accelerator. More... | |
| class | ChannelSignaling |
| class | ChannelType |
| Channels are the basic communication primitives. More... | |
| class | CliParser |
| Common options and code for ESI runtime tools. More... | |
| class | ConsoleLogger |
| A logger that writes to the console. Includes color support. More... | |
| struct | Constant |
| class | Context |
| AcceleratorConnections, Accelerators, and Manifests must all share a context. More... | |
| class | Engine |
| Engines implement the actual channel communication between the host and the accelerator. More... | |
| class | ESIPureModuleOp |
| struct | has_esi_id |
| struct | has_esi_id< T, std::void_t< decltype(T::_ESI_ID)> > |
| struct | has_esi_window_id |
| struct | has_esi_window_id< T, std::void_t< decltype(T::_ESI_WINDOW_ID)> > |
| struct | HWClientDetail |
| A description of a hardware client. More... | |
| class | HWModule |
| Represents either the top level or an instance of a hardware module. More... | |
| class | IndexedPorts |
| class | Instance |
Subclass of HWModule which represents a submodule instance. More... | |
| class | Int |
| class | IntegerType |
| Integers are bit vectors which may be signed or unsigned and are interpreted as numbers. More... | |
| struct | is_std_array |
| struct | is_std_array< std::array< T, N > > |
| class | ListType |
| Lists represent variable-length sequences of elements of a single type. More... | |
| class | Logger |
| class | Manifest |
| Class to parse a manifest. More... | |
| class | MessageData |
| A concrete flat message backed by a single vector of bytes. More... | |
| struct | ModuleInfo |
| class | MutableBitVector |
| A mutable bit vector that owns its underlying storage. More... | |
| class | NullLogger |
| A logger that does nothing. More... | |
| class | QueuedDecodeTypeDeserializer |
| Helper base class for stateful deserializers which may emit zero, one, or many typed outputs for each raw input message. More... | |
| class | RandomAccessMemoryDeclOp |
| class | ReadChannelPort |
| A ChannelPort which reads data from the accelerator. More... | |
| class | RequestConnectionOp |
| struct | Segment |
| A contiguous, non-owning view of bytes within a SegmentedMessageData. More... | |
| class | SegmentedMessageData |
| Abstract multi-segment message. More... | |
| class | SegmentedMessageDataCursor |
| Cursor for incremental consumption of a SegmentedMessageData. More... | |
| class | SerialListTypeDeserializer |
| Reusable serial-list window deserializer. More... | |
| struct | ServicePortDesc |
| A description of a service port. More... | |
| class | SIntType |
| Signed integer. More... | |
| class | StreamLogger |
| A logger that writes to a C++ std::ostream. More... | |
| class | StructType |
| Structs are an ordered collection of fields, each with a name and a type. More... | |
| class | TSLogger |
| A thread-safe logger which calls functions implemented by subclasses. More... | |
| class | Type |
| Root class of the ESI type system. More... | |
| class | TypeAliasType |
| Type aliases provide a named type which forwards to an inner type. More... | |
| class | TypedCallback |
| class | TypedCallback< ArgT, void, SkipTypeCheck > |
| Partial specialization: typed argument, void result. More... | |
| class | TypedCallback< void, ResultT, SkipTypeCheck > |
| Partial specialization: void argument, typed result. More... | |
| class | TypedCallback< void, void, SkipTypeCheck > |
| Full specialization: void argument, void result. More... | |
| class | TypedFunction |
| class | TypedFunction< ArgT, void, SkipTypeCheck > |
| Partial specialization: typed argument, void result. More... | |
| class | TypedFunction< void, ResultT, SkipTypeCheck > |
| Partial specialization: void argument, typed result. More... | |
| class | TypedFunction< void, void, SkipTypeCheck > |
| Full specialization: void argument, void result. More... | |
| class | TypedReadPort |
| Strongly typed wrapper around a raw read channel. More... | |
| class | TypedReadPort< void > |
| Specialization for void — read discards data and returns nothing. More... | |
| class | TypedWritePort |
| class | TypedWritePort< void > |
| Specialization for void — write takes no data argument. More... | |
| class | UInt |
| class | UIntType |
| Unsigned integer. More... | |
| class | UnionType |
| Unions are a tagged collection of fields where only one field is active at a time. More... | |
| class | UnknownReadChannelPort |
| Instantiated when a backend does not know how to create a read channel. More... | |
| class | UnknownWriteChannelPort |
| Instantiated when a backend does not know how to create a write channel. More... | |
| class | VoidType |
| The "void" type is a special type which can be used to represent no type. More... | |
| class | WindowType |
| Windows represent a fixed-size sliding window over a stream of data. More... | |
| struct | WireInfo |
| Compute the wire byte count for a port type. More... | |
| class | WriteChannelPort |
| A ChannelPort which sends data to the accelerator. More... | |
Typedefs | |
| using | ChannelAssignments = std::map< std::string, ChannelAssignment > |
| using | HWClientDetails = std::vector< HWClientDetail > |
| using | ServiceImplDetails = std::map< std::string, std::any > |
| using | PortMap = std::map< std::string, ChannelPort & > |
| using | ServiceTable = std::map< std::string, services::Service * > |
Functions | |
| bool | operator< (const AppID &a, const AppID &b) |
| bool | operator< (const AppIDPath &a, const AppIDPath &b) |
| std::string | toHex (void *val) |
| std::string | toHex (uint64_t val) |
| std::string | toString (const std::any &a) |
| 'Stringify' a std::any. This is used to log std::any values by some loggers. | |
| const Type * | unwrapTypeAlias (const Type *t) |
| Unwrap TypeAliasType (possibly recursively) to get the underlying type. | |
| WireInfo | getWireInfo (const Type *portType) |
| template<typename T > | |
| MessageData | toMessageData (const T &data, WireInfo wi) |
| Pack a C++ integral value into a MessageData with the given wire byte count. | |
| template<typename T > | |
| MessageData | toMessageData (const T &data, const Type *portType) |
| template<typename T > | |
| T | fromMessageData (const MessageData &msg, WireInfo wi) |
| Unpack a MessageData into a C++ integral value with the given wire info. | |
| template<typename T > | |
| T | fromMessageData (const MessageData &msg, const Type *portType) |
| template<typename T > | |
| void | verifyTypeCompatibility (const Type *portType) |
| template<typename T > | |
| void | verifyTypeCompatibility (const ChannelPort *port) |
| BundlePort & | findPortOrThrow (HWModule *module, const AppID &id) |
Look up a BundlePort by AppID in module. | |
| template<typename T > | |
| T * | findPortAsOrThrow (HWModule *module, const AppID &id) |
Look up a BundlePort by AppID and cast it to T. | |
| std::vector< uint32_t > | findPortIndices (HWModule *module, const std::string &name) |
Return a sorted vector of the idx values for every port whose AppID name matches name. | |
| std::ostream & | operator<< (std::ostream &os, const BitVector &bv) |
| static std::filesystem::path | getExePath () |
| Get the path to the currently running executable. | |
| static std::filesystem::path | getLibPath () |
| Get the path to the currently running shared library. | |
| static std::vector< std::filesystem::path > | getESIBackendDirectories () |
| Get the list of directories to search for backend plugins. | |
| static void | loadBackend (Context &ctxt, std::string backend) |
| Load a backend plugin dynamically. | |
| static std::map< AppID, Instance * > | buildIndex (const std::vector< std::unique_ptr< Instance > > &insts) |
| Build an index of children by AppID. | |
| static std::map< AppID, BundlePort & > | buildIndex (const std::vector< std::unique_ptr< BundlePort > > &ports) |
| Build an index of ports by AppID. | |
| std::ostream & | operator<< (std::ostream &os, const AppID &id) |
| std::ostream & | operator<< (std::ostream &os, const AppIDPath &path) |
| static void | dumpType (std::ostream &os, const esi::Type *type, int level=0, bool oneLine=false) |
| static Int | getIntLikeFromAny (const std::any &obj, unsigned widthHint) |
| static UInt | getUIntLikeFromAny (const std::any &obj, unsigned widthHint) |
Variables | |
| constexpr uint32_t | MetadataOffset = 8 |
| constexpr uint64_t | MagicNumberLo = 0xE5100E51 |
| constexpr uint64_t | MagicNumberHi = 0x207D98E5 |
| constexpr uint64_t | MagicNumber = MagicNumberLo | (MagicNumberHi << 32) |
| constexpr uint64_t | MagicNumberOffset = 0 |
| constexpr uint32_t | ExpectedVersionNumber = 0 |
| constexpr uint64_t | VersionNumberOffset = 8 |
| constexpr uint32_t | ManifestPtrOffset = 0x10 |
| constexpr uint32_t | CycleCountOffset = 0x20 |
| constexpr uint32_t | CoreFreqOffset = 0x28 |
| template<typename T > | |
| constexpr bool | has_esi_id_v = has_esi_id<T>::value |
| template<typename T > | |
| constexpr bool | has_esi_window_id_v = has_esi_window_id<T>::value |
| template<typename T > | |
| constexpr bool | is_std_array_v = is_std_array<T>::value |
| using esi.ChannelAssignments = typedef std::map<std::string, ChannelAssignment> |
| using esi.HWClientDetails = typedef std::vector<HWClientDetail> |
| using esi.PortMap = typedef std::map<std::string, ChannelPort &> |
| using esi.ServiceImplDetails = typedef std::map<std::string, std::any> |
| using esi.ServiceTable = typedef std::map<std::string, services::Service *> |
Definition at line 41 of file Services.h.
|
static |
Build an index of ports by AppID.
Definition at line 35 of file Design.cpp.
|
static |
Build an index of children by AppID.
Definition at line 26 of file Design.cpp.
|
static |
Definition at line 26 of file Types.cpp.
References dumpType(), esi::Type::getID(), and esi::BundleType::To.
Referenced by esi::Type::dump(), and dumpType().
Look up a BundlePort by AppID and cast it to T.
Throws AcceleratorMismatchError if the port is missing or has the wrong runtime type. The returned pointer is mutable.
Definition at line 1489 of file TypedPorts.h.
References findPortOrThrow(), esi::BundlePort::getAs(), and toString().
|
inline |
Return a sorted vector of the idx values for every port whose AppID name matches name.
Ports without an index are ignored.
Definition at line 1501 of file TypedPorts.h.
|
inline |
Look up a BundlePort by AppID in module.
Throws AcceleratorMismatchError if the port is not found. The returned reference is mutable: even though HWModule::resolvePort is a const method, the underlying port map stores BundlePort& references, so callers can invoke non-const methods on the returned port (e.g. getRawRead, connect).
Definition at line 1476 of file TypedPorts.h.
References toString().
Referenced by findPortAsOrThrow().
| T esi::fromMessageData | ( | const MessageData & | msg, |
| const Type * | portType | ||
| ) |
Definition at line 135 of file TypedPorts.h.
References getWireInfo().
| T esi::fromMessageData | ( | const MessageData & | msg, |
| WireInfo | wi | ||
| ) |
Unpack a MessageData into a C++ integral value with the given wire info.
If the wire size differs from sizeof(T), copies available bytes into a zero-initialized value and sign-extends for signed types using the actual bit width to locate the sign bit.
Definition at line 110 of file TypedPorts.h.
References esi::MessageData::as(), esi::WireInfo::bitWidth, esi::WireInfo::bytes, esi::MessageData::getBytes(), and esi::MessageData::getSize().
|
static |
Get the list of directories to search for backend plugins.
Definition at line 152 of file Accelerator.cpp.
References getExePath(), and getLibPath().
Referenced by loadBackend().
|
static |
Get the path to the currently running executable.
Definition at line 107 of file Accelerator.cpp.
Referenced by getESIBackendDirectories().
|
static |
Definition at line 226 of file Types.cpp.
Referenced by esi::SIntType::ensureValid(), and esi::SIntType::serialize().
|
static |
Get the path to the currently running shared library.
Definition at line 126 of file Accelerator.cpp.
References getLibPath().
Referenced by getESIBackendDirectories(), and getLibPath().
|
static |
Definition at line 245 of file Types.cpp.
Referenced by esi::UIntType::ensureValid(), and esi::UIntType::serialize().
Definition at line 77 of file TypedPorts.h.
References unwrapTypeAlias().
Referenced by fromMessageData(), esi::TypedReadPort< T, SkipTypeCheck >::prepareConnect(), and toMessageData().
|
static |
Load a backend plugin dynamically.
Plugins are expected to be named lib<BackendName>Backend.so and located in one of 1) CWD, 2) directories specified in ESI_BACKENDS environment variable, 3) in the same directory as the application, or 4) in the same directory as this library.
Definition at line 189 of file Accelerator.cpp.
References esi::Logger::debug(), esi::Logger::error(), getESIBackendDirectories(), esi::Context::getLogger(), and esi::Logger::info().
Referenced by esi::Context::connect().
Definition at line 820 of file Manifest.cpp.
Definition at line 825 of file Manifest.cpp.
| std::ostream & esi::operator<< | ( | std::ostream & | os, |
| const AppID & | id | ||
| ) |
Definition at line 834 of file Manifest.cpp.
| std::ostream & esi::operator<< | ( | std::ostream & | os, |
| const AppIDPath & | path | ||
| ) |
Definition at line 840 of file Manifest.cpp.
| std::ostream & esi::operator<< | ( | std::ostream & | os, |
| const BitVector & | bv | ||
| ) |
Definition at line 386 of file Values.cpp.
References toDecimalString(), toPowerOfTwoString(), and esi::BitVector::toString().
|
private |
Definition at line 41 of file Common.cpp.
|
private |
Definition at line 37 of file Common.cpp.
References toHex().
Referenced by channelTest(), esi::services::MMIOSysInfo::getEsiVersion(), hostmemReadTest(), hostmemTest(), loopbackAddTest(), esi::services::MMIO::MMIORegion::read(), runByteRotate1(), runCallbackWindowedList(), runCallServiceCallback(), runChannelWindowedListRead(), runChannelWindowedListWrite(), runCustomServiceDeclChannel(), runMmioReadWrite(), runTypedFuncVoidArg(), runTypedWriteChannelByte(), toHex(), esi::services::MMIO::MMIORegion::toString(), and esi::services::MMIO::MMIORegion::write().
| MessageData esi::toMessageData | ( | const T & | data, |
| const Type * | portType | ||
| ) |
Definition at line 101 of file TypedPorts.h.
References getWireInfo(), and toMessageData().
| MessageData esi::toMessageData | ( | const T & | data, |
| WireInfo | wi | ||
| ) |
Pack a C++ integral value into a MessageData with the given wire byte count.
If wi.bytes is 0, falls back to sizeof(T).
Definition at line 87 of file TypedPorts.h.
References esi::WireInfo::bytes.
Referenced by toMessageData(), esi::TypedWritePort< T, SkipTypeCheck >::tryWrite(), and esi::TypedWritePort< T, SkipTypeCheck >::write().
| std::string esi::toString | ( | const std::any & | a | ) |
'Stringify' a std::any. This is used to log std::any values by some loggers.
Definition at line 132 of file Logging.cpp.
Referenced by esi::services::TelemetryService::Metric::connect(), dmaWriteTest(), findPortAsOrThrow(), findPortOrThrow(), esi::StreamLogger::logImpl(), and esi::ConsoleLogger::logImpl().
Unwrap TypeAliasType (possibly recursively) to get the underlying type.
Definition at line 63 of file TypedPorts.h.
Referenced by getWireInfo(), and verifyTypeCompatibility().
| void esi::verifyTypeCompatibility | ( | const ChannelPort * | port | ) |
Definition at line 586 of file TypedPorts.h.
References esi::ChannelPort::getType(), esi::ChannelPort::getWindowType(), and esi::Type::toString().
| void esi::verifyTypeCompatibility | ( | const Type * | portType | ) |
Definition at line 463 of file TypedPorts.h.
References esi::Type::getID(), esi::Type::toString(), and unwrapTypeAlias().
|
constexpr |
Definition at line 59 of file Accelerator.h.
Referenced by esi::services::MMIOSysInfo::getCoreClockFrequency().
|
constexpr |
Definition at line 58 of file Accelerator.h.
Referenced by esi::services::MMIOSysInfo::getCycleCount().
|
constexpr |
Definition at line 53 of file Accelerator.h.
|
inlineconstexpr |
Definition at line 432 of file TypedPorts.h.
|
inlineconstexpr |
Definition at line 444 of file TypedPorts.h.
|
inlineconstexpr |
Definition at line 460 of file TypedPorts.h.
|
constexpr |
Definition at line 50 of file Accelerator.h.
Referenced by esi::services::MMIOSysInfo::getEsiVersion().
|
constexpr |
Definition at line 49 of file Accelerator.h.
|
constexpr |
Definition at line 48 of file Accelerator.h.
|
constexpr |
Definition at line 51 of file Accelerator.h.
Referenced by esi::services::MMIOSysInfo::getEsiVersion().
|
constexpr |
Definition at line 56 of file Accelerator.h.
Referenced by esi::services::MMIOSysInfo::getCompressedManifest().
|
constexpr |
Definition at line 46 of file Accelerator.h.
Referenced by esi::services::MMIOSysInfo::getCompressedManifest(), esi::services::MMIOSysInfo::getCoreClockFrequency(), esi::services::MMIOSysInfo::getCycleCount(), and esi::services::MMIOSysInfo::getEsiVersion().
|
constexpr |
Definition at line 54 of file Accelerator.h.
Referenced by esi::services::MMIOSysInfo::getEsiVersion().