CIRCT  19.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 *testHarnessHierAnnoClass =
83  "sifive.enterprise.firrtl.TestHarnessHierarchyAnnotation";
84 constexpr const char *retimeModulesFileAnnoClass =
85  "sifive.enterprise.firrtl.RetimeModulesAnnotation";
86 constexpr const char *retimeModuleAnnoClass =
87  "freechips.rocketchip.util.RetimeModuleAnnotation";
88 constexpr const char *verifBlackBoxAnnoClass =
89  "freechips.rocketchip.annotations.InternalVerifBlackBoxAnnotation";
90 constexpr const char *metadataDirectoryAttrName =
91  "sifive.enterprise.firrtl.MetadataDirAnnotation";
92 constexpr const char *noDedupAnnoClass = "firrtl.transforms.NoDedupAnnotation";
93 constexpr const char *dedupGroupAnnoClass =
94  "firrtl.transforms.DedupGroupAnnotation";
95 
96 // Grand Central Annotations
97 constexpr const char *serializedViewAnnoClass =
98  "sifive.enterprise.grandcentral.GrandCentralView$SerializedViewAnnotation";
99 constexpr const char *viewAnnoClass =
100  "sifive.enterprise.grandcentral.ViewAnnotation";
101 constexpr const char *companionAnnoClass =
102  "sifive.enterprise.grandcentral.ViewAnnotation.companion"; // not in SFC
103 constexpr const char *prefixInterfacesAnnoClass =
104  "sifive.enterprise.grandcentral.PrefixInterfacesAnnotation";
105 constexpr const char *augmentedGroundTypeClass =
106  "sifive.enterprise.grandcentral.AugmentedGroundType"; // not an annotation
107 constexpr const char *augmentedBundleTypeClass =
108  "sifive.enterprise.grandcentral.AugmentedBundleType"; // not an annotation
109 constexpr const char *dataTapsClass =
110  "sifive.enterprise.grandcentral.DataTapsAnnotation";
111 constexpr const char *dataTapsBlackboxClass =
112  "sifive.enterprise.grandcentral.DataTapsAnnotation.blackbox"; // not in SFC
113 constexpr const char *memTapClass =
114  "sifive.enterprise.grandcentral.MemTapAnnotation";
115 constexpr const char *memTapBlackboxClass =
116  "sifive.enterprise.grandcentral.MemTapAnnotation.blackbox"; // not in SFC
117 constexpr const char *memTapPortClass =
118  "sifive.enterprise.grandcentral.MemTapAnnotation.port"; // not in SFC
119 constexpr const char *memTapSourceClass =
120  "sifive.enterprise.grandcentral.MemTapAnnotation.source"; // not in SFC
121 constexpr const char *deletedKeyClass =
122  "sifive.enterprise.grandcentral.DeletedDataTapKey";
123 constexpr const char *literalKeyClass =
124  "sifive.enterprise.grandcentral.LiteralDataTapKey";
125 constexpr const char *referenceKeyClass =
126  "sifive.enterprise.grandcentral.ReferenceDataTapKey";
127 constexpr const char *referenceKeyPortClass =
128  "sifive.enterprise.grandcentral.ReferenceDataTapKey.port"; // not in SFC
129 constexpr const char *referenceKeySourceClass =
130  "sifive.enterprise.grandcentral.ReferenceDataTapKey.source"; // not in SFC
131 constexpr const char *internalKeyClass =
132  "sifive.enterprise.grandcentral.DataTapModuleSignalKey";
133 constexpr const char *internalKeyPortClass =
134  "sifive.enterprise.grandcentral.DataTapModuleSignalKey.port"; // not in SFC
135 constexpr const char *internalKeySourceClass =
136  "sifive.enterprise.grandcentral.DataTapModuleSignalKey.source"; // not in
137  // SFC
138 constexpr const char *extractGrandCentralClass =
139  "sifive.enterprise.grandcentral.ExtractGrandCentralAnnotation";
140 constexpr const char *grandCentralHierarchyFileAnnoClass =
141  "sifive.enterprise.grandcentral.GrandCentralHierarchyFileAnnotation";
142 
143 // SiFive specific Annotations
144 constexpr const char *dutAnnoClass =
145  "sifive.enterprise.firrtl.MarkDUTAnnotation";
146 constexpr const char *injectDUTHierarchyAnnoClass =
147  "sifive.enterprise.firrtl.InjectDUTHierarchyAnnotation";
148 constexpr const char *sitestBlackBoxAnnoClass =
149  "sifive.enterprise.firrtl.SitestBlackBoxAnnotation";
150 constexpr const char *sitestTestHarnessBlackBoxAnnoClass =
151  "sifive.enterprise.firrtl.SitestTestHarnessBlackBoxAnnotation";
152 constexpr const char *prefixModulesAnnoClass =
153  "sifive.enterprise.firrtl.NestedPrefixModulesAnnotation";
154 constexpr const char *dontObfuscateModuleAnnoClass =
155  "sifive.enterprise.firrtl.DontObfuscateModuleAnnotation";
157  "sifive.enterprise.firrtl.ElaborationArtefactsDirectory";
158 constexpr const char *testHarnessPathAnnoClass =
159  "sifive.enterprise.firrtl.TestHarnessPathAnnotation";
160 /// Annotation that marks a reset (port or wire) and domain.
161 constexpr const char *fullAsyncResetAnnoClass =
162  "sifive.enterprise.firrtl.FullAsyncResetAnnotation";
163 /// Annotation that marks a module as not belonging to any reset domain.
164 constexpr const char *ignoreFullAsyncResetAnnoClass =
165  "sifive.enterprise.firrtl.IgnoreFullAsyncResetAnnotation";
166 
167 // MemToRegOfVec Annotations
168 constexpr const char *convertMemToRegOfVecAnnoClass =
169  "sifive.enterprise.firrtl.ConvertMemToRegOfVecAnnotation$";
170 constexpr const char *excludeMemToRegAnnoClass =
171  "sifive.enterprise.firrtl.ExcludeMemFromMemToRegOfVec";
172 
173 // Instance Extraction
174 constexpr const char *extractBlackBoxAnnoClass =
175  "sifive.enterprise.firrtl.ExtractBlackBoxAnnotation";
176 constexpr const char *extractClockGatesAnnoClass =
177  "sifive.enterprise.firrtl.ExtractClockGatesFileAnnotation";
178 constexpr const char *extractSeqMemsAnnoClass =
179  "sifive.enterprise.firrtl.ExtractSeqMemsFileAnnotation";
180 
181 // AddSeqMemPort Annotations
182 constexpr const char *addSeqMemPortAnnoClass =
183  "sifive.enterprise.firrtl.AddSeqMemPortAnnotation";
184 constexpr const char *addSeqMemPortsFileAnnoClass =
185  "sifive.enterprise.firrtl.AddSeqMemPortsFileAnnotation";
186 
187 // Memory file loading annotations.
188 constexpr const char *loadMemoryFromFileAnnoClass =
189  "firrtl.annotations.LoadMemoryAnnotation";
190 constexpr const char *loadMemoryFromFileInlineAnnoClass =
191  "firrtl.annotations.MemoryFileInlineAnnotation";
192 
193 // WiringTransform Annotations
194 constexpr const char *wiringSinkAnnoClass =
195  "firrtl.passes.wiring.SinkAnnotation";
196 constexpr const char *wiringSourceAnnoClass =
197  "firrtl.passes.wiring.SourceAnnotation";
198 
199 // Attribute annotations.
200 constexpr const char *attributeAnnoClass = "firrtl.AttributeAnnotation";
201 
202 } // namespace firrtl
203 } // namespace circt
204 
205 #endif // CIRCT_DIALECT_FIRRTL_ANNOTATIONDETAILS_H
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 * 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 * 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 * 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