mirror of https://github.com/llvm/circt.git
[FIRRTL] Whitespace cleanup, NFC
Cleanup miscellaneous whitespace issues. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
This commit is contained in:
parent
194dc2fdfe
commit
f0db1d60c6
|
@ -119,7 +119,7 @@ def GetWidthAsIntAttr : NativeCodeCall<
|
|||
"$0.getType().cast<FIRRTLType>().getBitWidthOrSentinel())">;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Drop name if no symbol (DontTouch application) and name is a stylized
|
||||
// Drop name if no symbol (DontTouch application) and name is a stylized
|
||||
// temporary name
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ def FMemModuleOp : FIRRTLOp<"memmodule",
|
|||
The "firrtl.memmodule" operation represents an external reference to a
|
||||
memory module. See the "firrtl.mem" op for a deeper explantation of the
|
||||
parameters.
|
||||
|
||||
|
||||
A "firrtl.mem" operation is typically lowered to this operation when they
|
||||
are not directly lowered to registers by the compiler.
|
||||
}];
|
||||
|
@ -190,7 +190,7 @@ def FMemModuleOp : FIRRTLOp<"memmodule",
|
|||
}
|
||||
|
||||
def NonLocalAnchor : FIRRTLOp<"nla",
|
||||
[IsolatedFromAbove, Symbol,
|
||||
[IsolatedFromAbove, Symbol,
|
||||
DeclareOpInterfaceMethods<SymbolUserOpInterface>,
|
||||
HasParent<"CircuitOp">]> {
|
||||
let summary = "Anchor for non-local annotations";
|
||||
|
@ -220,7 +220,7 @@ def NonLocalAnchor : FIRRTLOp<"nla",
|
|||
|
||||
/// Replace the oldMod module with newMod module in the namepath of the NLA.
|
||||
/// Since the module is being updated, the symbols inside the module should
|
||||
/// also be renamed. Use the rename Map to update the corresponding
|
||||
/// also be renamed. Use the rename Map to update the corresponding
|
||||
/// inner_sym names in the namepath. Return true if any update is made.
|
||||
bool updateModuleAndInnerRef(StringAttr oldMod, StringAttr newMod,
|
||||
const llvm::DenseMap<StringAttr, StringAttr> &innerSymRenameMap);
|
||||
|
|
|
@ -3208,7 +3208,6 @@ LogicalResult HWStructCastOp::verify() {
|
|||
}
|
||||
|
||||
LogicalResult BitCastOp::verify() {
|
||||
|
||||
auto inTypeBits = getBitWidth(getOperand().getType().cast<FIRRTLType>());
|
||||
auto resTypeBits = getBitWidth(getType());
|
||||
if (inTypeBits.hasValue() && resTypeBits.hasValue()) {
|
||||
|
@ -3285,7 +3284,6 @@ static void printElidePortAnnotations(OpAsmPrinter &p, Operation *op,
|
|||
|
||||
static ParseResult parseImplicitSSAName(OpAsmParser &parser,
|
||||
NamedAttrList &resultAttrs) {
|
||||
|
||||
if (parseElideAnnotations(parser, resultAttrs))
|
||||
return failure();
|
||||
|
||||
|
@ -3356,7 +3354,6 @@ static ParseResult parseElideEmptyName(OpAsmParser &p,
|
|||
static void printElideEmptyName(OpAsmPrinter &p, Operation *op,
|
||||
DictionaryAttr attr,
|
||||
ArrayRef<StringRef> extraElides = {}) {
|
||||
|
||||
SmallVector<StringRef> elides(extraElides.begin(), extraElides.end());
|
||||
if (op->getAttrOfType<StringAttr>("name").getValue().empty())
|
||||
elides.push_back("name");
|
||||
|
@ -3616,7 +3613,6 @@ bool NonLocalAnchor::isComponent() { return (bool)ref(); }
|
|||
// 7. The last element of the namepath can also be a module symbol.
|
||||
LogicalResult
|
||||
NonLocalAnchor::verifySymbolUses(mlir::SymbolTableCollection &symtblC) {
|
||||
|
||||
Operation *op = *this;
|
||||
CircuitOp cop = op->getParentOfType<CircuitOp>();
|
||||
auto &symtbl = symtblC.getSymbolTable(cop);
|
||||
|
@ -3731,7 +3727,6 @@ ParseResult NonLocalAnchor::parse(OpAsmParser &parser, OperationState &result) {
|
|||
|
||||
static void genericAsmResultNames(Operation *op,
|
||||
OpAsmSetValueNameFn setNameFn) {
|
||||
|
||||
// Many firrtl dialect operations have an optional 'name' attribute. If
|
||||
// present, use it.
|
||||
if (op->getNumResults() == 1)
|
||||
|
|
|
@ -663,7 +663,7 @@ firrtl.circuit "FixPath" attributes
|
|||
// CHECK-LABEL: firrtl.circuit "FixPath"
|
||||
// CHECK: firrtl.module @FixPath
|
||||
// CHECK: firrtl.instance d @D()
|
||||
// CHECK: sv.verbatim
|
||||
// CHECK: sv.verbatim
|
||||
// CHECK-SAME: name\22: \22dutInstance\22,\0A
|
||||
// CHECK-SAME: OMMemberInstanceTarget:~FixPath|{{[{][{]0[}][}]}}/{{[{][{]1[}][}]}}:{{[{][{]2[}][}]}}
|
||||
// CHECK-SAME: name\22: \22pwm\22,\0A
|
||||
|
@ -671,6 +671,6 @@ firrtl.circuit "FixPath" attributes
|
|||
// CHECK-SAME: name\22: \22power\22,\0A
|
||||
// CHECK-SAME: value\22: \22OMMemberInstanceTarget:~C|{{[{][{]2[}][}]}}/{{[{][{]4[}][}]}}:{{[{][{]5[}][}]}}
|
||||
// CHECK-SAME: name\22: \22d\22,\0A
|
||||
// CHECK-SAME: value\22: \22OMMemberInstanceTarget:~FixPath|{{[{][{]5[}][}]}}\22\0A
|
||||
// CHECK-SAME: value\22: \22OMMemberInstanceTarget:~FixPath|{{[{][{]5[}][}]}}\22\0A
|
||||
// CHECK-SAME: {output_file = #hw.output_file<"omir.json", excludeFromFileList>, symbols = [@FixPath, #hw.innerNameRef<@FixPath::@c>, @C, #hw.innerNameRef<@C::@in>, #hw.innerNameRef<@C::@cd>, @D]}
|
||||
}
|
||||
|
|
|
@ -675,7 +675,7 @@ firrtl.nla @NLA1 []
|
|||
firrtl.nla @NLA2 [@LowerToBind::@s1]
|
||||
firrtl.module @InstanceLowerToBind() {}
|
||||
firrtl.module @LowerToBind() {
|
||||
firrtl.instance foo sym @s1 {lowerToBind = true, annotations = [{circt.nonlocal = @NLA2, class = "circt.test", nl = "nl"}]} @InstanceLowerToBind()
|
||||
firrtl.instance foo sym @s1 {lowerToBind = true, annotations = [{circt.nonlocal = @NLA2, class = "circt.test", nl = "nl"}]} @InstanceLowerToBind()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -343,7 +343,7 @@ firrtl.circuit "GCTDataMemTapsPrefix" {
|
|||
// CHECK: firrtl.module @Baz()
|
||||
// CHECK-SAME: annotations = [{circt.nonlocal = @nla_1, class = "nla_1"}, {circt.nonlocal = @nla_3, class = "nla_3"}]
|
||||
// CHECK: %mem_MPORT_en = firrtl.wire sym @s1 : !firrtl.uint<1>
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Test that NonLocalAnchors are properly updated with memmodules.
|
||||
|
|
|
@ -5,7 +5,7 @@ firrtl.circuit "MyModule" {
|
|||
firrtl.module @mod() { }
|
||||
firrtl.extmodule @extmod()
|
||||
firrtl.memmodule @memmod () attributes {
|
||||
depth = 16 : ui64, dataWidth = 1 : ui32, extraPorts = [],
|
||||
depth = 16 : ui64, dataWidth = 1 : ui32, extraPorts = [],
|
||||
maskBits = 0 : ui32, numReadPorts = 0 : ui32, numWritePorts = 0 : ui32,
|
||||
numReadWritePorts = 0 : ui32, readLatency = 0 : ui32,
|
||||
writeLatency = 1 : ui32}
|
||||
|
@ -177,7 +177,7 @@ firrtl.module @VerbatimExpr() {
|
|||
// CHECK: firrtl.instance foo sym @s1 {lowerToBind = true} @InstanceLowerToBind()
|
||||
firrtl.module @InstanceLowerToBind() {}
|
||||
firrtl.module @LowerToBind() {
|
||||
firrtl.instance foo sym @s1 {lowerToBind = true} @InstanceLowerToBind()
|
||||
firrtl.instance foo sym @s1 {lowerToBind = true} @InstanceLowerToBind()
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ProbeTest
|
||||
|
|
Loading…
Reference in New Issue