Skip to content

Commit

Permalink
Add mlir unit test for prioroty_route attribute on packet flows (#1758
Browse files Browse the repository at this point in the history
)
  • Loading branch information
erwei-xilinx committed Sep 9, 2024
1 parent fe0c224 commit 90c8076
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions test/create-packet-flows/packet_routing_priority_route.mlir
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//===- packet_routing_priority_route.mlir ----------------------*- MLIR -*-===//
//
// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// (c) Copyright 2024 Xilinx Inc.
//
//===----------------------------------------------------------------------===//

// RUN: aie-opt --aie-create-pathfinder-flows %s | FileCheck %s


// CHECK: aie.tile(6, 2)
// CHECK: aie.amsel<0> (0)
// CHECK: aie.tile(6, 3)
// CHECK: aie.amsel<0> (0)
// CHECK: aie.tile(7, 2)
// CHECK: aie.amsel<5> (3)
// CHECK: aie.tile(7, 0)
// CHECK: aie.amsel<5> (3)

//
// priority_route attribute overrides the downstream decision to assign arbiters and ports before other flows
//

module @aie_module {
aie.device(xcvc1902) {
%t62 = aie.tile(6, 2)
%t63 = aie.tile(6, 3)
%t72 = aie.tile(7, 2)
%t70 = aie.tile(7, 0)

aie.packet_flow(0x1) {
aie.packet_source<%t63, DMA : 0>
aie.packet_dest<%t62, DMA : 1>
}

aie.packet_flow(0x2) {
aie.packet_source<%t70, DMA : 0>
aie.packet_dest<%t72, Ctrl : 0>
} {priority_route = true}
}
}

0 comments on commit 90c8076

Please sign in to comment.