Skip to content

Commit

Permalink
modify op name, results type and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wenhu1024 committed Jul 31, 2024
1 parent fba57a3 commit 3db391f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/circt/Dialect/Moore/MooreOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def NamedConstantOp : MooreOp<"named_constant", [
}];
}

def StringConstantOp : MooreOp<"string", [Pure, ConstantLike]> {
def StringConstantOp : MooreOp<"string_constant", [Pure, ConstantLike]> {
let summary = "Produce a constant string value";
let description = [{
Produces a constant value of string type.
Expand All @@ -465,7 +465,7 @@ def StringConstantOp : MooreOp<"string", [Pure, ConstantLike]> {
```
}];
let arguments = (ins StrAttr:$value);
let results = (outs SimpleBitVectorType:$result);
let results = (outs IntType:$result);
let assemblyFormat = "$value attr-dict `:` type($result)";
}

Expand Down
4 changes: 2 additions & 2 deletions test/Conversion/ImportVerilog/basic.sv
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ module Basic;
MyEnum ev1 = VariantA;
MyEnum ev2 = VariantB;

// CHECK: [[STR_WELCOME:%.+]] = moore.string "Welcome to Moore" : i128
// CHECK: [[STR_WELCOME:%.+]] = moore.string_constant "Welcome to Moore" : i128
// CHECK: [[CONV_WELCOME:%.+]] = moore.conversion [[STR_WELCOME]] : !moore.i128 -> !moore.string
// CHECK: [[VAR_S:%.+]] = moore.variable [[CONV_WELCOME]] : <string>
string s = "Welcome to Moore";

// CHECK: [[VAR_S1:%.+]] = moore.variable : <string>
// CHECK: [[STR_HELLO:%.+]] = moore.string "Hello World" : i88
// CHECK: [[STR_HELLO:%.+]] = moore.string_constant "Hello World" : i88
// CHECK: [[CONV_HELLO:%.+]] = moore.conversion [[STR_HELLO]] : !moore.i88 -> !moore.string
// CHECK: moore.assign [[VAR_S1]], [[CONV_HELLO]] : string
string s1;
Expand Down

0 comments on commit 3db391f

Please sign in to comment.