diff --git a/tests/filecheck/dialects/aie/ops.mlir b/tests/filecheck/dialects/aie/ops.mlir index 93dfde2..358aec9 100644 --- a/tests/filecheck/dialects/aie/ops.mlir +++ b/tests/filecheck/dialects/aie/ops.mlir @@ -42,6 +42,11 @@ aie.objectfifo @of1 (%1, { %2 }, 4 : i32) : !aie.objectfifo> // CHECK-NEXT: %{{.*}} = aie.objectfifo.acquire @of1(Consume, 1) : !aie.objectfifosubview> // CHECK-GENERIC-NEXT: %{{.*}} = "aie.objectfifo.acquire"() <{{{["]?}}objFifo_name{{["]?}} = @of1, {{["]?}}port{{["]?}} = 1 : i32, {{["]?}}size{{["]?}} = 1 : i32}> : () -> !aie.objectfifosubview> +%5 = aie.objectfifo.subview.access %4[0] : !aie.objectfifosubview> -> memref<16xi32> + +// CHECK-NEXT: %{{.*}} = aie.objectfifo.subview.access %{{.*}}[0] : !aie.objectfifosubview> -> memref<16xi32> +// CHECK-GENERIC-NEXT: %{{.*}} = "aie.objectfifo.subview.access"(%3) <{{{["]?}}index{{["]?}} = 0 : i32}> : (!aie.objectfifosubview>) -> memref<16xi32> + aie.objectfifo.release @of1(Consume, 1) // CHECK-NEXT: aie.objectfifo.release @of1(Consume, 1) diff --git a/xdsl_aie/dialects/aie.py b/xdsl_aie/dialects/aie.py index 6620338..6f8273e 100644 --- a/xdsl_aie/dialects/aie.py +++ b/xdsl_aie/dialects/aie.py @@ -1074,7 +1074,7 @@ def parse(cls, parser: Parser) -> ObjectFifoRegisterExternalBuffersOp: class ObjectFIFOSubviewAccessOp(IRDLOperation): name = "aie.objectfifo.subview.access" - index = attr_def(IntegerAttr[IntegerType]) + index = prop_def(IntegerAttr[IntegerType]) subview = operand_def(ObjectFIFOSubview[Attribute]) output = result_def(builtin.MemRefType) @@ -1086,7 +1086,7 @@ def __init__(self, index: IntegerAttr[IntegerType], subview: Operation | SSAValu subview.result.type.buffer.element_type, subview.result.type.buffer.shape ) super().__init__( - attributes={"index": index}, operands=[subview], result_types=[result_type] + properties={"index": index}, operands=[subview], result_types=[result_type] ) def print(self, printer: Printer):