CIRCT 20.0.0git
Loading...
Searching...
No Matches
AnnotationDetails.h
Go to the documentation of this file.
1//===- AnnotationDetails.h - common annotation logic ------------*- 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// This file contains private APIs for dealing with annotations.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef CIRCT_DIALECT_FIRRTL_ANNOTATIONDETAILS_H
14#define CIRCT_DIALECT_FIRRTL_ANNOTATIONDETAILS_H
15
16#include "circt/Support/LLVM.h"
17
18namespace circt {
19namespace firrtl {
20
21//===----------------------------------------------------------------------===//
22// Common strings related to annotations
23//===----------------------------------------------------------------------===//
24
25constexpr const char *rawAnnotations = "rawAnnotations";
26
27//===----------------------------------------------------------------------===//
28// Annotation Class Names
29//===----------------------------------------------------------------------===//
30
31constexpr const char *conventionAnnoClass = "circt.ConventionAnnotation";
32constexpr const char *typeLoweringAnnoClass =
33 "circt.BodyTypeLoweringAnnotation";
34constexpr const char *dontTouchAnnoClass =
35 "firrtl.transforms.DontTouchAnnotation";
36constexpr const char *enumComponentAnnoClass =
37 "chisel3.experimental.EnumAnnotations$EnumComponentAnnotation";
38constexpr const char *enumDefAnnoClass =
39 "chisel3.experimental.EnumAnnotations$EnumDefAnnotation";
40constexpr const char *enumVecAnnoClass =
41 "chisel3.experimental.EnumAnnotations$EnumVecAnnotation";
42constexpr const char *forceNameAnnoClass =
43 "chisel3.util.experimental.ForceNameAnnotation";
44constexpr const char *decodeTableAnnotation =
45 "chisel3.util.experimental.decode.DecodeTableAnnotation";
46constexpr const char *flattenAnnoClass = "firrtl.transforms.FlattenAnnotation";
47constexpr const char *inlineAnnoClass = "firrtl.passes.InlineAnnotation";
48constexpr const char *traceNameAnnoClass =
49 "chisel3.experimental.Trace$TraceNameAnnotation";
50constexpr const char *traceAnnoClass =
51 "chisel3.experimental.Trace$TraceAnnotation";
52
53constexpr const char *blackBoxInlineAnnoClass =
54 "firrtl.transforms.BlackBoxInlineAnno";
55constexpr const char *blackBoxPathAnnoClass =
56 "firrtl.transforms.BlackBoxPathAnno";
57constexpr const char *blackBoxTargetDirAnnoClass =
58 "firrtl.transforms.BlackBoxTargetDirAnno";
59constexpr const char *blackBoxResourceFileNameAnnoClass =
60 "firrtl.transforms.BlackBoxResourceFileNameAnno";
61constexpr const char *blackBoxAnnoClass =
62 "firrtl.transforms.BlackBox"; // Not in SFC
63constexpr const char *mustDedupAnnoClass =
64 "firrtl.transforms.MustDeduplicateAnnotation";
65constexpr const char *runFIRRTLTransformAnnoClass =
66 "firrtl.stage.RunFirrtlTransformAnnotation";
67constexpr const char *extractAssertAnnoClass =
68 "sifive.enterprise.firrtl.ExtractAssertionsAnnotation";
69constexpr const char *extractAssumeAnnoClass =
70 "sifive.enterprise.firrtl.ExtractAssumptionsAnnotation";
71constexpr const char *extractCoverageAnnoClass =
72 "sifive.enterprise.firrtl.ExtractCoverageAnnotation";
73constexpr const char *testBenchDirAnnoClass =
74 "sifive.enterprise.firrtl.TestBenchDirAnnotation";
75constexpr const char *moduleHierAnnoClass =
76 "sifive.enterprise.firrtl.ModuleHierarchyAnnotation";
77constexpr const char *outputDirAnnoClass = "circt.OutputDirAnnotation";
78constexpr const char *testHarnessHierAnnoClass =
79 "sifive.enterprise.firrtl.TestHarnessHierarchyAnnotation";
80constexpr const char *retimeModulesFileAnnoClass =
81 "sifive.enterprise.firrtl.RetimeModulesAnnotation";
82constexpr const char *retimeModuleAnnoClass =
83 "freechips.rocketchip.util.RetimeModuleAnnotation";
84constexpr const char *verifBlackBoxAnnoClass =
85 "freechips.rocketchip.annotations.InternalVerifBlackBoxAnnotation";
86constexpr const char *metadataDirectoryAttrName =
87 "sifive.enterprise.firrtl.MetadataDirAnnotation";
88constexpr const char *noDedupAnnoClass = "firrtl.transforms.NoDedupAnnotation";
89constexpr const char *dedupGroupAnnoClass =
90 "firrtl.transforms.DedupGroupAnnotation";
91
92// Grand Central Annotations
93constexpr const char *serializedViewAnnoClass =
94 "sifive.enterprise.grandcentral.GrandCentralView$SerializedViewAnnotation";
95constexpr const char *viewAnnoClass =
96 "sifive.enterprise.grandcentral.ViewAnnotation";
97constexpr const char *companionAnnoClass =
98 "sifive.enterprise.grandcentral.ViewAnnotation.companion"; // not in SFC
99constexpr const char *augmentedGroundTypeClass =
100 "sifive.enterprise.grandcentral.AugmentedGroundType"; // not an annotation
101constexpr const char *augmentedBundleTypeClass =
102 "sifive.enterprise.grandcentral.AugmentedBundleType"; // not an annotation
103constexpr const char *dataTapsClass =
104 "sifive.enterprise.grandcentral.DataTapsAnnotation";
105constexpr const char *dataTapsBlackboxClass =
106 "sifive.enterprise.grandcentral.DataTapsAnnotation.blackbox"; // not in SFC
107constexpr const char *memTapClass =
108 "sifive.enterprise.grandcentral.MemTapAnnotation";
109constexpr const char *memTapBlackboxClass =
110 "sifive.enterprise.grandcentral.MemTapAnnotation.blackbox"; // not in SFC
111constexpr const char *memTapPortClass =
112 "sifive.enterprise.grandcentral.MemTapAnnotation.port"; // not in SFC
113constexpr const char *memTapSourceClass =
114 "sifive.enterprise.grandcentral.MemTapAnnotation.source"; // not in SFC
115constexpr const char *deletedKeyClass =
116 "sifive.enterprise.grandcentral.DeletedDataTapKey";
117constexpr const char *literalKeyClass =
118 "sifive.enterprise.grandcentral.LiteralDataTapKey";
119constexpr const char *referenceKeyClass =
120 "sifive.enterprise.grandcentral.ReferenceDataTapKey";
121constexpr const char *referenceKeyPortClass =
122 "sifive.enterprise.grandcentral.ReferenceDataTapKey.port"; // not in SFC
123constexpr const char *referenceKeySourceClass =
124 "sifive.enterprise.grandcentral.ReferenceDataTapKey.source"; // not in SFC
125constexpr const char *internalKeyClass =
126 "sifive.enterprise.grandcentral.DataTapModuleSignalKey";
127constexpr const char *internalKeyPortClass =
128 "sifive.enterprise.grandcentral.DataTapModuleSignalKey.port"; // not in SFC
129constexpr const char *internalKeySourceClass =
130 "sifive.enterprise.grandcentral.DataTapModuleSignalKey.source"; // not in
131 // SFC
132constexpr const char *extractGrandCentralClass =
133 "sifive.enterprise.grandcentral.ExtractGrandCentralAnnotation";
135 "sifive.enterprise.grandcentral.GrandCentralHierarchyFileAnnotation";
136
137// SiFive specific Annotations
138constexpr const char *dutAnnoClass =
139 "sifive.enterprise.firrtl.MarkDUTAnnotation";
140constexpr const char *injectDUTHierarchyAnnoClass =
141 "sifive.enterprise.firrtl.InjectDUTHierarchyAnnotation";
142constexpr const char *sitestBlackBoxAnnoClass =
143 "sifive.enterprise.firrtl.SitestBlackBoxAnnotation";
145 "sifive.enterprise.firrtl.SitestTestHarnessBlackBoxAnnotation";
146constexpr const char *dontObfuscateModuleAnnoClass =
147 "sifive.enterprise.firrtl.DontObfuscateModuleAnnotation";
149 "sifive.enterprise.firrtl.ElaborationArtefactsDirectory";
150constexpr const char *testHarnessPathAnnoClass =
151 "sifive.enterprise.firrtl.TestHarnessPathAnnotation";
152/// Annotation that marks a reset (port or wire) and domain.
153constexpr const char *fullResetAnnoClass = "circt.FullResetAnnotation";
154/// Annotation that marks a module as not belonging to any reset domain.
155constexpr const char *excludeFromFullResetAnnoClass =
156 "circt.ExcludeFromFullResetAnnotation";
157/// Annotation that marks a reset (port or wire) and domain.
158constexpr const char *fullAsyncResetAnnoClass =
159 "sifive.enterprise.firrtl.FullAsyncResetAnnotation";
160/// Annotation that marks a module as not belonging to any reset domain.
161constexpr const char *ignoreFullAsyncResetAnnoClass =
162 "sifive.enterprise.firrtl.IgnoreFullAsyncResetAnnotation";
163
164// MemToRegOfVec Annotations
165constexpr const char *convertMemToRegOfVecAnnoClass =
166 "sifive.enterprise.firrtl.ConvertMemToRegOfVecAnnotation$";
167constexpr const char *excludeMemToRegAnnoClass =
168 "sifive.enterprise.firrtl.ExcludeMemFromMemToRegOfVec";
169
170// Instance Extraction
171constexpr const char *extractBlackBoxAnnoClass =
172 "sifive.enterprise.firrtl.ExtractBlackBoxAnnotation";
173constexpr const char *extractClockGatesAnnoClass =
174 "sifive.enterprise.firrtl.ExtractClockGatesFileAnnotation";
175constexpr const char *extractSeqMemsAnnoClass =
176 "sifive.enterprise.firrtl.ExtractSeqMemsFileAnnotation";
177
178// AddSeqMemPort Annotations
179constexpr const char *addSeqMemPortAnnoClass =
180 "sifive.enterprise.firrtl.AddSeqMemPortAnnotation";
181constexpr const char *addSeqMemPortsFileAnnoClass =
182 "sifive.enterprise.firrtl.AddSeqMemPortsFileAnnotation";
183
184// Memory file loading annotations.
185constexpr const char *loadMemoryFromFileAnnoClass =
186 "firrtl.annotations.LoadMemoryAnnotation";
188 "firrtl.annotations.MemoryFileInlineAnnotation";
189
190// WiringTransform Annotations
191constexpr const char *wiringSinkAnnoClass =
192 "firrtl.passes.wiring.SinkAnnotation";
193constexpr const char *wiringSourceAnnoClass =
194 "firrtl.passes.wiring.SourceAnnotation";
195
196// Attribute annotations.
197constexpr const char *attributeAnnoClass = "firrtl.AttributeAnnotation";
198
199// Module Prefix Annotations.
200constexpr const char *modulePrefixAnnoClass = "chisel3.ModulePrefixAnnotation";
201
202} // namespace firrtl
203} // namespace circt
204
205#endif // CIRCT_DIALECT_FIRRTL_ANNOTATIONDETAILS_H
constexpr const char * excludeFromFullResetAnnoClass
Annotation that marks a module as not belonging to any reset domain.
constexpr const char * injectDUTHierarchyAnnoClass
constexpr const char * extractCoverageAnnoClass
constexpr const char * excludeMemToRegAnnoClass
constexpr const char * elaborationArtefactsDirectoryAnnoClass
constexpr const char * augmentedBundleTypeClass
constexpr const char * extractGrandCentralClass
constexpr const char * blackBoxAnnoClass
constexpr const char * fullResetAnnoClass
Annotation that marks a reset (port or wire) and domain.
constexpr const char * sitestBlackBoxAnnoClass
constexpr const char * convertMemToRegOfVecAnnoClass
constexpr const char * dontObfuscateModuleAnnoClass
constexpr const char * metadataDirectoryAttrName
constexpr const char * extractBlackBoxAnnoClass
constexpr const char * fullAsyncResetAnnoClass
Annotation that marks a reset (port or wire) and domain.
constexpr const char * testBenchDirAnnoClass
constexpr const char * sitestTestHarnessBlackBoxAnnoClass
constexpr const char * outputDirAnnoClass
constexpr const char * referenceKeyPortClass
constexpr const char * augmentedGroundTypeClass
constexpr const char * traceAnnoClass
constexpr const char * mustDedupAnnoClass
constexpr const char * loadMemoryFromFileAnnoClass
constexpr const char * dutAnnoClass
constexpr const char * rawAnnotations
constexpr const char * extractSeqMemsAnnoClass
constexpr const char * attributeAnnoClass
constexpr const char * wiringSinkAnnoClass
constexpr const char * memTapSourceClass
constexpr const char * loadMemoryFromFileInlineAnnoClass
constexpr const char * forceNameAnnoClass
constexpr const char * memTapClass
constexpr const char * noDedupAnnoClass
constexpr const char * deletedKeyClass
constexpr const char * dataTapsClass
constexpr const char * conventionAnnoClass
constexpr const char * dedupGroupAnnoClass
constexpr const char * viewAnnoClass
constexpr const char * serializedViewAnnoClass
constexpr const char * enumDefAnnoClass
constexpr const char * enumVecAnnoClass
constexpr const char * wiringSourceAnnoClass
constexpr const char * traceNameAnnoClass
constexpr const char * enumComponentAnnoClass
constexpr const char * dataTapsBlackboxClass
constexpr const char * internalKeyClass
constexpr const char * extractAssertAnnoClass
constexpr const char * memTapBlackboxClass
constexpr const char * testHarnessPathAnnoClass
constexpr const char * verifBlackBoxAnnoClass
constexpr const char * addSeqMemPortAnnoClass
constexpr const char * referenceKeyClass
constexpr const char * blackBoxPathAnnoClass
constexpr const char * internalKeyPortClass
constexpr const char * addSeqMemPortsFileAnnoClass
constexpr const char * retimeModulesFileAnnoClass
constexpr const char * retimeModuleAnnoClass
constexpr const char * runFIRRTLTransformAnnoClass
constexpr const char * companionAnnoClass
constexpr const char * referenceKeySourceClass
constexpr const char * literalKeyClass
constexpr const char * blackBoxTargetDirAnnoClass
constexpr const char * ignoreFullAsyncResetAnnoClass
Annotation that marks a module as not belonging to any reset domain.
constexpr const char * modulePrefixAnnoClass
constexpr const char * blackBoxInlineAnnoClass
constexpr const char * decodeTableAnnotation
constexpr const char * extractClockGatesAnnoClass
constexpr const char * inlineAnnoClass
constexpr const char * memTapPortClass
constexpr const char * flattenAnnoClass
constexpr const char * extractAssumeAnnoClass
constexpr const char * grandCentralHierarchyFileAnnoClass
constexpr const char * typeLoweringAnnoClass
constexpr const char * dontTouchAnnoClass
constexpr const char * testHarnessHierAnnoClass
constexpr const char * blackBoxResourceFileNameAnnoClass
constexpr const char * moduleHierAnnoClass
constexpr const char * internalKeySourceClass
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.