CIRCT  18.0.0git
FIRAnnotations.h
Go to the documentation of this file.
1 //===- FIRAnnotations.h - .fir file annotation interface --------*- 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 the parser uses to load annotations.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef FIRANNOTATIONS_H
14 #define FIRANNOTATIONS_H
15 
16 #include "circt/Support/LLVM.h"
17 #include "llvm/ADT/SmallVector.h"
18 
19 namespace llvm {
20 namespace json {
21 class Path;
22 class Value;
23 } // namespace json
24 } // namespace llvm
25 
26 namespace mlir {
27 class ArrayAttr;
28 }
29 
30 namespace circt {
31 namespace firrtl {
32 
33 class CircuitOp;
34 class PrintFOp;
35 
36 /// Convert a JSON value containing OMIR JSON (an array of OMNodes), convert
37 /// this to an OMIRAnnotation, and add it to a mutable `annotations` argument.
38 bool fromOMIRJSON(llvm::json::Value &value,
39  SmallVectorImpl<Attribute> &annotations,
40  llvm::json::Path path, MLIRContext *context);
41 
42 bool fromJSONRaw(llvm::json::Value &value,
43  SmallVectorImpl<Attribute> &annotations, llvm::json::Path path,
44  MLIRContext *context);
45 
46 ParseResult foldWhenEncodedVerifOp(PrintFOp printOp);
47 
48 } // namespace firrtl
49 } // namespace circt
50 
51 #endif // FIRANNOTATIONS_H
lowerAnnotationsNoRefTypePorts FirtoolPreserveValuesMode value
Definition: Firtool.cpp:95
ParseResult foldWhenEncodedVerifOp(PrintFOp printOp)
Chisel has a tendency to emit complex assert/assume/cover statements encoded as print operations with...
bool fromJSONRaw(llvm::json::Value &value, SmallVectorImpl< Attribute > &annotations, llvm::json::Path path, MLIRContext *context)
bool fromOMIRJSON(llvm::json::Value &value, SmallVectorImpl< Attribute > &annotations, llvm::json::Path path, MLIRContext *context)
Convert a JSON value containing OMIR JSON (an array of OMNodes), convert this to an OMIRAnnotation,...
This file defines an intermediate representation for circuits acting as an abstraction for constraint...
Definition: DebugAnalysis.h:21