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