CIRCT 22.0.0git
Loading...
Searching...
No Matches
TraceTaps.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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// Internal API structs providing metadata for traced signals.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef CIRCT_DIALECT_ARC_RUNTIME_TRACETAPS_H
14#define CIRCT_DIALECT_ARC_RUNTIME_TRACETAPS_H
15
16#include <cstdint>
17#include <type_traits>
18
19#pragma pack(push, 1)
20
21struct alignas(8) ArcTraceTap {
22 /// Byte offset of the traced value within the model state
23 uint64_t stateOffset;
24 /// Byte offset to the null terminator of this signal's last alias in the
25 /// names array
26 uint64_t nameOffset;
27 /// Bit width of the traced signal
28 uint32_t typeBits;
29 /// Padding and reserved for future use
30 uint32_t reserved;
31};
32static_assert(sizeof(ArcTraceTap) == 3 * 8);
33
34struct alignas(8) ArcModelTraceInfo {
35 /// Number of trace taps in the array
36 uint64_t numTraceTaps;
37 /// Array of trace tap information
39 /// Combined list of names and aliases of the trace taps separated by
40 /// null terminators
41 const char *traceTapNames;
42 /// Required capacity in 8 byte increments of the trace buffer
44};
45static_assert(sizeof(ArcModelTraceInfo) == 4 * 8);
46
47namespace circt::arc::runtime {
48static constexpr uint32_t defaultTraceBufferCapacity = 256 * 1024;
49} // namespace circt::arc::runtime
50
51#pragma pack(pop)
52
53#endif // CIRCT_DIALECT_ARC_RUNTIME_TRACETAPS_H
static constexpr uint32_t defaultTraceBufferCapacity
Definition TraceTaps.h:48
const char * traceTapNames
Combined list of names and aliases of the trace taps separated by null terminators.
Definition TraceTaps.h:41
uint64_t numTraceTaps
Number of trace taps in the array.
Definition TraceTaps.h:36
uint64_t traceBufferCapacity
Required capacity in 8 byte increments of the trace buffer.
Definition TraceTaps.h:43
struct ArcTraceTap * traceTaps
Array of trace tap information.
Definition TraceTaps.h:38
uint32_t typeBits
Bit width of the traced signal.
Definition TraceTaps.h:28
uint64_t stateOffset
Byte offset of the traced value within the model state.
Definition TraceTaps.h:23
uint64_t nameOffset
Byte offset to the null terminator of this signal's last alias in the names array.
Definition TraceTaps.h:26
uint32_t reserved
Padding and reserved for future use.
Definition TraceTaps.h:30