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