CIRCT  18.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 constexpr const char *dftTestModeEnableAnnoClass =
96  "sifive.enterprise.firrtl.DFTTestModeEnableAnnotation";
97 constexpr const char *dftClockDividerBypassAnnoClass =
98  "sifive.enterprise.firrtl.DFTClockDividerBypassAnnotation";
99 
100 // Grand Central Annotations
101 constexpr const char *serializedViewAnnoClass =
102  "sifive.enterprise.grandcentral.GrandCentralView$SerializedViewAnnotation";
103 constexpr const char *viewAnnoClass =
104  "sifive.enterprise.grandcentral.ViewAnnotation";
105 constexpr const char *companionAnnoClass =
106  "sifive.enterprise.grandcentral.ViewAnnotation.companion"; // not in SFC
107 constexpr const char *prefixInterfacesAnnoClass =
108  "sifive.enterprise.grandcentral.PrefixInterfacesAnnotation";
109 constexpr const char *augmentedGroundTypeClass =
110  "sifive.enterprise.grandcentral.AugmentedGroundType"; // not an annotation
111 constexpr const char *augmentedBundleTypeClass =
112  "sifive.enterprise.grandcentral.AugmentedBundleType"; // not an annotation
113 constexpr const char *dataTapsClass =
114  "sifive.enterprise.grandcentral.DataTapsAnnotation";
115 constexpr const char *dataTapsBlackboxClass =
116  "sifive.enterprise.grandcentral.DataTapsAnnotation.blackbox"; // not in SFC
117 constexpr const char *memTapClass =
118  "sifive.enterprise.grandcentral.MemTapAnnotation";
119 constexpr const char *memTapBlackboxClass =
120  "sifive.enterprise.grandcentral.MemTapAnnotation.blackbox"; // not in SFC
121 constexpr const char *memTapPortClass =
122  "sifive.enterprise.grandcentral.MemTapAnnotation.port"; // not in SFC
123 constexpr const char *memTapSourceClass =
124  "sifive.enterprise.grandcentral.MemTapAnnotation.source"; // not in SFC
125 constexpr const char *deletedKeyClass =
126  "sifive.enterprise.grandcentral.DeletedDataTapKey";
127 constexpr const char *literalKeyClass =
128  "sifive.enterprise.grandcentral.LiteralDataTapKey";
129 constexpr const char *referenceKeyClass =
130  "sifive.enterprise.grandcentral.ReferenceDataTapKey";
131 constexpr const char *referenceKeyPortClass =
132  "sifive.enterprise.grandcentral.ReferenceDataTapKey.port"; // not in SFC
133 constexpr const char *referenceKeySourceClass =
134  "sifive.enterprise.grandcentral.ReferenceDataTapKey.source"; // not in SFC
135 constexpr const char *internalKeyClass =
136  "sifive.enterprise.grandcentral.DataTapModuleSignalKey";
137 constexpr const char *internalKeyPortClass =
138  "sifive.enterprise.grandcentral.DataTapModuleSignalKey.port"; // not in SFC
139 constexpr const char *internalKeySourceClass =
140  "sifive.enterprise.grandcentral.DataTapModuleSignalKey.source"; // not in
141  // SFC
142 constexpr const char *extractGrandCentralClass =
143  "sifive.enterprise.grandcentral.ExtractGrandCentralAnnotation";
144 constexpr const char *grandCentralHierarchyFileAnnoClass =
145  "sifive.enterprise.grandcentral.GrandCentralHierarchyFileAnnotation";
146 constexpr const char *signalDriverAnnoClass =
147  "sifive.enterprise.grandcentral.SignalDriverAnnotation";
148 constexpr const char *signalDriverTargetAnnoClass =
149  "sifive.enterprise.grandcentral.SignalDriverAnnotation.target"; // not in
150  // SFC
151 constexpr const char *signalDriverModuleAnnoClass =
152  "sifive.enterprise.grandcentral.SignalDriverAnnotation.module"; // not in
153  // SFC
154 
155 // SiFive specific Annotations
156 constexpr const char *dutAnnoClass =
157  "sifive.enterprise.firrtl.MarkDUTAnnotation";
158 constexpr const char *injectDUTHierarchyAnnoClass =
159  "sifive.enterprise.firrtl.InjectDUTHierarchyAnnotation";
160 constexpr const char *sitestBlackBoxAnnoClass =
161  "sifive.enterprise.firrtl.SitestBlackBoxAnnotation";
162 constexpr const char *sitestTestHarnessBlackBoxAnnoClass =
163  "sifive.enterprise.firrtl.SitestTestHarnessBlackBoxAnnotation";
164 constexpr const char *prefixModulesAnnoClass =
165  "sifive.enterprise.firrtl.NestedPrefixModulesAnnotation";
166 constexpr const char *dontObfuscateModuleAnnoClass =
167  "sifive.enterprise.firrtl.DontObfuscateModuleAnnotation";
168 constexpr const char *scalaClassAnnoClass =
169  "sifive.enterprise.firrtl.ScalaClassAnnotation";
171  "sifive.enterprise.firrtl.ElaborationArtefactsDirectory";
172 constexpr const char *subCircuitsTargetDirectoryAnnoClass =
173  "sifive.enterprise.grandcentral.phases.SubCircuitsTargetDirectory";
174 constexpr const char *testHarnessPathAnnoClass =
175  "sifive.enterprise.firrtl.TestHarnessPathAnnotation";
176 constexpr const char *subCircuitDirAnnotation =
177  "sifive.enterprise.grandcentral.SubCircuitDirAnnotation";
178 /// Annotation that marks a reset (port or wire) and domain.
179 constexpr const char *fullAsyncResetAnnoClass =
180  "sifive.enterprise.firrtl.FullAsyncResetAnnotation";
181 /// Annotation that marks a module as not belonging to any reset domain.
182 constexpr const char *ignoreFullAsyncResetAnnoClass =
183  "sifive.enterprise.firrtl.IgnoreFullAsyncResetAnnotation";
184 
185 // MemToRegOfVec Annotations
186 constexpr const char *convertMemToRegOfVecAnnoClass =
187  "sifive.enterprise.firrtl.ConvertMemToRegOfVecAnnotation$";
188 constexpr const char *excludeMemToRegAnnoClass =
189  "sifive.enterprise.firrtl.ExcludeMemFromMemToRegOfVec";
190 
191 // Instance Extraction
192 constexpr const char *extractBlackBoxAnnoClass =
193  "sifive.enterprise.firrtl.ExtractBlackBoxAnnotation";
194 constexpr const char *extractClockGatesAnnoClass =
195  "sifive.enterprise.firrtl.ExtractClockGatesFileAnnotation";
196 constexpr const char *extractSeqMemsAnnoClass =
197  "sifive.enterprise.firrtl.ExtractSeqMemsFileAnnotation";
198 
199 // AddSeqMemPort Annotations
200 constexpr const char *addSeqMemPortAnnoClass =
201  "sifive.enterprise.firrtl.AddSeqMemPortAnnotation";
202 constexpr const char *addSeqMemPortsFileAnnoClass =
203  "sifive.enterprise.firrtl.AddSeqMemPortsFileAnnotation";
204 
205 // Memory file loading annotations.
206 constexpr const char *loadMemoryFromFileAnnoClass =
207  "firrtl.annotations.LoadMemoryAnnotation";
208 constexpr const char *loadMemoryFromFileInlineAnnoClass =
209  "firrtl.annotations.MemoryFileInlineAnnotation";
210 
211 // WiringTransform Annotations
212 constexpr const char *wiringSinkAnnoClass =
213  "firrtl.passes.wiring.SinkAnnotation";
214 constexpr const char *wiringSourceAnnoClass =
215  "firrtl.passes.wiring.SourceAnnotation";
216 
217 // Attribute annotations.
218 constexpr const char *attributeAnnoClass = "firrtl.AttributeAnnotation";
219 
220 } // namespace firrtl
221 } // namespace circt
222 
223 #endif // CIRCT_DIALECT_FIRRTL_ANNOTATIONDETAILS_H
constexpr const char * injectDUTHierarchyAnnoClass
constexpr const char * dftTestModeEnableAnnoClass
constexpr const char * extractCoverageAnnoClass
constexpr const char * excludeMemToRegAnnoClass
constexpr const char * dftClockDividerBypassAnnoClass
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 * signalDriverModuleAnnoClass
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 * subCircuitsTargetDirectoryAnnoClass
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 * subCircuitDirAnnotation
constexpr const char * referenceKeySourceClass
constexpr const char * literalKeyClass
constexpr const char * signalDriverTargetAnnoClass
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 * scalaClassAnnoClass
constexpr const char * grandCentralHierarchyFileAnnoClass
constexpr const char * dontTouchAnnoClass
constexpr const char * testHarnessHierAnnoClass
constexpr const char * blackBoxResourceFileNameAnnoClass
constexpr const char * moduleHierAnnoClass
constexpr const char * internalKeySourceClass
constexpr const char * signalDriverAnnoClass
This file defines an intermediate representation for circuits acting as an abstraction for constraint...
Definition: DebugAnalysis.h:21